04 · Desktop app · Java Swing
Hospital Management System
A role-based clinic app for admins, doctors, receptionists and patients, with appointment booking that can't double-book a slot.
- Role
- Solo · schema, data layer, UI design
- Timeline
- School project · rebuilt 2026
- role workspaces
- 4
- slots a day
- 16



The problem
The original course project was a stack of separate Swing windows with SQL built by string concatenation, plain-text passwords, root credentials in the source and no schema in the repository, so it couldn't even run from a clone.
The solution
A full rewrite as one FlatLaf window with a sidebar per role, a metadata-driven JDBC data layer using prepared statements and BCrypt, and MySQL in Docker with seeded demo data. Bookings re-check the slot under a row lock inside one transaction.
Architecture
Engineering highlights
- 01
Four role workspaces
Admins, receptionists, doctors and patients get their own navigation, dashboard and permissions, and the data layer enforces the same scoping.
- 02
No double-booking
The booking locks the doctor row with SELECT … FOR UPDATE, re-checks the slot and inserts in a single transaction.
- 03
Metadata-driven CRUD
One field list per entity generates the SQL columns, the table view and the validated add / edit dialog.
- 04
Modern desktop UI
FlatLaf with the Inter font, custom Java2D charts, toasts and an animated light / dark switch.
Technologies
- Java 17
- Swing
- FlatLaf
- MigLayout
- JDBC
- MySQL 8
- BCrypt
- Maven
- Docker
- GitHub Actions