How samrat-anand/medivault works
MediVault AI is currently an authentication and patient-profile application with health checks and frontend shells for future medical-record, timeline, appointment, and reminder features. The implemented user workflow is registration or login, cookie-based session establishment, protected access, and viewing or editing a profile. README-described future capabilities are shown as placeholders, not implemented processing stages. Relationships are limited to source-index references and README statements; several UI-to-service links are therefore omitted.
Main entry points: dependencies.py Session dependencies · auth_service.py Authentication service · auth.py Authentication routes · router.py Versioned API router
Components 28
Patient interface
- Application routes
frontend/src/App.tsx - Login and register
frontend/src/pages/LoginPage.tsx - Patient profile page
frontend/src/pages/ProfilePage.tsx - Dashboard
frontend/src/pages/DashboardPage.tsx - Records and reminders shells
frontend/src/components/PlaceholderModule.tsx - Session context
frontend/src/context/AuthContext.tsx - API client
frontend/src/services/apiClient.ts - Auth client
frontend/src/services/authService.ts - Profile client
frontend/src/services/profileService.ts - Backend status widget
frontend/src/components/BackendStatus.tsx - Health client
frontend/src/services/healthService.ts
API boundary
- FastAPI application
backend/app/main.py - Versioned API router
backend/app/api/router.py - Authentication routes
backend/app/api/routes/auth.py - Profile routes
backend/app/api/routes/profile.py - Health routes
backend/app/api/routes/health.py
Identity and profiles
- Session dependencies
backend/app/api/dependencies.py - Authentication service
backend/app/services/auth_service.py - Profile service
backend/app/services/profile_service.py - Token and password security
backend/app/core/security.py - User account
backend/app/models/user.py - Patient profile
backend/app/models/patient_profile.py - Revoked tokens
backend/app/models/revoked_token.py
Runtime and health
- PostgreSQL
- Database sessions
backend/app/db/session.py - Application settings
backend/app/core/config.py - Health and root responses
backend/app/services/health_service.py
Other components
- Patient
Connections 33
- Patient → Application routes: uses
README.md - FastAPI application → Versioned API router: mounts
backend/app/main.py - Versioned API router → Authentication routes: registers
backend/app/api/router.py - Versioned API router → Profile routes: registers
backend/app/api/router.py - Versioned API router → Health routes: registers
backend/app/api/router.py - Authentication routes → Authentication service: calls
backend/app/api/routes/auth.py - Authentication routes → Session dependencies: uses
backend/app/api/routes/auth.py - Authentication service → Token and password security: hashes and verifies
backend/app/services/auth_service.py - Authentication service → User account: queries and creates
backend/app/services/auth_service.py - Authentication service → Patient profile: creates
backend/app/services/auth_service.py - Authentication service → Revoked tokens: records revocation
backend/app/services/auth_service.py - Authentication routes → Token and password security: creates tokens
backend/app/api/routes/auth.py - Session dependencies → Token and password security: validates tokens
backend/app/api/dependencies.py - Session dependencies → Authentication service: checks revocation
backend/app/api/dependencies.py - Session dependencies → User account: loads user
backend/app/api/dependencies.py - Profile routes → Session dependencies: requires session
backend/app/api/routes/profile.py - Profile routes → Profile service: calls
backend/app/api/routes/profile.py - Profile service → Patient profile: reads and updates
backend/app/services/profile_service.py - Profile service → User account: reads and updates
backend/app/services/profile_service.py - FastAPI application → Application settings: configures
backend/app/main.py - FastAPI application → Health and root responses: handles health
backend/app/main.py - Health routes → Health and root responses: calls
backend/app/api/routes/health.py - Health and root responses → Application settings: reads settings
backend/app/services/health_service.py - Authentication routes → Database sessions: requests session
backend/app/api/routes/auth.py - Profile routes → Database sessions: requests session
backend/app/api/routes/profile.py - Session dependencies → Database sessions: requests session
backend/app/api/dependencies.py - Database sessions → PostgreSQL: connects
backend/app/db/session.py - Patient → Login and register: registers or logs in
README.md - Patient → Patient profile page: edits profile
README.md - Patient → Records and reminders shells: opens placeholders
README.md - Patient → Backend status widget: checks status
- Backend status widget → Health client: requests health
- Health client → Health routes: calls API