Snap-dish is a comprehensive, multi-faceted food delivery application built on the MERN stack. It provides a seamless and integrated ecosystem for four key user roles: customers, restaurant administrators, delivery agents, and platform administrators. Each role has its own dedicated frontend application for a tailored user experience, all powered by a single, robust backend.
- Browse & Discover: Search for restaurants and explore their menus.
- Shopping Cart: Add, remove, and manage items in a persistent cart.
- Seamless Checkout: Place orders with an easy-to-use checkout form.
- Order Tracking: View the status of current and past orders.
- Personalization: Manage saved addresses and a personal wishlist.
- Community: Apply to the Creator Program to partner with the platform.
- Dashboard: A visual overview of total revenue, orders, and sales trends.
- Menu Management: Full CRUD (Create, Read, Update, Delete) functionality for menu items, including image uploads.
- Order Management: View and manage incoming orders from customers.
- Reporting: Access detailed reports on sales and performance.
- Order Notifications: Receive and accept new delivery assignments.
- Active Order Management: View customer details and update order statuses (e.g., "Out for delivery," "Delivered").
- Earnings Tracker: A dashboard to view total earnings and delivery history.
- Profile Management: Update personal information.
- Central Dashboard: Platform-wide statistics on users, orders, and restaurants.
- User & Partner Management: View and manage all users, restaurants, and delivery partners.
- Request Approval: Approve or deny applications from new restaurants and creators.
- Order Oversight: View and manage every order placed on the platform.
- Platform Settings: Configure global settings like delivery fees and commission rates.
- Backend: Node.js, Express.js
- Frontend: React.js (Vite)
- Database: MongoDB (with Mongoose)
- Authentication: JSON Web Tokens (JWT)
- Image Management: Cloudinary for cloud-based media storage
- API Architecture: RESTful API
- Node.js (v18.x or higher)
- npm (v9.x or higher)
- MongoDB (local or Atlas connection string)
-
Navigate to the backend directory:
cd Back -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in theBackdirectory and add the following, replacing the placeholder values:PORT=4000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
-
Start the server:
npm start
The backend server will be running on
http://localhost:4000.
You need to run each of the four frontend applications in a separate terminal.
cd Food
npm install
npm run devThe app will be available at http://localhost:5173 (or the next available port).
cd admin
npm install
npm run devThe app will be available at a new port (e.g., http://localhost:5174).
cd restaurant-admin
npm install
npm run devThe app will be available at a new port (e.g., http://localhost:5175).
cd DeliveryAgent
npm install
npm run devThe app will be available at a new port (e.g., http://localhost:5176).
Use these credentials to test different user roles:
{
"admin": {
"email": "admin@snapdish.com",
"password": "Admin@123456",
"role": "admin"
},
"restaurantOwner": {
"email": "ravi4@example.com",
"password": "agentpassword123",
"role": "restaurant_owner"
},
"deliveryAgent": {
"email": "delivery@snapdish.com",
"password": "Delivery@123456",
"role": "delivery_agent"
},
"customer": {
"email": "customer@snap.com",
"password": "Customer@123456",
"role": "customer"
}
}- Customer App: https://snap-dish-xi.vercel.app
- Restaurant Admin Panel: https://snap-dish-d5y5.vercel.app
- Delivery Agent App: https://snap-dish-2p9s.vercel.app/login
- Main Admin Panel: https://snap-dish-qulq.vercel.app
Contributions are welcome! Please feel free to submit a Pull Request.