How xia0o0/smartfisio works
SmartFisio is an accessible exercise and progress-tracking application for older adults, with a therapist-facing patient view. The principal flow is authentication, exercise discovery and guided performance, then saving activity and posture data for progress review; therapists can view patient information. React pages call a FastAPI API, which applies JWT authentication and persists users, exercises, activity logs, and posture alerts in PostgreSQL. The README describes on-device MediaPipe pose monitoring, but the sampled tree does not establish how the Python vision prototypes connect to the browser workflow, so that integration is shown as documented rather than inferred from prototype code.
Main entry points: database.py Database session and engine · main.py FastAPI application · App.jsx Route and access control · api.js HTTP API client
Components 23
Web client
- Route and access control
frontend/src/App.jsx - Sign in and register
frontend/src/pages/Auth/AuthPage.jsx - Role-aware navigation
frontend/src/components/AppLayout/AppLayout.jsx - Exercise dashboard
frontend/src/pages/Dashboard/DashboardPage.jsx - Guided exercise player
frontend/src/pages/ExercisePlayer/ExercisePlayerPage.jsx - On-device pose monitoring
frontend/src/pages/ExercisePlayer/ExercisePlayerPage.jsx - Progress review
frontend/src/pages/Progress/ProgressPage.jsx - Patient dashboard
frontend/src/pages/Therapist/TherapistPage.jsx - HTTP API client
frontend/src/services/api.js
API and identity
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - JWT and role checks
backend/app/auth.py - Request and response schemas
backend/app/schemas.py - Database and security config
backend/app/config.py
Exercise and tracking
- Exercise catalog routes
backend/app/routers/exercises.py - Activity and alert routes
backend/app/routers/sessions.py - Patient routes
backend/app/routers/users.py - Initial catalog seeding
backend/app/seed.py
Persistence
- Health domain models
backend/app/models.py - Database session and engine
backend/app/database.py - PostgreSQL
Other components
- Older adult
- Physiotherapist
Connections 39
- Older adult → Route and access control: uses
README.md - Physiotherapist → Route and access control: uses
README.md - Route and access control → Sign in and register: routes to
frontend/src/App.jsx - Route and access control → Exercise dashboard: routes to
frontend/src/App.jsx - Route and access control → Guided exercise player: routes to
frontend/src/App.jsx - Route and access control → Progress review: routes to
frontend/src/App.jsx - Route and access control → Patient dashboard: routes to
frontend/src/App.jsx - Sign in and register → HTTP API client: calls
frontend/src/pages/Auth/AuthPage.jsx - Exercise dashboard → HTTP API client: calls
frontend/src/pages/Dashboard/DashboardPage.jsx - Guided exercise player → HTTP API client: calls
frontend/src/pages/ExercisePlayer/ExercisePlayerPage.jsx - Progress review → HTTP API client: calls
frontend/src/pages/Progress/ProgressPage.jsx - Patient dashboard → HTTP API client: calls
frontend/src/pages/Therapist/TherapistPage.jsx - HTTP API client → FastAPI application: requests
- FastAPI application → Authentication routes: registers
backend/app/main.py - FastAPI application → Exercise catalog routes: registers
backend/app/main.py - FastAPI application → Activity and alert routes: registers
backend/app/main.py - FastAPI application → Patient routes: registers
backend/app/main.py - FastAPI application → Initial catalog seeding: runs at startup
backend/app/main.py - Authentication routes → JWT and role checks: uses
backend/app/routers/auth.py - Authentication routes → Database session and engine: uses
backend/app/routers/auth.py - Exercise catalog routes → JWT and role checks: uses
backend/app/routers/exercises.py - Exercise catalog routes → Database session and engine: uses
backend/app/routers/exercises.py - Activity and alert routes → JWT and role checks: uses
backend/app/routers/sessions.py - Activity and alert routes → Database session and engine: uses
backend/app/routers/sessions.py - Patient routes → JWT and role checks: uses
backend/app/routers/users.py - Patient routes → Database session and engine: uses
backend/app/routers/users.py - Authentication routes → Request and response schemas: validates
backend/app/routers/auth.py - Exercise catalog routes → Request and response schemas: validates
backend/app/routers/exercises.py - Activity and alert routes → Request and response schemas: validates
backend/app/routers/sessions.py - Patient routes → Request and response schemas: validates
backend/app/routers/users.py - Initial catalog seeding → Health domain models: creates records
backend/app/seed.py - Authentication routes → Health domain models: queries users
backend/app/routers/auth.py - Activity and alert routes → Health domain models: records activity
backend/app/routers/sessions.py - Database session and engine → Database and security config: reads settings
backend/app/database.py - Database session and engine → PostgreSQL: connects
- Health domain models → Database session and engine: uses base
backend/app/models.py - FastAPI application → Database session and engine: creates tables
backend/app/main.py - Guided exercise player → On-device pose monitoring: hosts
frontend/src/pages/ExercisePlayer/ExercisePlayerPage.jsx - On-device pose monitoring → Guided exercise player: uses MediaPipe
README.md