/Food-Delivery

A Swiggy-like food delivery platform that lets users order from restaurants, track deliveries, and make secure payments for a seamless experience.

Primary LanguageJavaScript

How to Setup & Run this Project

How to Run Project


Install NodeJs (Ignore if already installed)

  1. Visit the official Node.js website: Tap here to visit
  2. Download the Node.js installer.
  3. Run the installer.
  4. Follow the prompts in the installer.

First, Run Backend, then Frontend & Admin


Steps to Setup Backend of the Project

  1. Open the project folder in VS Code.
  2. Open the integrated terminal:
    • Right-click on the sidebar and select "Open in Integrated Terminal".
  3. Run the following command and wait for installation to complete:

    npm install
    (Internet is required for this step.)

  4. Setup MongoDB Compass:

    • Go to your MongoDB Compass Application then create a new database named Swiggy_Mern(or you can name it anything just change the name of the database in the backend config file to your respective db name).
    • Sign up on the website.
    • Create a new project.
    • Go to the database section and build a database:
      • Select M0, choose your region, and create a database.
    • Setup username and password. Note: Do not use the @ symbol in the password.
    • Whitelist IP 0.0.0.0 and click on Add Entry.
    • Connect to the database:
      • Select the Compass option and copy the connection string.
      • Paste it in db.js, replacing the placeholder password with the one you created earlier, and save changes.
  5. Set up Stripe

    :
    • Open the .env file in the backend folder and paste your Stripe secret key in the STRIPE_SECRET_KEY variable.
  6. To run the backend, use:

    npm run server

Steps to Run Frontend & Admin Panel of the Project

  1. Open the project folder in VS Code.
  2. Open the integrated terminal in the project directory:
    • Right-click on the sidebar and select "Open in Integrated Terminal".
  3. Run the following command and wait for installation to complete:
    npm install
    (Internet is required.)
  4. After installation, you will see a node_modules folder in the sidebar.
  5. To start the project, run:
    npm run dev
  6. The project will open in your default web browser.