Skip to content
GET /projects

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
hospital-management-system.app
Hospital Management System admin dashboard
hospital-management-system.app
Four-step appointment booking with free slots
Four-step appointment booking with free slots
hospital-management-system.app
Dashboard in dark mode
Dashboard in dark mode

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

off the UI threadprepared SQLSwing UI (FlatLaf)SwingWorkerJDBC repositoriesMySQL 8

Engineering highlights

  1. 01

    Four role workspaces

    Admins, receptionists, doctors and patients get their own navigation, dashboard and permissions, and the data layer enforces the same scoping.

  2. 02

    No double-booking

    The booking locks the doctor row with SELECT … FOR UPDATE, re-checks the slot and inserts in a single transaction.

  3. 03

    Metadata-driven CRUD

    One field list per entity generates the SQL columns, the table view and the validated add / edit dialog.

  4. 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
next case fileTradeLicense