The admin dashboard gives restaurant operators full control over the menu catalogue and order pipeline through a clean, purpose-built interface. It is a separate React + Vite application located in theDocumentation 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.
/admin directory of the monorepo, but it shares the same Node.js/Express backend as the customer-facing frontend — all API calls go to the same server.
Architecture Overview
The admin app is a standalone React + Vite application. It connects to the backend via theurl constant defined in App.jsx:
The backend URL is hardcoded to
http://localhost:3000 in admin/src/App.jsx. Update this value to your production backend URL before deploying the admin panel.Pages and Routes
Add Food Item
/add — Upload an image and fill in item details to add a new dish to the menu.All Foods List
/list — Browse every item in the catalogue and remove items that are no longer available.Orders
/orders — View all customer orders and advance each order through its delivery lifecycle.Add Food Item
The/add page lets operators upload a new dish to the menu. The form submits as multipart/form-data to POST /api/food/add.
Form Fields
| Field | Type | Notes |
|---|---|---|
| Image | File upload | Required — stored in backend/uploads/ |
| Product name | Text | The dish’s display name |
| Description | Textarea | Short description shown on each food card |
| Category | Select dropdown | One of 8 fixed categories (see below) |
| Price | Number | Price in INR; displayed as Rs.<price> |
Category Options
The category dropdown is populated with these exact values:Submission Flow
backend/uploads/. The image is then served at /images/<filename>.
Food List
The/list page calls GET /api/food/list on mount and renders a table of all items currently in the catalogue.
Table Columns
| Column | Value |
|---|---|
| Image | Thumbnail loaded from /images/<filename> |
| Name | Dish name |
| Category | Category string |
| Price | Item price |
| Action | X button — triggers delete |
Deleting a Food Item
Clicking the X button callsPOST /api/food/remove with { id: foodId }:
removeFood in foodController.js first retrieves the document to get the image filename, then removes the file from disk before deleting the MongoDB document:
Orders
The/orders page provides a live view of every order placed through the customer app. It calls GET /api/order/list on mount to load all orders.
Order Card Contents
Each order card displays:- Item list —
item.name × item.quantityfor every item in the order, comma-separated - Customer name —
address.firstName + " " + address.lastName - Delivery address — street, then city / state / country / zipcode on the next line
- Phone number —
address.phone - Item count — total number of distinct items
- Order total —
$<amount>
Updating Order Status
A<select> dropdown on each card reflects the current status and lets operators move it forward:
POST /api/order/status with { orderId, status }: