A Python-based web application to manage garage operations — add customers, track services, generate printable bills, and view service history.
| Field | Details |
|---|---|
| Project Name | Garage Management System |
| Created On | April 3, 2025 |
| Version | 1.0.0 |
| Tech Stack | Python (Flask), MySQL, HTML/CSS/JS, Bootstrap 5 |
| Status | Active |
The Garage Management System is a Flask web application designed for garage/auto-repair shops. It allows the garage owner to:
- Log in securely
- Manage customer and vehicle records
- Add multiple services per customer with auto-calculated totals
- View full service history per customer
- Generate and print professional bills with garage branding
- Owner-only access via a username & password login page
- Protects all routes from unauthorized access
- Add Customer — Register customer name, phone number, vehicle number, and vehicle model
- Edit Customer — Update any existing customer details
- Delete Customer — Remove a customer record
- Search — Search customers by vehicle number from the main dashboard
- Add multiple service entries per customer in one form
- Each service entry includes:
- Date of service
- Work Done (description)
- Cost (in ₹)
- JavaScript auto-calculates the total cost live as you type
- Supports adding unlimited service rows with "+ Add More Work"
- View full service history for any customer
- Displays all past services in a table: Date, Work Done, Cost
- Shows cumulative Total Amount at the bottom
- Generates a clean, printable bill page per customer
- Bill includes:
- Garage branding — Logo, Name, Owner, Phone, Address
- Customer details — Name, Phone, Vehicle Number
- Services table — Date, Work Done, Cost for all services
- Grand Total
- One-click Print button (
window.print())
| Layer | Technology |
|---|---|
| Backend | Python (Flask) |
| Frontend | HTML5, CSS3, JavaScript |
| UI Library | Bootstrap 5.3 |
| Database | MySQL |
| Templating | Jinja2 (Flask templates) |
garage-management-system/
│
├── templates/ # Jinja2 HTML Templates
│ ├── base.html # Base layout (navbar, flash messages)
│ ├── login.html # Login page
│ ├── index.html # Customer dashboard with search
│ ├── add_customer.html # Add new customer form
│ ├── edit_customer.html # Edit existing customer form
│ ├── add_service.html # Add service(s) for a customer
│ ├── history.html # Service history per customer
│ └── bill.html # Printable bill page
│
├── static/
│ └── <garage_logo> # Garage logo image (used in bill)
│
├── app.py # Main Flask application & routes
├── config.py # DB config, garage info, login creds
├── requirements.txt # Python dependencies
└── README.md
-- Customers Table
CREATE TABLE customers (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
phone VARCHAR(15) NOT NULL,
vehicle_no VARCHAR(50) NOT NULL,
model VARCHAR(100)
);
-- Services Table
CREATE TABLE services (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT NOT NULL,
service_date DATE NOT NULL,
description TEXT NOT NULL,
cost DECIMAL(10, 2) NOT NULL,
FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE CASCADE
);| Route | Method | Description |
|---|---|---|
/login |
GET, POST | Login page |
/logout |
GET | Logout and redirect to login |
/ |
GET | Customer dashboard (with search) |
/add |
GET, POST | Add new customer |
/edit/<id> |
GET, POST | Edit existing customer |
/delete/<id> |
GET | Delete customer |
/add_service/<id> |
GET, POST | Add service entries for a customer |
/history/<id> |
GET | View service history of a customer |
/bill/<id> |
GET | View & print bill for a customer |
- Python 3.8+
- MySQL 8.0+
- pip
git clone https://github.com/your-username/garage-management-system.git
cd garage-management-systempip install -r requirements.txtCREATE DATABASE garage_db;
USE garage_db;
CREATE TABLE customers (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
phone VARCHAR(15) NOT NULL,
vehicle_no VARCHAR(50) NOT NULL,
model VARCHAR(100)
);
CREATE TABLE services (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT NOT NULL,
service_date DATE NOT NULL,
description TEXT NOT NULL,
cost DECIMAL(10,2) NOT NULL,
FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE CASCADE
);Update config.py with your details:
# Database
DB_HOST = "localhost"
DB_USER = "root"
DB_PASSWORD = "your_password"
DB_NAME = "garage_db"
# Login credentials
ADMIN_USERNAME = "admin"
ADMIN_PASSWORD = "your_password"
# Garage Info (used in bill)
GARAGE = {
"name" : "Your Garage Name",
"owner" : "Owner Name",
"phone" : "9876543210",
"address" : "Your Address",
"logo" : "logo.png" # Place logo in /static/
}python app.pyVisit: http://localhost:5000
| Page | Description |
|---|---|
login.html |
Simple login form with username & password |
index.html |
Dashboard table of all customers with action buttons |
add_customer |
Form to register a new customer + vehicle |
edit_customer |
Pre-filled form to update customer details |
add_service |
Dynamic form — add multiple services, live total in ₹ |
history |
Table of all past services with total for a customer |
bill |
Print-ready bill with garage logo, details & services |
The add_service.html uses vanilla JS to dynamically add new service rows and calculate the running total in real time:
function addRow() {
// Creates a new row with description + cost inputs
}
function calculateTotal() {
// Sums all .cost inputs and updates #total live
}The bill.html is a standalone page (no base.html) with print-optimized CSS. The print button triggers:
window.print()base.html displays Flask flash messages as Bootstrap alerts across all pages automatically.
- Password hashing for secure login (bcrypt)
- SMS/WhatsApp bill sharing for customers
- Dashboard with monthly revenue analytics
- Multiple garage/branch support
- Export bill as PDF directly
Your Name Shaikh Mazin | Aspiring Data Engineer 📧 your-skmazin9@gmail.com 🔗 https://github.com/ShaikhMazin