This guide walks you through cloning the Food Delivery App repository and getting all three services — the Express backend, the customer React frontend, and the admin React dashboard — running on your local machine. The entire setup takes about five minutes once you have the prerequisites in place.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bhavnesh7781/Food-Delivery-App/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following available:- Node.js 18+ — The backend and both Vite frontends require Node 18 or later. Run
node -vto check. - MongoDB instance — A locally running MongoDB server or a free MongoDB Atlas cluster. You will need the connection URI.
- Stripe account — A free Stripe account with access to your test secret key (
sk_test_...). No real charges are made during development. - Git — To clone the repository.
Setup Steps
Configure the backend environment
The Express server reads its secrets from a Open
.env file that is not committed to version control. Create it now:backend/.env in your editor and add the following keys:| Variable | Description |
|---|---|
MONGODB_URI | Full connection string, e.g. mongodb://localhost:27017/food-delivery or a MongoDB Atlas URI |
JWT_SECRET | Any long, random string — used to sign and verify authentication tokens |
STRIPE_SECRET_KEY | Your Stripe test secret key from the Stripe Dashboard |
See the Environment Variables reference page for the complete list of accepted variables and their default values.
Install backend dependencies and start the API server
Move into the Nodemon watches
backend directory, install dependencies, and start the server with nodemon.server.js for changes and restarts automatically. The server listens on port 4000 by default (configurable via a PORT env variable). A successful start prints:Install and start the customer frontend
Open a new terminal, return to the project root, then install and start the Vite dev server for the customer app.Vite starts the customer app on port 5173 (the default Vite port). You will see output similar to:
All three services — the backend API (port 4000), the customer frontend (port 5173), and the admin dashboard (port 5174) — must be running concurrently for the application to work correctly. Use three separate terminal tabs or a process manager like
concurrently to keep them all alive.Verify Everything Works
Once all three services are up, confirm each one is healthy before you start developing. Check the backend API The root route returns a plain-text health message. Run the following from any terminal:GET /api/food/list and displays available items grouped by category. If you see food cards rendered, the frontend-to-backend connection is working.
Access the admin dashboard
Open http://localhost:5174. You should see the admin layout with a sidebar containing Add, List, and Orders navigation links. Use the Add page to upload a test food item and verify that it appears in the List view and on the customer storefront.