Grandma's Cookbook is an application that allows users to create and manage a private collection of favourite recipes, preserving their culinary heritage.
Enjoy your meal!
Use the following credentials for testing purposes: *
Username: admin
Password: admin
* Please note that the custom API rest is hosted on a free render.com account, so please be patient when logging in (you will have to wait about a minute).
Grandma's Cookbook uses the MERN technology stack, which consists of MongoDB, Express.js, React, and Node.js. And it is built using the following technologies:
For a full list of dependencies and scripts used, see the package.json file.
To set up and run Grandma's Cookbook in your local environment, follow these steps:
-
Clone this repository to your choosen local directory:
git clone https://github.com/LuisCaballe/grandma-cookbook-back.git
-
Install the dependencies:
npm install
-
Build the application:
npm run build
-
Start the application:
npm run start
- Method: GET
- URL: https://luis-caballe-final-project-back-202304.onrender.com/
- Response: { message: "🏓 Pong" }
- Method: POST
- URL: https://luis-caballe-final-project-back-202304.onrender.com/user/login
- Body: {"username":"admin", "password":"admin"}
- Response: token
(The request must have a valid token)
- Method: GET
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes
- Response: list of recipes
(The request must have a valid token)
- Method: GET
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes/:recipeId
- Response: selected recipe
(The request must have a valid token)
- Method: GET
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes?filter=Easy
- Response: list of recipes with easy cooking difficulty
(The request must have a valid token)
- Method: DELETE
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes/:recipeId
- Response: { message: "Recipe deleted" }
(The request must have a valid token)
- Method: POST
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes/add
- Body: {added recipe}
- Response: {new recipe}
(The request must have a valid token)
- Method: PUT
- URL: https://luis-caballe-final-project-back-202304.onrender.com/recipes/update/:recipeId
- Body: {updated recipe}
- Response: { message: "Recipe updated successfully" }
For more information on endpoints, please refer to the file grandma-cookbook.postman_collection.json