Welcome to the Food Ordering System, a full-stack web application designed to facilitate online food ordering with seamless management for both customers and administrators. This project integrates an intuitive UI for customers, a powerful backend for order management, and an admin panel for managing food items and processing orders.
The Food Ordering System is a web-based application where customers can:
- Register and log in to their accounts.
- Browse a variety of food categories.
- Add items to their cart and place orders.
- Track the status of their orders.
Administrators have full control to:
- Add, edit, and remove food items.
- Manage customer orders and update statuses.
- View order details and customer information.
- User Authentication: Secure registration and login using JWT.
- Order Food: Browse available food items and place orders.
- Order Tracking: Track the order status from preparation to delivery.
- User Profile: Update personal information.
- Food Management: Add, edit, and delete food items.
- Order Management: View all orders, update order statuses.
- Customer Management: View customer information and order history.
- Payment Integration: Easily make payments for food orders.
- Responsive Design: Works seamlessly on desktop and mobile devices.
- Real-time Updates: Track order statuses in real-time.
- React with hooks for dynamic rendering.
- Axios for HTTP requests.
- React Router for client-side navigation.
- Bootstrap and custom CSS for responsive design.
- React Toastify for user notifications.
- Node.js with Express for server-side logic.
- MongoDB with Mongoose for the database.
- JWT for secure authentication.
- Multer for file handling (images).
- Bcrypt for password hashing.
- Axios: For API requests.
- Toastify: For notifications.
- FormData: To handle image uploads.
- dotenv: For environment variables.
- Node.js (v14+)
- MongoDB (local or cloud)
- Git
-
Clone the repository:
https://github.com/ayu-ano/FleetFeast.git
-
Navigate to the project folder:
Frontendcd frontend
Backend
cd backend
Admin
cd admin
-
Install dependencies:
npm install
npm install react-router-dom
npm install
npm install express mongoose bcrypt validator jsonwebtoken nodemon cors dotenv body-parser multer stripe
4.Set up environment variables: .env file:
MONGO_URI=<your-mongodb-uri>
JWT_SECRET=<your-jwt-secret>
PORT=5000
STRIPE_SECRET_KEY=<your-stripe-secret-key>
5.Start the server (backend): use any one command
npm run server
npm server.js
nodemon server.js
- Backend:
npm run dev
- Frontend:
npm start
in thefrontend
directory.
- Build frontend:
npm run build
in thefrontend
directory. - Serve:
npm start
- Unit tests can be added using Jest or Mocha.
- We also have folder name
tests
in which we perform testing for backend part. - Lint the code using ESLint:
npm run lint
- POST
/api/user/register
- Register a new user. - POST
/api/user/login
- Login a user.
- POST
/api/order/place
- Place a new order. - POST
/api/order/verify
- Verify order payment. - POST
/api/order/userorders
- Retrieve user-specific orders. - GET
/api/order/list
- List all orders for admin. - POST
/api/order/status
- Update order status.
- POST
/api/food/add
- Add a new food item. - GET
/api/food/list
- Retrieve all food items. - POST
/api/food/remove
- Remove a food item.
For more detailed information, please refer to the User Guide.
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-name
. - Create a
pull
request.
- Author:
Ayush Kumar
- For any inquiries or feedback, please reach out via GitHub: Ayush Kumar