How williamsjohnetanami/clinic-flow works
VitaFlow is a campus-clinic patient-flow system: patients and staff use role-specific web screens to authenticate, manage appointments and walk-ins, operate the queue, and view live status and analytics. The frontend’s API client is the HTTP boundary to an Express backend, whose API router dispatches server-side work. The route inventory and product capabilities are documented in the source index and landing-page excerpt; unsampled route and service internals limit confidence about their exact calls, so those links are omitted or marked unverified.
Main entry points: routeTree.gen.ts Route registry · routes API router · queue.service.ts Queue service · client.ts HTTP API client
Components 28
Web experience
- Web router
src/router.tsx - Route registry
src/routeTree.gen.ts - Clinic landing
src/routes/index.tsx - Sign-in screen
src/routes/auth.tsx - Staff workspaces
src/routes/admin.tsx - Appointments screen
src/routes/appointments.tsx - Patient workspace
src/routes/patient.tsx - Doctor workspace
src/routes/doctor.tsx - Reception workspace
src/routes/reception.tsx - Live queue board
src/routes/display.tsx
Identity and API
- Session handling
src/lib/auth/context.tsx - HTTP API client
src/lib/api/client.ts
Clinic operations
- Queue controls
src/components/queue - Queue state
src/lib/queue/store.ts - Queue analytics
src/lib/queue/analytics.ts - Appointment state
src/lib/appointments
Backend services
- API router
server/src/routes - Authentication service
server/src/services/auth.service.ts - Queue controller
server/src/controllers/queue.controller.ts - Queue service
server/src/queue/queue.service.ts - Priority ordering
server/src/queue/queue-ordering.ts - Token generation
server/src/queue/token-counter.ts - Appointment service
server/src/services/appointment.service.ts - Patient service
server/src/services/patient.service.ts - Notifications
server/src/services/notification.service.ts
Other components
- Clinic users
- Application database
- VitaFlow API
Connections 28
- Clinic users → Web router: uses
src/router.tsx - Web router → Route registry: loads routes
src/router.tsx - Route registry → Clinic landing: registers
src/routeTree.gen.ts - Route registry → Sign-in screen: registers
src/routeTree.gen.ts - Route registry → Staff workspaces: registers
src/routeTree.gen.ts - Route registry → Appointments screen: registers
src/routeTree.gen.ts - Route registry → Patient workspace: registers
src/routeTree.gen.ts - Route registry → Doctor workspace: registers
src/routeTree.gen.ts - Route registry → Reception workspace: registers
src/routeTree.gen.ts - Route registry → Live queue board: registers
src/routeTree.gen.ts - Sign-in screen → Session handling: uses
src/routes/auth.tsx - Session handling → HTTP API client: calls auth
src/lib/auth/context.tsx - HTTP API client → VitaFlow API: sends HTTP requests
src/lib/api/client.ts - VitaFlow API → API router: dispatches API requests
- API router → Authentication service: dispatches auth
- API router → Queue controller: dispatches queue
- Queue controller → Queue service: delegates queue work
- Queue service → Priority ordering: uses ordering
server/src/queue/queue.service.ts - Queue service → Token generation: uses token counter
server/src/queue/queue.service.ts - API router → Appointment service: dispatches appointments
- API router → Patient service: dispatches patient work
- API router → Notifications: dispatches notifications
- Queue controls → Queue state: uses queue state
- Queue analytics → Queue state: analyzes queue state
- Appointment state → HTTP API client: requests appointment data
- Queue state → HTTP API client: requests queue data
- Queue service → Application database: reads and writes
- Appointment service → Application database: reads and writes