A complete full-stack cafeteria management system built with Flask and MySQL featuring user authentication, shopping cart functionality, order management, reviews, coupons, and an admin dashboard.
- User Registration & Login
- Profile Management
- Change Password
- Order History Tracking
- Reorder Previous Orders
- Food Ratings & Reviews
- Coupon System
- Browse Menu by Categories
- Search Food Items
- Shopping Cart Management
- Checkout System
- Multiple Payment Methods
- Order Confirmation
- Dashboard Analytics
- Revenue Statistics
- Order Management
- Menu Item CRUD Operations
- Category Management
- User Management
- Search & Filtering
- Coffee-Themed Modern Design
- Fully Responsive Layout
- Toast Notifications
- Loading Skeletons
- Featured Item Badges
- Star Rating System
- Flask
- Flask-SQLAlchemy
- Flask-Login
- Flask-CORS
- PyMySQL
- Werkzeug
- HTML5
- CSS3
- JavaScript
- Bootstrap 5
- jQuery
- Chart.js
- Font Awesome
- MySQL 8.0+
- users
- categories
- menu_items
- orders
- order_items
- cart
- reviews
git clone https://github.com/Sara12-2/Smart_Cafeteria_Full_Stack_Website
cd smart-cafeteria-system# Windows
python -m venv venv
venv\Scripts\activate
# Linux/macOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file:
SECRET_KEY=your_secret_key
DEBUG=False
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DB=smart_cafeteriaCREATE DATABASE smart_cafeteria;python app.pyhttp://localhost:5000
Smart_Cafeteria_System/
β
βββ app.py
βββ config.py
βββ models.py
βββ requirements.txt
βββ .env.example
β
βββ routes/
β βββ auth.py
β βββ menu.py
β βββ cart.py
β βββ orders.py
β βββ admin.py
β
βββ templates/
β βββ index.html
β βββ menu.html
β βββ cart.html
β βββ orders.html
β βββ profile.html
β βββ login.html
β βββ register.html
β βββ admin.html
β
βββ static/
β βββ css/
β βββ js/
β βββ images/
β
βββ database/
βββ schema.sql
| Method | Endpoint |
|---|---|
| POST | /auth/login |
| POST | /auth/register |
| GET | /auth/logout |
| GET | /auth/status |
| GET | /auth/profile |
| PUT | /auth/profile |
| PUT | /auth/change-password |
| Method | Endpoint |
|---|---|
| GET | /api/menu/items |
| GET | /api/menu/categories |
| GET | /api/menu/items/popular |
| GET | /api/menu/items/featured |
| POST | /api/menu/reviews |
| Method | Endpoint |
|---|---|
| GET | /api/cart |
| POST | /api/cart/add |
| PUT | /api/cart/update |
| DELETE | /api/cart/remove |
| POST | /api/cart/checkout |
| Method | Endpoint |
|---|---|
| GET | /api/orders |
| GET | /api/orders/ |
| PUT | /api/orders//cancel |
| POST | /api/orders//reorder |
| Method | Endpoint |
|---|---|
| GET | /api/admin/stats |
| GET | /api/admin/orders |
| PUT | /api/admin/orders//status |
| POST | /api/admin/menu |
| PUT | /api/admin/menu/ |
| DELETE | /api/admin/menu/ |
| Code | Discount |
|---|---|
| WELCOME20 | 20% OFF |
| CAFE10 | 10% OFF |
| Issue | Solution |
|---|---|
| Module Not Found | Install requirements |
| Database Error | Check .env credentials |
| MySQL Connection Failed | Start MySQL Service |
| Login Failed | Verify User Exists |
| Port Already In Use | Change Flask Port |
- Image Uploads
- Real-Time Order Tracking
- Email Notifications
- PDF Invoice Generation
- Loyalty Points System
- Wishlist Feature
- Dark Mode
- Progressive Web App (PWA)
- Fork Repository
- Create Feature Branch
- Commit Changes
- Push Changes
- Open Pull Request
This project is licensed under the MIT License.
Sara Manzoor
GitHub: https://github.com/Sara12-2
If you found this project helpful, please consider giving it a star on GitHub.
Made with β and β€οΈ by Sara






