A web-based parking management system built with Flask for managing parking lots and user bookings. This project demonstrates CRUD operations, user authentication, and basic admin functionality.
Built with:
- Python
- Flask
- Bootstrap
- SQLite
- User Registration & Login - Basic signup and login forms with validation
- Search Parking Lots - Find parking by location or name
- Book Parking Spots - View available spots and make bookings
- Release Spots - End parking session with cost calculation
- View Statistics - Basic dashboard showing booking history and spending
- Booking History - List of past bookings
- Manage Parking Lots - Add, edit, and delete parking lots
- Spot Management - Spots are created automatically when adding lots
- View Individual Spots - Check spot details and release if needed
- User Overview - See all registered users and their booking info
- Basic Reports - View system statistics and recent bookings
- Search Functionality - Filter parking lots by name or location
- User Dashboard - Personal booking stats and available lots
- User Charts Page - Simple statistics display with Bootstrap cards
- Admin Dashboard - Overview of all parking lots and spots
- Admin Reports - Basic analytics and booking history
- Flask - Python web framework
- SQLAlchemy - Database ORM for managing data
- WTForms - Form handling and validation
- SQLite - Local database file
- HTML5 & CSS3 - Basic web structure
- Bootstrap 5.3 - CSS framework for styling
-
Activate the virtual environment (if using one):
.\Scripts\activate
-
Install required packages:
pip install -r requirements.txt
-
Run the application:
python app.py
- Open your web browser and go to:
http://localhost:5000 - The application will automatically:
- Create the SQLite database (
instance/parking.db) - Initialize sample parking lots
- Create an admin user: [email protected] / admin123
- Create the SQLite database (
- Admin Access:
- Email:
[email protected] - Password:
admin123
- Email:
- Regular Users: Create new accounts via the signup page
- Press
Ctrl + Cin the terminal to stop the Flask development server
GET/POST /- Login pageGET/POST /signup- User registrationGET /logout- Logout and clear session
GET/POST /user-dashboard- Main user page with booking functionalityGET /user-charts- User statistics pagePOST /release-parking- Release current parking spot
GET /admin-dashboard- Admin main pageGET /admin/users- List all usersGET /admin/reports- System reports and statisticsPOST /add-parking-lot- Create new parking lotGET/POST /edit-parking-lot/<id>- Edit existing parking lotPOST /delete-parking-lot/<id>- Remove parking lotPOST /release-spot/<id>- Admin release any spotGET /view-parking-spot/<id>- Individual spot detailsPOST /edit-spot-name/<id>- Change spot name/numberPOST /change-spot-status/<id>- Toggle spot availability
id(Primary Key)email(Unique identifier)password(Plain text - for demo purposes)fullnameaddressphonepincode
id(Primary Key)namelocationtotal_spotsavailable_spotsprice_per_hour
id(Primary Key)spot_number(e.g., A01, A02)is_occupied(Boolean)parking_lot_id(Foreign Key)
id(Primary Key)vehicle_numberbooking_timerelease_timestatus(active/completed/cancelled)total_costuser_id(Foreign Key)parking_spot_id(Foreign Key)parking_lot_id(Foreign Key)
- When you create a parking lot, spots are automatically generated (A01, A02, etc.)
- Removing lots only works if they're not currently occupied in any spot
- Each spot tracks its occupied status
- Users select a parking lot from the list
- System shows available spots for that lot
- User picks a spot and enters vehicle number
- Spot becomes occupied and unavailable to others
- Cost calculated when user releases the spot
- Each parking lot has its own hourly rate
- Minimum charge is 1 hour
- Final cost = hourly rate × hours parked (rounded up)
- First registered user becomes admin automatically
- Admins can manage all parking lots and spots
- Can view all user information and booking history
- Can manually release any occupied spot
- User dashboard shows total bookings and spending
- Admin reports show system-wide stats
- Simple counting and summation of database records