A modern web-based cafeteria ordering system built using Python and Streamlit. The system allows users to browse a visually rich menu, add items to a shopping cart, and generate professional digital receipts.
This Cafeteria System has been upgraded to a full-featured web application. It moves away from the legacy Tkinter interface to a modern, dark-themed UI powered by Streamlit. It features a robust database backend, AI-generated food images, and a seamless checkout experience.
- 🎨 Modern Dark UI: Custom-styled interface with a sleek, restaurant-grade aesthetic.
- 📸 AI-Generated Visuals: Over 100+ menu items, each with a unique, high-quality image generated by AI (Flux model).
- 🧭 Horizontal Navigation: Always-accessible top menu bar for Mains, Sides, Beverages, Desserts, and Cart.
- 🛒 Dynamic Cart: Real-time total calculation with quantity adjustments.
- 🧾 Digital Receipts: Generate, view, and print professional bills directly from the app.
- 📜 Order History: Track past orders and reprint receipts anytime via the database.
- � Docker Support: Fully containerized for easy deployment and consistent environments.
- �💾 Persistent Database: Powered by SQLite & SQLAlchemy to store all menu items and transaction history.
| Tech | Description |
|---|---|
| Python | Core programming language |
| Streamlit | Modern Web UI framework |
| Docker | Containerization platform |
| SQLite | Relational Database |
| SQLAlchemy | ORM for database management |
| Pollinations.ai | API for real-time AI image generation |
The easiest way to run the app without installing dependencies manually.
- Clone the repository:
git clone https://github.com/yourusername/cafeteria-system.git cd cafeteria-system - Run with Docker Compose:
The app will be available at
docker-compose up --build
http://localhost:8501
If you prefer running it natively on your machine:
-
Clone the repository
git clone https://github.com/yourusername/cafeteria-system.git cd cafeteria-system -
Install Dependencies
pip install -r streamlit_app/requirements.txt
-
Run the Application
streamlit run streamlit_app/app.py
The app will automatically open in your browser at
http://localhost:8501
- Browse Menu: Use the top navigation bar to switch between categories (Mains, Sides, etc.).
- Add to Cart: Click "Add to Cart" on any item card. Adjust quantity as needed.
- Review Cart: Go to the "Cart" tab to see your summary.
- Get Bill: Toggle "Show Bill Preview" to see the receipt before confirming.
- Checkout: Click "Confirm Order" to save to the database.
- History: Use the "Orders" tab to view past transactions.
📦 cafeteria-system/
├── backend/
│ ├── database.py # Database connection
│ ├── models.py # SQLAlchemy models (Order, MenuItem)
│ └── seed.py # Script to populate DB with AI images
├── streamlit_app/
│ ├── app.py # Main Streamlit application
│ ├── requirements.txt # Project dependencies
│ └── styles.css # Custom CSS for dark theme & receipts
├── cafeteria.db # SQLite Database file
├── Dockerfile # Docker container configuration
├── docker-compose.yml # Docker Compose orchestration
├── README.md
└── LICENSE
- Interactive walkthrough is available in Cafeteria Billing System
- Full project details on Hashnode Comprehensive documentation for this project is available on Hashnode.
At present, this README serves as the primary source of documentation.
This project is distributed under the MIT License.
For detailed licensing information, please refer to the LICENSE file included in this repository.
Python & Java Developer | Cloud & NoSQL Enthusiast
- Python & Java Development – Automation, Backend Systems, APIs, and OOP
- Cloud & NoSQL – Docker, AWS, MongoDB, Firebase Firestore
- UI/UX Design – Creating user-focused, scalable, and visually engaging applications
Passionate about creating robust applications and leveraging cloud technologies for high-performance solutions.
Feel free to connect for tech collaborations, open-source contributions, or brainstorming innovative solutions!