Skip to content

Sara12-2/Smart_Cafeteria_Full_Stack_Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β˜• Smart Cafeteria System

Version Python Flask MySQL License

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.


πŸ“Έ Screenshots

🏠 Homepage

Homepage

🍽️ Menu Page

Menu Page

πŸ›’ Cart Page

Cart Page

πŸ” Login Page

Login Page

πŸ“ Register Page

Register Page

πŸ‘€ Profile Page

Profile Page

πŸ“Š Admin Dashboard

Admin Dashboard

✨ Features

πŸ‘€ User Features

  • User Registration & Login
  • Profile Management
  • Change Password
  • Order History Tracking
  • Reorder Previous Orders
  • Food Ratings & Reviews
  • Coupon System

πŸ›’ Shopping Features

  • Browse Menu by Categories
  • Search Food Items
  • Shopping Cart Management
  • Checkout System
  • Multiple Payment Methods
  • Order Confirmation

πŸ‘‘ Admin Features

  • Dashboard Analytics
  • Revenue Statistics
  • Order Management
  • Menu Item CRUD Operations
  • Category Management
  • User Management
  • Search & Filtering

🎨 UI/UX

  • Coffee-Themed Modern Design
  • Fully Responsive Layout
  • Toast Notifications
  • Loading Skeletons
  • Featured Item Badges
  • Star Rating System

πŸ› οΈ Tech Stack

Backend

  • Flask
  • Flask-SQLAlchemy
  • Flask-Login
  • Flask-CORS
  • PyMySQL
  • Werkzeug

Frontend

  • HTML5
  • CSS3
  • JavaScript
  • Bootstrap 5
  • jQuery
  • Chart.js
  • Font Awesome

Database

  • MySQL 8.0+

πŸ“‚ Database Tables

  • users
  • categories
  • menu_items
  • orders
  • order_items
  • cart
  • reviews

πŸš€ Installation

1. Clone Repository

git clone https://github.com/Sara12-2/Smart_Cafeteria_Full_Stack_Website
cd smart-cafeteria-system

2. Create Virtual Environment

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/macOS
python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file:

SECRET_KEY=your_secret_key
DEBUG=False

MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DB=smart_cafeteria

5. Create Database

CREATE DATABASE smart_cafeteria;

6. Run Application

python app.py

7. Open Browser

http://localhost:5000

πŸ“ Project Structure

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

πŸ”— API Endpoints

Authentication

Method Endpoint
POST /auth/login
POST /auth/register
GET /auth/logout
GET /auth/status
GET /auth/profile
PUT /auth/profile
PUT /auth/change-password

Menu

Method Endpoint
GET /api/menu/items
GET /api/menu/categories
GET /api/menu/items/popular
GET /api/menu/items/featured
POST /api/menu/reviews

Cart

Method Endpoint
GET /api/cart
POST /api/cart/add
PUT /api/cart/update
DELETE /api/cart/remove
POST /api/cart/checkout

Orders

Method Endpoint
GET /api/orders
GET /api/orders/
PUT /api/orders//cancel
POST /api/orders//reorder

Admin

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/

πŸ’³ Coupon Codes

Code Discount
WELCOME20 20% OFF
CAFE10 10% OFF

πŸ”§ Troubleshooting

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

πŸš€ Future Enhancements

  • Image Uploads
  • Real-Time Order Tracking
  • Email Notifications
  • PDF Invoice Generation
  • Loyalty Points System
  • Wishlist Feature
  • Dark Mode
  • Progressive Web App (PWA)

🀝 Contributing

  1. Fork Repository
  2. Create Feature Branch
  3. Commit Changes
  4. Push Changes
  5. Open Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘©β€πŸ’» Author

Sara Manzoor

GitHub: https://github.com/Sara12-2


⭐ Support

If you found this project helpful, please consider giving it a star on GitHub.

Made with β˜• and ❀️ by Sara

About

Smart Cafeteria System is a full-stack cafeteria management platform built with Flask and MySQL that enables users to browse menus, place orders, manage carts, and track order history.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors