A comprehensive Python-based system designed to streamline food ordering and management processes within educational institutions. This system provides separate interfaces for students and administrators, offering features like digital wallet integration, food ordering, and inventory management.
- User Registration & Authentication: Secure login system for students
- Browse Menu: View available food items with descriptions and prices
- Cart Management: Add items to cart, adjust quantities, and place orders
- Multiple Payment Options:
- Digital wallet (requires wallet password)
- Cash payment with queue number system
- Order History: Track past orders and expenditures
- Wallet Management: Check wallet balance
- Menu Management: Add, update, or remove food items
- Price Management: Update prices as needed
- Student Wallet Management: Add or subtract funds from student wallets
The system follows object-oriented design principles with classes including:
User: Base class with common user attributesStudent: Extended user class with student-specific functionalityAdmin: Extended user class with administrative privilegesFoodItem: Manages food item detailsMenu: Handles the collection of food itemsCart: Manages the shopping cart experienceOrder: Processes and records orders
The system relies on several text files for data persistence:
users.txt: Stores user credentials and rolesstudents.txt: Contains student-specific details including wallet passwordswallet.txt: Maintains wallet balances for each studentfood_items.txt: Stores the menu items with prices and availabilitybill_history.txt: Records all transactions and order details
-
Clone the repository to your local machine:
git clone https://github.com/your-username/canteen-management-system.git -
Navigate to the project directory:
cd canteen-management-system -
Update the
BASE_DIRin the script to your project location:BASE_DIR = "/path/to/your/project/directory"
-
Run the application:
python foodcanteenupdated.py
- Register a new account or log in with existing credentials
- Browse the available menu items
- Add desired items to your cart
- Place an order using wallet or cash payment
- For wallet payment: Enter your wallet password
- For cash payment: Note the generated queue number and present it at the canteen counter
- Log in with admin credentials
- Manage menu items (add/remove/update)
- Update student wallet balances as needed
- Students must have sufficient balance in their digital wallet
- Transactions require wallet password verification
- Balance is automatically deducted upon successful order placement
- System generates a unique 4-digit queue number
- Students present the queue number at the counter
- Payment is made in person and food is collected at the counter
- Python 3.6+
- Standard Python libraries (os, random)
The system includes custom exception classes:
CanteenException: Base exception classInsufficientBalanceException: For wallet payment failuresInvalidPasswordException: For authentication failuresUserNotFoundException: For login attempts with non-existent usersUserAlreadyExistsException: For registration with existing usernames
- Password protection for user accounts
- Separate wallet passwords for financial transactions
- File-based data persistence for all transactions and user data
- Graphical user interface (GUI)
- Enhanced reporting for administrators
- Menu categorization
- Promotions and discounts
- Feedback system for food items
- Notification system for order status updates
This project is licensed under the Apache License 2.0 - see the Apache License 2.0 for details.