How josepcal/tfm_rehab_followup_checkup works
FTM is a clinical rehabilitation follow-up platform: professionals manage patient diagnoses and exercise programs; patients consent and submit recordings; asynchronous analysis produces metrics for clinical reports and check-ups. The map combines the README’s documented workflow and architecture with source-index references and sampled excerpts. Several routers and the worker were not sampled, so their internal calls are not expanded beyond documented relationships.
Main entry points: App.tsx Role-based SPA · router.py Recording endpoints · worker.py Analysis worker · db.py Clinical PostgreSQL
Components 21
Web application
- Role-based SPA
web/src/App.tsx - Web authentication
web/src/auth/authClient.ts - Clinical workspace
web/src/features/diagnostics/DiagnosticWorkspace.tsx - Patient portal
web/src/features/patient/PatientPortal.tsx - Feature API facade
web/src/features/diagnostics/api.ts - HTTP client
web/src/api/http.ts
Clinical workflows
- Diagnosis and programs
api/app/clinical - Exercise catalog
api/app/catalog/router.py - Consent management
api/app/clinical/consent_router.py - Exercise reports
api/app/reporting/router.py - Follow-up check-ups
api/app/followup/router.py
Recording analysis
- Recording endpoints
api/app/recording/router.py - Analysis worker
api/app/worker.py - Metrics results
api/app/metrics/models.py
Identity and persistence
- Clinical PostgreSQL
api/app/db.py - Recording storage
api/app/storage.py - Keycloak
Privacy and oversight
- Audit and data rights
api/app/iam/router.py - AI payload design
api/app/ai/payload_service.py
Other components
- Clinician
- Patient
Connections 30
- Clinician → Role-based SPA: uses
README.md - Patient → Role-based SPA: uses
README.md - Role-based SPA → Web authentication: initializes
web/src/App.tsx - Role-based SPA → Clinical workspace: renders
web/src/App.tsx - Role-based SPA → Patient portal: renders
web/src/App.tsx - Clinical workspace → Feature API facade: uses
web/src/features/diagnostics/DiagnosticWorkspace.tsx - Patient portal → Feature API facade: uses
- Feature API facade → HTTP client: uses
- Web authentication → Keycloak: authenticates
README.md - Role-based SPA → Diagnosis and programs: requests
web/src/App.tsx - Patient → Consent management: grants consent
README.md - Clinician → Diagnosis and programs: manages diagnosis
README.md - Diagnosis and programs → Exercise catalog: configures exercises
README.md - Patient → Recording endpoints: submits recording
README.md - Recording endpoints → Recording storage: stores audio
README.md - Recording endpoints → Analysis worker: queues analysis
README.md - Analysis worker → Recording storage: downloads audio
README.md - Analysis worker → Metrics results: persists results
README.md - Clinician → Exercise reports: creates reports
README.md - Clinician → Follow-up check-ups: creates check-ups
README.md - Exercise reports → Follow-up check-ups: links reports
api/app/followup/router.py - Diagnosis and programs → Clinical PostgreSQL: persists clinical data
README.md - Recording endpoints → Clinical PostgreSQL: registers recordings
README.md - Analysis worker → Clinical PostgreSQL: consumes jobs
README.md - Metrics results → Clinical PostgreSQL: stored in
api/app/metrics/models.py - Audit and data rights → Clinical PostgreSQL: records and reads
api/app/iam/router.py - Clinician → Audit and data rights: reviews events
README.md - Patient → Audit and data rights: requests data rights
api/app/iam/router.py - Recording endpoints → Consent management: checks consent
api/app/recording/router.py - Analysis worker → AI payload design: generates insights