SPMS is a role-based smart parking management system built with a Spring Boot backend and a JavaFX desktop frontend. It helps parking operators manage vehicle entry and exit, track live occupancy, generate receipts, monitor revenue, and administer parking lots, tariffs, and staff accounts.
- Role-based dashboards for Administrator, Supervisor, and Guard users
- Spring Boot REST API with JavaFX desktop frontend
- Parking entry, exit, receipts, unpaid dues, occupancy, and revenue workflows
- MySQL persistence with Flyway database migrations
- Backend unit tests, frontend Selenium tests, and Postman/Newman API coverage
The project is organized as a full-stack desktop application:
backend/exposes REST APIs, business rules, persistence, reporting, and database migrationsspms-javafx/provides the JavaFX desktop client for Admin, Guard, and Supervisor userspostman/contains the Newman/Postman API collection used for automated API verification
The project now includes the documentation artifacts typically expected in a software-engineering submission:
This system is designed to solve common parking-management problems:
- manual entry and exit handling
- inconsistent parking-slot tracking
- difficulty monitoring lot occupancy across locations
- unpaid dues and weak receipt traceability
- lack of role-based operational dashboards
SPMS centralizes these workflows and makes them available through separate role-based interfaces.
- Register vehicle entry with:
- vehicle number
- mobile number
- vehicle type
- selected parking lot
- Generate entry tokens automatically
- Process vehicle exit and generate receipts
- Mark exits as paid or unpaid
- Cancel active sessions when needed
- View current lot status and active occupancy
- Check vehicle summary and unpaid-dues history
- Suggest nearest available alternative lots when a lot is full
- View active sessions and occupancy for the assigned lot
- Monitor available vs occupied slots
- View revenue summaries for the assigned lot
- Track unpaid dues
- Search complete vehicle history by vehicle number
- Export receipt data to CSV
- Update parking tariffs by vehicle type
- Create, modify, and delete guard/supervisor accounts
- Create, edit, and delete parking lots
- View global reports across all lots
- Persist monthly report summaries
SPMS supports three operational roles:
ADMINISTRATOR- manages lots, tariffs, reports, and staff accounts
SUPERVISOR- monitors a specific assigned lot and reviews reports/history
GUARD- handles entry, exit, cancellation, and lot-floor operations
The JavaFX app routes users to the correct dashboard immediately after login based on the authenticated role.
- Java 17
- Spring Boot 3.5
- Spring Web
- Spring Data JPA
- Flyway
- MySQL
- H2 (test scope)
- Lombok
- JavaFX 21
- FXML
- Jackson
- JUnit 5
- Mockito
- Selenium WebDriver
- Newman / Postman
SWE/
├── backend/ # Spring Boot REST API, services, entities, repositories, migrations
├── spms-javafx/ # JavaFX desktop client (Admin / Guard / Supervisor dashboards)
├── postman/ # Postman collection for API verification
└── README.md
controller- exposes REST endpoints under
/api/...
- exposes REST endpoints under
service- contains business logic for parking, users, tariffs, reports, and slot handling
repository- JPA repositories for persistence
model- entities such as
ParkingLot,Token,ParkingSession,Receipt,User
- entities such as
config- application configuration and seed data
db/migration- Flyway SQL migrations
controller- JavaFX controllers for Login, Guard, Supervisor, and Admin dashboards
service- client-side API wrappers for backend communication
model- frontend session state
view- FXML screens
styles- shared stylesheet
ParkingLot- lot name, location, capacity, available slots, coordinates
Vehicle- vehicle number, mobile number, vehicle type
Token- created when a vehicle enters a lot
ParkingSession- tracks active/completed/cancelled parking lifecycle
Receipt- generated on exit or cancellation
Tariff- rate-per-minute by vehicle type
User- inherited by
Administrator,Guard, andSupervisor
- inherited by
The backend uses MySQL by default and Flyway for schema/version management.
Main migration files are in:
- V1__create_schema.sql
- V2__seed_data.sql
- V3__fix_admin_password.sql
- V4__shrink_lot1_capacity.sql
- V5__backfill_lot_coordinates.sql
The application reads database configuration from environment variables:
export DB_URL=jdbc:mysql://localhost:3306/spms_db
export DB_USERNAME=root
export DB_PASSWORD='your_password'
export DB_DRIVER=com.mysql.cj.jdbc.DriverDefault backend config lives in application.properties.
When seeding is enabled, the backend creates these default users:
- Admin:
admin / changeme - Supervisor Lot 1:
sup_lot1 / sup1pass - Guard Lot 1:
guard_lot1 / guard1pass
Additional supervisors and guards are created for the other lots using the same pattern:
- Supervisor Lot N:
sup_lotN / supNpass - Guard Lot N:
guard_lotN / guardNpass
Seed logic is defined in DataInitializer.java.
From backend:
mvn spring-boot:runThe backend starts on:
http://localhost:8080
From spms-javafx:
mvn javafx:runThis opens the desktop login screen. After authentication, the user is routed to the correct dashboard by role.
- Guard enters vehicle number, mobile number, vehicle type, and lot
- Backend validates the vehicle and mobile number
- System checks for duplicate active sessions
- Token is generated
- Parking session is created
- Lot slot counts are synchronized automatically
- Guard enters the vehicle number
- Backend finds the active session
- Current fee and previous unpaid dues are calculated
- Receipt is generated
- Session is marked completed
- Available-slot count is synchronized
- Admin can create guard and supervisor users
- Admin can modify existing user details
- Admin can delete managed users
- User-role dashboards remain assignment-aware through lot mapping
The reporting module supports:
- revenue report
- active session report
- recent receipts
- vehicle history lookup
- vehicle summary/lookup
- monthly report persistence
Reports can be scoped globally or by parking lot, depending on role and endpoint.
The system includes several operational safeguards:
- vehicle number normalization, including BH-series support
- Indian mobile number normalization
- duplicate active-session prevention
- assigned-lot enforcement for guards and supervisors
- parking-lot-full handling with alternative-lot suggestions
- unpaid-dues tracking across visits
- slot-count synchronization based on active sessions
This project includes backend tests, frontend Selenium tests, and a Postman/Newman API test collection.
From backend:
./mvnw testPrerequisites:
- backend running on
http://localhost:8080 - Chrome installed
- ChromeDriver available on
PATH
From spms-javafx:
mvn -Dspms.test.url=http://localhost:8080 testInstall Newman once:
npm install -g newmanRun from repo root:
newman run postman/SPMS_API_Collection.json- Backend test suite:
74/74passing - Frontend Selenium suite:
28/28passing - Postman collection:
105 assertions,0 failed
For local verification:
- Start MySQL
- Start the backend
- Start the JavaFX client
- Run backend tests
- Run Newman collection
- Run Selenium tests
- The backend defaults to MySQL and Flyway-managed schema validation.
- Selenium may print Chrome CDP version warnings; these were non-blocking in successful test runs.
- The slot-management logic was hardened so lot availability is synchronized from active sessions rather than relying only on blind increment/decrement updates.
Possible next enhancements for the project:
- JWT/session security hardening
- audit trail for admin actions
- richer analytics dashboards
- PDF receipt export
- notification support for unpaid dues
- containerized local setup with Docker
If you are using this repository for academic submission, this README can serve as the main project overview. You can additionally attach:
- screenshots of the three dashboards
- ER diagram / class diagram
- API endpoint summary
- testing evidence screenshots



