A comprehensive Flask-based web application for managing automotive workshop operations including customers, cars, and services.
Created by: Saif Fadhil & Abdullah razzaq
Date: 2025
Technology Stack: Python, Flask, SQLite, HTML/CSS, JavaScript, Bootstrap
This project demonstrates modern web development practices, security implementation, and business logic for automotive workshop management. Built with industry-standard security measures and responsive design principles.
- User Authentication: Secure login system with role-based access control
- Customer Management: Add and manage customer information
- Car Management: Track customer vehicles with detailed information
- Service Management: Create and track service requests with status updates
- Reporting: Comprehensive reports for administrators
- Responsive Design: Modern UI with Bootstrap and custom styling
- Environment variable support for sensitive configuration
- Input validation and sanitization
- SQL injection prevention with parameterized queries
- Session management with proper security settings
- Role-based access control
- Comprehensive error handling and logging
-
Clone the repository
git clone https://github.com/sa05e60/car-workshop-sys.git cd workshop-management-system -
Create a virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables (optional)
# Create a .env file SECRET_KEY=your-secret-key-here JWT_SECRET_KEY=your-jwt-secret-key-here FLASK_ENV=development FLASK_DEBUG=True -
Run the application
python app.py
The application will be available at http://localhost:5000
The system creates two default users on first run:
-
Admin User:
- Username:
abdullah - Password:
19971997 - Role:
admin
- Username:
-
Employee User:
- Username:
saif_user - Password:
saif2079 - Role:
user
- Username:
id: Primary keyusername: Unique usernamepassword: Hashed passwordrole: User role (admin/user)email: User email (optional)created_at: Account creation timestamplast_login: Last login timestamp
id: Primary keyname: Customer namephone: Phone numberemail: Email address (optional)address: Address (optional)created_at: Record creation timestampupdated_at: Last update timestamp
id: Primary keyname: Car name/brandmodel: Car modelyear: Manufacturing yearengine_type: Engine typecustomer_id: Foreign key to customerslicense_plate: License plate number (optional)vin: Vehicle identification number (optional)created_at: Record creation timestampupdated_at: Last update timestamp
id: Primary keytype: Service typecost: Service coststatus: Service status (Pending/In Progress/Completed/Cancelled)car_id: Foreign key to carsdescription: Service description (optional)start_date: Service start dateend_date: Service completion date (optional)created_at: Record creation timestampupdated_at: Last update timestamp
GET /- Redirects to loginGET/POST /login- User authenticationGET /dashboard- Main dashboard (requires login)GET /logout- User logoutGET/POST /customers- Customer management (requires login)GET/POST /cars- Car management (requires login)GET/POST /services- Service management (requires login)POST /end_service/<id>- Complete a service (requires login)POST /delete_service/<id>- Delete a service (requires admin)GET /report- Service reports (requires admin)
The application supports different environments through the config.py file:
- Development: Debug mode enabled, detailed logging
- Production: Security-focused settings, minimal logging
- Testing: Test database, CSRF disabled
Set the FLASK_ENV environment variable to switch between configurations.
- Password Hashing: All passwords are hashed using Werkzeug's security functions
- Session Management: Secure session handling with configurable timeouts
- Input Validation: Comprehensive validation for all user inputs
- SQL Injection Prevention: Parameterized queries throughout the application
- Access Control: Role-based permissions for different operations
- Error Handling: Graceful error handling without exposing sensitive information
The application includes comprehensive logging for:
- User authentication events
- Database operations
- Error tracking
- Security events
Logs are written to the console and can be configured through environment variables.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
NONE