BiteIt is an end-to-end web application that digitizes and streamlines all operations of a modern canteen, catering to both regular users and administrators. It offers a seamless, secure, and efficient way to interact with canteen services, manage orders, and handle daily transactions.
🧑💻 User Roles & Permissions
1. Customer/User
- Sign Up & Authentication:
Users can register and log in securely. Authentication is handled via JWT tokens, ensuring user sessions remain secure. - Menu Browsing:
Users can view a dynamic menu with categories, item details, prices, and availability. - Cart & Ordering:
Users add items to their cart, adjust quantities, and place orders directly from the web interface. - Secure Payments:
The checkout process is integrated with Stripe, allowing for safe and reliable online payments. - Order Tracking:
Users can view their order history, check current order status, and receive real-time updates.
2. Administrator
- Admin Authentication & Dashboard:
Admins log in with elevated permissions and access a comprehensive dashboard. - Order Management:
View, process, and update the status of all orders. Admins can mark orders as prepared, delivered, or cancelled. - Menu Management (CRUD):
Create, read, update, and delete menu items. This includes editing descriptions, prices, images, and availability. - Sales & Analytics:
Track daily, weekly, or monthly sales, view popular menu items, and access insightful analytics and reports. - User Management:
(Optional feature) Admins may have access to manage user accounts, reset passwords, or adjust permissions.
✨ Core Features
- Modern UI:
The frontend is built with React.js and styled using Tailwind CSS, ensuring a responsive and engaging user experience across devices. - Vite-Powered Frontend:
Fast development and build times using Vite, enabling a smooth developer workflow. - Real-Time Experience:
Orders and menu updates reflect instantly for both users and admins. - Security:
JWT-based authentication for secure sessions; payment security with Stripe. - RESTful API:
All client-server communication happens via RESTful endpoints, making the system scalable and modular. - Database:
MongoDB is used for fast, flexible, and scalable data storage.
🛠️ Tech Stack
- Frontend: React.js, Vite, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- Payments: Stripe
- Other: REST API, Responsive Design
🚀 Getting Started
Prerequisites
Installation Steps
-
Clone the repository:
git clone https://github.com/siddharth9300/BiteIt.git cd BiteIt
-
Install dependencies for both frontend and backend:
# For backend cd server npm install # For frontend cd ../client npm install
-
Set up environment variables:
Create.env
files in bothserver
andclient
directories as per the provided.env.example
or documentation. -
Start the development servers:
# In the backend/server directory npm run dev # In the frontend/client directory npm run dev
📁 Project Structure
BiteIt/
├── client/ # Frontend (React, Vite)
│ └── ...
├── server/ # Backend (Node.js, Express, MongoDB)
│ └── ...
├── README.md
├── package.json
└── ...
client/
– All frontend source code and assetsserver/
– Backend API, logic, models, controllers, and configuration
🔎 Usage Scenarios
For Customers
- Browse Menu:
Access a categorized menu, view detailed descriptions, and filter by preference. - Build Order:
Add items to cart, modify quantities, and see the running total. - Checkout:
Enter payment details securely via Stripe, confirm the order, and receive order status updates. - Track Orders:
View the order progress (preparing, ready, delivered) and order history.
For Administrators
- Order Management:
See all incoming orders, update their status, and manage the order queue in real time. - Menu Management:
Add new dishes, update prices, remove unavailable items, and upload images. - Analytics:
Access graphs and statistics about sales, revenue, and customer preferences. - (Optional) User Management:
View and manage registered users when needed.
🔒 Security & Best Practices
- Authentication:
Only authenticated users can place orders; only admins can access management dashboards. - Authorization:
API endpoints are protected and role-based access is enforced. - Sensitive Data:
Payments are processed through Stripe; no sensitive card data is stored on the server. - Environment Variables:
All secrets (JWT keys, Stripe keys, DB URIs) are stored in.env
files and never committed.
🤝 Contributing
Contributions are welcome! Please open issues or pull requests for improvements or bug fixes.
- Fork the repository 🍴
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request 🚀
🪪 License
This project is currently unlicensed. Please add a license if you plan to share or use this code publicly.
For questions or support, please open an issue or contact the repository owner. 🙋