This is a full-stack MERN (MongoDB, Express.js, React.js, Node.js) application that allows users to browse and order food from a restaurant. It features user authentication, a dynamic food catalog, a shopping cart, and an order history page.
You can view a live demo of the application here: Food Delivery App
Note: The application is currently in dark mode only. Light mode is a work in progress.
- User Authentication: Secure user registration and login system with JWT and password hashing.
- Browse and Search: Users can browse food items by category and search for specific dishes.
- Shopping Cart: A fully functional cart where users can add, remove, and update food items with different quantities and sizes.
- Order Management: Users can place orders and view their past order history on the "My Orders" page.
- Responsive Design: The application is built with Bootstrap to be responsive and work on various screen sizes.
- React.js
- Vite
- React Router DOM
- Bootstrap
- React Bootstrap
- React Icons
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT (JSON Web Token)
- bcrypt
- dotenv
To get a local copy up and running, follow these simple steps.
- Node.js and npm installed
- MongoDB installed and running
- Navigate to the
backenddirectory:cd backend - Install the dependencies:
npm install
- Create a
.envfile in thebackenddirectory and add your MongoDB connection string and a port number:MONGO_URL=your_mongodb_connection_string PORT=5000
- Start the backend server:
npm run dev
- Navigate to the
frontenddirectory:cd frontend - Install the dependencies:
npm install
- Create a
.envfile in thefrontenddirectory and add the URL of your backend server:VITE_API_URL=http://localhost:5000
- Start the frontend development server:
npm run dev
POST /api/createuser: Create a new user account.POST /api/loginuser: Log in an existing user.POST /api/foodData: Fetch all food items and categories.POST /api/orderData: Place a new order.POST /api/myOrderData: Fetch the order history for a user.
- Ashik Hegde - Initial work - AshikAHegde