How yoopuipui/cesfam-programa-infantil works
CESFAM Programa Infantil is a clinical-management system for health staff: staff sign in, manage child and caregiver records, record clinical controls, coordinate NANEAS workshops, and review reports. The React application routes users to these workflows and uses a shared API client; the Express backend exposes authenticated routes, controllers, and domain services backed by Prisma/PostgreSQL. Excel patient import is a distinct workflow, including a documented simulation mode. Some feature implementations were not sampled, so their backend links are shown only where the README or source index supports them; uncertain HTTP wiring is dashed.
Main entry points: App.tsx Application routes · api.ts API client · prisma.ts Prisma client · index.ts Express server
Components 30
Staff application
- Application routes
frontend/src/App.tsx - Sign in
frontend/src/components/login/Login.tsx - Dashboard
frontend/src/components/dashboard/Dashboard.tsx - Patient records
frontend/src/components/pacientes/listaPacientes.tsx - Patient details
frontend/src/components/pacientes/fichaPacientes.tsx - Edit patient
frontend/src/components/pacientes/editarPaciente.tsx - Patient enrollment
frontend/src/components/pacientes/inscribirPaciente.tsx - Excel import
frontend/src/components/pacientes/importarExcel.tsx - Clinical controls
frontend/src/components/controles/crearControl.tsx - Control agenda
frontend/src/components/agenda/agendaControles.tsx - Workshop management
frontend/src/components/talleres/Talleres.tsx - Workshop sessions
frontend/src/components/talleres/detalleTaller.tsx - Session detail
frontend/src/components/talleres/detalleSesion.tsx - Reports
frontend/src/components/reportes/listaReportes.tsx - Report detail
frontend/src/components/reportes/detalleReportes.tsx - API client
frontend/src/service/api.ts
API and domain
- Express server
backend/src/index.ts - Token verification
backend/src/middlewares/authMiddleware.ts - Patient routes
backend/src/routes/paciente.routes.ts - Patient controller
backend/src/controllers/paciente.controller.ts - Patient service
backend/src/services/paciente.service.ts - Control controller
backend/src/controllers/controlClinico.controller.ts - Control service
backend/src/services/controlClinico.service.ts - Excel import service
backend/src/services/importacion.service.ts - Workshop session controller
backend/src/controllers/sesionTaller.controller.ts - Session service
backend/src/services/sesionTaller.service.ts - Reporting service
backend/src/services/reportes.service.ts
Clinical persistence
- Prisma client
backend/src/config/prisma.ts - PostgreSQL
Other components
- Health staff
Connections 42
- Health staff → Application routes: uses
README.md - Application routes → Sign in: routes to
frontend/src/App.tsx - Application routes → Patient records: routes to
frontend/src/App.tsx - Application routes → Patient details: routes to
frontend/src/App.tsx - Application routes → Edit patient: routes to
frontend/src/App.tsx - Application routes → Patient enrollment: routes to
frontend/src/App.tsx - Application routes → Excel import: routes to
frontend/src/App.tsx - Application routes → Clinical controls: routes to
frontend/src/App.tsx - Application routes → Control agenda: routes to
frontend/src/App.tsx - Application routes → Dashboard: routes to
frontend/src/App.tsx - Application routes → Workshop management: routes to
frontend/src/App.tsx - Application routes → Workshop sessions: routes to
frontend/src/App.tsx - Application routes → Session detail: routes to
frontend/src/App.tsx - Application routes → Reports: routes to
frontend/src/App.tsx - Application routes → Report detail: routes to
frontend/src/App.tsx - Sign in → API client: requests
frontend/src/components/login/Login.tsx - Dashboard → API client: requests
frontend/src/components/dashboard/Dashboard.tsx - Edit patient → API client: requests
frontend/src/components/pacientes/editarPaciente.tsx - Patient enrollment → API client: requests
frontend/src/components/pacientes/inscribirPaciente.tsx - Clinical controls → API client: requests
frontend/src/components/controles/crearControl.tsx - Control agenda → API client: requests
frontend/src/components/agenda/agendaControles.tsx - Workshop sessions → API client: requests
frontend/src/components/talleres/detalleTaller.tsx - Session detail → API client: requests
frontend/src/components/talleres/detalleSesion.tsx - Reports → API client: requests
frontend/src/components/reportes/listaReportes.tsx - Report detail → API client: requests
frontend/src/components/reportes/detalleReportes.tsx - API client → Express server: HTTP requests
- Express server → Patient routes: mounts
backend/src/index.ts - Patient routes → Patient controller: dispatches
backend/src/routes/paciente.routes.ts - Patient routes → Token verification: verifies token
backend/src/routes/paciente.routes.ts - Patient controller → Patient service: calls
backend/src/controllers/paciente.controller.ts - Patient controller → Excel import service: normalizes text
backend/src/controllers/paciente.controller.ts - Patient service → Prisma client: queries
backend/src/services/paciente.service.ts - Express server → Control controller: mounts routes
backend/src/index.ts - Control controller → Control service: calls
backend/src/controllers/controlClinico.controller.ts - Control service → Prisma client: queries
backend/src/services/controlClinico.service.ts - Express server → Workshop session controller: mounts routes
backend/src/index.ts - Workshop session controller → Session service: calls
backend/src/controllers/sesionTaller.controller.ts - Session service → Prisma client: queries
backend/src/services/sesionTaller.service.ts - Excel import service → Prisma client: writes patients
backend/src/services/importacion.service.ts - Express server → Reporting service: mounts reports
backend/src/index.ts - Reporting service → Prisma client: queries
backend/src/services/reportes.service.ts - Prisma client → PostgreSQL: persists records
README.md