REST API for Recipes application, that provides CRUD operations for recipes and user authorization
This project aims to create a simple and functional REST API server (Back End) for Recipes application.
It includes:
- user authorisation section, that allows to register, login and logout user
- recipes section, that allows to create, fetch, update or delete recipes
Full functionality is provided in API documentation
With this REST API you can make GET, POST, PUT and DELETE requests with following functionality:
- register a new User
- login / logout User
- get data of current User
- get a list of Categories, by which Recipes are divided
- get a list of Ingredients according to query parameter (by name)
- get a list of Recipes from DB according to query parameters (page, by category, by title, by ingredient)
- get or delete Recipe by id
- create a new Recipe by an authorized user (available to add image of the Recipe)
- get a list of Recipes of an authorized user (my Recipes)
- get a list of favorite Recipes of an authorized user
- add / remove Recipe to the list of favorite Recipes of an authorized user
All POST, PUT and DELETE requests pass through different validations. Detailed description of API documentation you can find on https://api-recipes-sigma.vercel.app/
- Go to the deployed server on https://api-recipes-sigma.vercel.app/
- Ready to test. You can test the API using Postman or directly from the Swagger Docs page.
- Use https://api-recipes-sigma.vercel.app/ as Base URL for creating your frontend application
- Go to https://github.com/OleksandrKochenko/evvent-ta-recipes/
- Clone repository
- Set dependencies
npm install
- Add environment variables to the .env file according to the template in .env.example
- Run app on dev mode
npm run dev
Your server runs on http://localhost:4000 (Available to update)
Use Links to test the app on web-service with Swagger API documentation.
For this project were used:
- Node.js
- Express.js
- MongoDB (Mongoose)
- TypeScript
- Vercel - for deployment
- multer - for file upload
- cloudinary - cloud image storage
- jsonwebtoken - JWT implementation
- bcryptjs - password hashing
- joi - request body validation
- cors - available cross-domain requests
- dotenv - available environment variables
- morgan - format logging
- swagger-ui-express - for API documentation with live test
- You can use Postman to test API requests or do dhis directly from Swagger Docs page (Try it out)
- You can choose servers to test:
- http://localhost:4000 (if you run it locally)
- https://api-recipes-sigma.vercel.app/ (using web service)
- https://api-recipes-sigma.vercel.app/ - link for API Docs with live test
- https://github.com/OleksandrKochenko/evvent-ta-recipes/ - Git Hub repository of app
- https://www.linkedin.com/in/oleksandr-kochenko/ - profile on LinkedIn
- https://oleksandrkochenko.github.io/CV-Kochenko/CV - CV