Skip to content

KKShakya/Food_delivery

Repository files navigation

Food_delivery

This is a Food delivery App backend to manage restaurant selection and orders from Client.

Authentication Collection

Description: This collection is for Authentication purposes only.

Postman Collection Link: Authentication Collection

Requests

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.


register

login

root to check API working


resetPassword



Restaurants Collection

Description: This collection is for managing restaurant-related operations.

Postman Collection Link: Restaurants Collection



Requests

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.


delete a menu item


add a menu item

  • 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"
    }
    

Specific restaurant details


get a specific restaurant menu


get all restaurants



Orders Collection

Description: This collection is for managing order-related operations.

Postman Collection Link: Orders Collection

Requests

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.


Create an Order

  • 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"
    }
    

Update the Status


Get Specific Order

Libraries and Tools Used

The following libraries and tools were used in the development of this project:

Libraries

  • 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.

Tools

  • 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.

Releases

No releases published

Packages

No packages published