Back to work
01 / Case study

Doctor Queue

A real-time clinic queue management platform built to make patient flow visible, predictable and easier to operate.

JavaSpring BootReactPostgreSQLJWTSSE

The problem

Patients should not have to guess when they will be seen, and clinic staff should not have to coordinate every queue transition manually. The product turns a physical waiting line into an explicit digital workflow.

The outcome

The result is an end-to-end system where authenticated users can join a clinic queue, receive a token, see their current position and follow queue progression in real time.

The approach

I designed the system around clear domain entities and an explicit queue state machine. REST APIs handle application operations while Server-Sent Events provide a live update channel to the patient experience.

React frontend ↓ REST APIs + SSE ↓ Spring Boot controllers ↓ Service / business logic ↓ JPA / Hibernate ↓ PostgreSQL

What I built

JWT authentication
Clinic & doctor management
Patient queue joining
Token generation
Next-patient workflow
WAITING → SERVING → COMPLETED
Patient dashboard
Patients-ahead visibility
Server-Sent Events
Ubuntu + Nginx deployment
BackendSpring Boot + JPA

Layered services and explicit business rules.

SecurityJWT authentication

Protected API access and user-aware flows.

Real timeServer-Sent Events

Live queue updates without constant polling.

DebuggingRoot-cause first

Browser, API, database and server traced together.

Real debugging

The strongest part of this project was learning from the failures. These were not theoretical edge cases—they were the integration problems that appeared while getting the system to work end to end.

CORS

The browser was rejecting API requests because the frontend origin did not match the backend CORS configuration. I traced the request path, updated the Spring configuration and verified the response headers directly.

Authentication state

Some frontend calls had a JWT while others did not. I inspected local storage, request behavior and protected endpoints to distinguish an authentication problem from a backend failure.

Queue restoration

The patient dashboard attempted to restore a queue state that the API did not accept in every situation. Instead of masking the 400 response, I traced the endpoint contract and frontend restoration flow.

Real-time updates

SSE introduced another moving part: the browser connection, endpoint mapping and server-side event publishing all had to agree. Debugging the 404 helped isolate the routing/configuration issue.

Deployment

The application was taken beyond localhost and configured on an Ubuntu server with PostgreSQL and Nginx. That exposed another layer of engineering concerns: server configuration, API origins, process behavior and production networking.

01Ubuntu server
02PostgreSQL database
03Spring Boot application on port 8080
04Nginx reverse proxy / web serving
05Production frontend build
06CORS and API configuration

What I learned

Building this project reinforced that real software development is not just writing the happy path. A working system comes from understanding contracts between browser, API, database and server, then tracing failures back to their root cause.