How bmaravena/cesfam_pdc works
OIRS is a municipal health-network portal for public requests and satisfaction surveys, with staff workflows for response, reporting, user/role administration, establishment management, and audit review. The principal flow is public submission or staff action through the frontend into FastAPI endpoints, business services, repositories, and PostgreSQL; staff authenticate with JWT and role/scope checks. The tree documents the additional portal, consultation, metrics, CSV export, and audit capabilities. Several endpoint and UI implementations were not sampled, so their internal calls are not asserted; the shown edges follow excerpts or the router registration.
Main entry points: repositories Repositories · index.tsx Page routing · private Staff workflows · api.ts HTTP client
Components 24
Web portal
- Web application
frontend/src/main.tsx - Page routing
frontend/src/router/index.tsx - Auth provider
frontend/src/features/auth/AuthProvider.tsx - JWT client
frontend/src/lib/auth.ts - HTTP client
frontend/src/services/api.ts - Public workflows
frontend/src/pages/public - Staff workflows
frontend/src/pages/private - Request response
frontend/src/features/requerimientos/ResponderModal.tsx
API entry
- API router
backend/api/v1/router.py - Request endpoints
backend/api/v1/endpoints/requerimientos.py - Auth endpoint
backend/api/v1/endpoints/auth.py - Other endpoints
backend/api/v1/endpoints
Business services
- Request service
backend/services/requerimiento_oirs_service.py - Survey service
backend/services/encuesta_satisfaccion_service.py - User service
backend/services/usuario_service.py - Supporting services
backend/services
Identity and access
- JWT security
backend/core/security.py - Role and scope
backend/services/authz.py
Data layer
- Repositories
backend/db/repositories - Domain records
backend/db/models - Database sessions
backend/db/session.py - PostgreSQL
Other components
- Public visitors
- Health staff
Connections 27
- Web application → Page routing: loads routes
frontend/src/main.tsx - Page routing → Public workflows: routes to
frontend/src/router/index.tsx - Page routing → Staff workflows: routes to
frontend/src/router/index.tsx - Page routing → Auth provider: guards routes
frontend/src/router/index.tsx - Auth provider → JWT client: reads token
frontend/src/features/auth/AuthProvider.tsx - Auth provider → HTTP client: requests profile
frontend/src/features/auth/AuthProvider.tsx - HTTP client → JWT client: attaches JWT
frontend/src/services/api.ts - Public visitors → Public workflows: uses
- Health staff → Staff workflows: uses
- Staff workflows → Request response: opens response
- Public workflows → HTTP client: calls API
- Staff workflows → HTTP client: calls API
- API router → Request endpoints: registers
backend/api/v1/router.py - API router → Auth endpoint: registers
backend/api/v1/router.py - API router → Other endpoints: registers
backend/api/v1/router.py - Request endpoints → Request service: invokes
backend/api/v1/endpoints/requerimientos.py - Auth endpoint → User service: authenticates
backend/api/v1/endpoints/auth.py - Auth endpoint → JWT security: issues token
backend/api/v1/endpoints/auth.py - Request service → Repositories: queries and writes
backend/services/requerimiento_oirs_service.py - Survey service → Repositories: queries and writes
backend/services/encuesta_satisfaccion_service.py - Request endpoints → Role and scope: checks access
backend/api/v1/endpoints/requerimientos.py - Request service → Role and scope: checks scope
backend/services/requerimiento_oirs_service.py - JWT security → Repositories: loads user
backend/core/security.py - User service → Repositories: manages users
backend/services/usuario_service.py - Repositories → Domain records: reads and writes
backend/db/repositories/requerimiento_oirs_repo.py - Repositories → Database sessions: uses session
backend/db/repositories/base.py - Database sessions → PostgreSQL: opens connections
backend/db/session.py