You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone / open projectcd healthcare-platform
# Start all 5 services with one command
docker-compose up --build
# Access:# Frontend: http://localhost:3000# Backend API: http://localhost:8080# Swagger UI: http://localhost:8080/swagger-ui.html# RabbitMQ Mgmt UI: http://localhost:15672 (guest/guest)# Python Worker: http://localhost:8001/health
⏳ First build takes ~3-5 minutes (Maven downloads dependencies). Subsequent builds are fast.
🛠 Tech Stack
Layer
Technology
Backend Core
Spring Boot 3.2 (Java 17)
Worker Service
Python 3.11 + FastAPI
Messaging
RabbitMQ 3.13
Database
PostgreSQL 15
Frontend
Vite + React 18 + TypeScript
Auth
JWT (jjwt 0.12.5) + BCrypt
API Docs
SpringDoc OpenAPI (Swagger)
Containerization
Docker + Docker Compose
📋 API Reference
Auth (Public)
Method
Endpoint
Description
POST
/api/auth/register
Register new user
POST
/api/auth/login
Login → returns JWT
Slots (JWT Required)
Method
Endpoint
Description
GET
/api/slots/doctors
List all doctors
GET
/api/slots/available?doctorId=&date=
Available slots for doctor+date
Appointments (JWT Required)
Method
Endpoint
Description
POST
/api/appointments
Book appointment {"slotId": 1}
DELETE
/api/appointments/{id}
Cancel appointment
GET
/api/appointments/my
My appointments + logs
GET
/api/appointments/{id}
Appointment detail
Internal (Python Worker)
Method
Endpoint
Description
PUT
/api/internal/appointments/status
Update appointment status
🔄 End-to-End Flow
1. User registers/logs in → gets JWT
2. Frontend fetches available slots → selects doctor + date + time
3. User books appointment → Spring Boot saves to DB (status: PENDING)
4. Spring Boot publishes "appointment.created" event to RabbitMQ
5. Python worker consumes event → logs notification to console + DB
6. Python worker calls Spring Boot /api/internal/appointments/status
7. Appointment status updated to CONFIRMED in DB
8. Frontend Live Event Feed picks up status change (polls every 4s)
9. User sees real-time: PENDING → CONFIRMED