The Restaurant Management System is a Python-based application designed to help restaurant owners and managers efficiently manage their menu, track customer orders, and generate reports. The system uses a MySQL database to store customer and billing information and provides an intuitive interface for both administrators and customers.
- Add, modify, and delete menu items.
- Generate reports on total sales, bills, and revenue.
- Manage customer details and track orders.
- View tax details and daily sales.
- Register as a new customer and log in.
- Browse the menu and place orders.
- Generate bills for purchases.
- Python (Core application logic)
- MySQL (Database for storing customer and order details)
- Pickle (File handling for menu data)
- Matplotlib (Graphical reports and visualizations)
- Tabulate (Formatted table output)
git clone https://github.com/lonecoder7/restaurant-management-system.git
cd restaurant-management-system
Ensure you have Python installed, then run the following command to install dependencies:
pip install mysql-connector-python matplotlib tabulate
- Start your MySQL server.
- Create a new database named
restra
:
CREATE DATABASE restra;
USE restra;
- Create the required tables:
CREATE TABLE bills (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT,
amount DECIMAL(10,2),
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE cos (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
phone VARCHAR(15) UNIQUE
);
CREATE TABLE coss (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT,
order_details TEXT,
total_amount DECIMAL(10,2)
);
CREATE TABLE tr (
id INT AUTO_INCREMENT PRIMARY KEY,
transaction_details TEXT
);
CREATE TABLE tax (
id INT AUTO_INCREMENT PRIMARY KEY,
tax_rate DECIMAL(5,2)
);
- Update the MySQL connection settings in
restaurant_management_system.py
with your credentials:
conn = mysql.connector.connect(
host="your_host",
user="your_username",
password="your_password",
database="restra"
)
python restaurant_management_system.py
- CEO Password:
112233
- Manager Password:
102030
- Register as a new customer or log in using your customer ID or phone number.
- View available menu items.
- Select items and place an order.
- Generate a bill after placing an order.
- Ensure that the MySQL server is running before starting the application.
- The application uses a restra.dat file to store menu items. Keep this file in the same directory as the script.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make changes and commit (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to all contributors and the open-source community for their support!