This is a Food delivery App backend to manage restaurant selection and orders from Client.
Description: This collection is for Authentication purposes only.
Postman Collection Link: Authentication Collection
Name | Method | URL | Description |
---|---|---|---|
register | POST | https://fopd-delivery-app.onrender.com/api/register | A request to register a new user in the Database |
login | POST | https://fopd-delivery-app.onrender.com/api/login | To allow user to login to the System with Cookies generation |
root to check API working | GET | http://localhost:8080 | To check the working of API. Demo test |
resetPassword | POST | https://fopd-delivery-app.onrender.com/api/user/647c262bec59224ed0526e58/reset | Allows users to reset their password by providing the current password and new password in the request body. |
- Method: POST
- URL: https://fopd-delivery-app.onrender.com/api/register
- Description: A request to register a new user in the Database
- Body:
{ "name": "kumar", "email": "jumbo@gmail.com", "password": "12345" }
- Method: POST
- URL: https://fopd-delivery-app.onrender.com/api/login
- Description: To allow user to login to the System with Cookies generation
- Body:
{ "email": "jumbo@gmail.com", "password": "123456" }
- Method: GET
- URL: http://localhost:8080
- Description: To check the working of API. Demo test
- Method: POST
- URL: https://fopd-delivery-app.onrender.com/api/user/647c262bec59224ed0526e58/reset
- Description: Allows users to reset their password by providing the current password and new password in the request body.
- Body:
{ "currentPassword": "", "newPassword": "" }
Description: This collection is for managing restaurant-related operations.
Postman Collection Link: Restaurants Collection
Name | Method | URL | Description |
---|---|---|---|
delete a menu item | DELETE | https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784/menu/647c89c65d544d9d3098c09c | Allows the user to delete a particular menu item identified by its ID from a specific restaurant. |
add a menu item | POST | https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784/menu | Allows the user to add a new item to a specific restaurant's menu identified by its ID. |
Specific restaurant details | GET | https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784 | Returns the details of a specific restaurant identified by its ID. |
get a specific restaurant menu | GET | https://fopd-delivery-app.onrender.com/api/restaurants/647c40364c4ebcbb300c4788/menu | Returns the menu of a specific restaurant identified by its ID. |
get all restaurants | GET | https://fopd-delivery-app.onrender.com/api/restaurants | Returns a list of all available restaurants. |
- Method: DELETE
- URL: https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784/menu/647c89c65d544d9d3098c09c
- Description: Allows the user to delete a particular menu item identified by its ID from a specific restaurant.
- Body:
{ "name": "Paneer tikka Malai", "description": "Freshly prepared and slow roasted paneer", "price": 90, "image": "https://www.archanaskitchen.com/images/archanaskitchen/1-Author/Neha_Mathur/Achari_Paneer_Tikka_Recipe_Party_Food_400.jpg" }
- Method: POST
- URL: https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784/menu
- Description: Allows the user to add a new item to a specific restaurant's menu identified by its ID.
- Body:
{ "name": "Paneer malai kofta", "description": "Freshly prepared and slow roasted paneer", "price": 120, "image": "https://www.archanaskitchen.com/images/archanaskitchen/1-Author/Neha_Mathur/Achari_Paneer_Tikka_Recipe_Party_Food_400.jpg" }
- Method: GET
- URL: https://fopd-delivery-app.onrender.com/api/restaurants/647c3f2d4c4ebcbb300c4784
- Description: Returns the details of a specific restaurant identified by its ID.
- Method: GET
- URL: https://fopd-delivery-app.onrender.com/api/restaurants/647c40364c4ebcbb300c4788/menu
- Description: Returns the menu of a specific restaurant identified by its ID.
- Method: GET
- URL: https://fopd-delivery-app.onrender.com/api/restaurants
- Description: Returns a list of all available restaurants.
Description: This collection is for managing order-related operations.
Postman Collection Link: Orders Collection
Name | Method | URL | Description |
---|---|---|---|
Create an Order | POST | https://fopd-delivery-app.onrender.com/api/orders/ | Allows the user to place an order. |
Update the Status | PATCH | https://fopd-delivery-app.onrender.com/api/orders/647c967cf692847deac0e8f3 | Allows users to update the status of a specific order identified by its ID. |
Get Specific Order | GET | https://fopd-delivery-app.onrender.com/api/orders/647c967cf692847deac0e8f3 | Returns the details of a specific order identified by its ID. |
- Method: POST
- URL: https://fopd-delivery-app.onrender.com/api/orders/
- Description: Allows the user to place an order.
- Body:
{ "user": "647c262bec59224ed0526e58", "restaurant": "647c3f2d4c4ebcbb300c4784", "items": [ { "name": "Item 1", "price": 100, "quantity": 2 }, { "name": "Item 2", "price": 150, "quantity": 1 }, { "name": "Item 2", "price": 150, "quantity": 1 } ], "deliveryAddress": { "street": "MOdi street", "city": "Shivpuri", "state": "Madhy Pradesh", "country": "India", "ZIP": "473551" }, "status": "placed" }
- Method: PATCH
- URL: https://fopd-delivery-app.onrender.com/api/orders/647c967cf692847deac0e8f3
- Description: Allows users to update the status of a specific order identified by its ID.
- Body:
{ "status": "on the way" }
- Method: GET
- URL: https://fopd-delivery-app.onrender.com/api/orders/647c967cf692847deac0e8f3
- Description: Returns the details of a specific order identified by its ID.
The following libraries and tools were used in the development of this project:
- bcrypt: Version 5.1.0. Used for password hashing and encryption.
- cookie-parser: Version 1.4.6. Used for parsing cookies in Express.js.
- dotenv: Version 16.1.3. Used for loading environment variables from a .env file.
- express: Version 4.18.2. A fast and minimalist web application framework for Node.js.
- jsonwebtoken: Version 9.0.0. Used for generating and verifying JSON web tokens (JWT).
- mongoose: Version 7.2.2. An Object Data Modeling (ODM) library for MongoDB and Node.js.
- nodemon: Version 2.0.22. A utility that automatically restarts the Node.js application when file changes are detected.
- VScode: A popular code editor with great features and extensions for JavaScript development.
- Postman: A powerful API testing and documentation platform used for testing RESTful APIs.
- MongoDB Compass: A graphical user interface (GUI) tool for MongoDB that allows you to explore and interact with your MongoDB data.
Please refer to the respective links for more information about each library and tool.