sainRaghuveer / Online-Food-Ordering-System

This is a web application for ordering food from a restaurant. Users can browse the menu, add items to their cart, and place orders. The application is built using React for the frontend and Node.js with Express for the backend.

Home Page:https://online-food-deliever-app.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Food Ordering System

This is a web application for ordering food from a restaurant. Users can browse the menu, add items to their cart, and place orders. The application is built using React for the frontend and Node.js with Express for the backend.

Features

  • Browse the menu: Users can view the available dishes on the menu.
  • Add to cart: Users can add items to their cart for ordering.
  • Place an order: Users can place orders for the selected items in their cart.
  • Order summary: After placing an order, users can view the order summary, including the list of dishes, total amount, and delivery time.

Installation

  1. Clone the repository:
git clone https://github.com/sainRaghuveer/Online-Food-Ordering-System.git
  1. Install all dependencies in both directories client and server
cd backend 
npm install

cd frontend 
npm install
  1. Set up the backend:
  • Rename the .env.example file to .env.
  • Configure the environment variables in the .env file, including the database connection details and any other necessary configurations.
  1. Set up the frontend:
  • Open the frontend/src/config.js file.

  • Update the API_URL variable with the appropriate URL for your backend server.

  • Start the application:

  • Start the backend server:

npm run server
  • Start the frontend development server:
npm start

Note:

  • Before doing anything first create .env file and put port , mongoURl.>
  • port is for listening the server.>
  • mongoURl is for running database and store your data in database so put your mongo link.>

The application will be accessible at http://localhost:3000.

Folder Structure

  • /backend: Contains the server-side code.

Endpoints

METHOD ENDPOINT DESCRIPTION STATUS CODE
POST /api/register This endpoint should allow users to register. 200
GET /api/login This endpoint should allow users to login. 200
GET /api/dish This endpoint should allow users to view the all dished present in database. 200
POST /api/dish This endpoint should allow users Admin to post new dish. 200
POST /api/order This endpoint should allow users to post order. 200
POST /api/cart This endpoint should allow users to add food in cart. 200
GET /api/cart This endpoint should allow getting all cart data. 200
DELETE /api/cart This endpoint should allow users delete cart data 200
PATCH /api/cart/:id This endpoint should allow users update quantity 200

Backend deployed link


  • /frontend: Contains the client-side code.

Frontend deployed link

Technologies Used

  • Frontend: React.js, Chakra UI
  • Backend: Node.js, Express
  • Database: MongoDB

About

This is a web application for ordering food from a restaurant. Users can browse the menu, add items to their cart, and place orders. The application is built using React for the frontend and Node.js with Express for the backend.

https://online-food-deliever-app.vercel.app/


Languages

Language:JavaScript 95.3%Language:HTML 3.6%Language:CSS 1.1%