How dgusgus/sistema-educativo-backend works
This is an Express API for managing school operations: users and roles, people and enrollment, academic structures, attendance, evaluation, payments, and reports. The principal workflow is a client request entering the mounted API routes, passing authentication and role checks, reaching a domain controller, and reading or changing PostgreSQL data through Prisma. The graph also shows the documented boletín and spreadsheet-import capabilities. Several route/controller and controller/database links rely on SOURCE INDEX references; unsampled behavior is not expanded beyond those references.
Main entry points: routes API routes · prisma.ts Prisma access · estudiante.controller.ts People management · tutor.controller.ts Tutor management
Components 18
API and access
- Express application
src/app.ts - API routes
src/routes - Authentication
src/middlewares/auth.middleware.ts - Role checks
src/middlewares/rbac.middleware.ts
People and enrollment
- People management
src/controllers/estudiante.controller.ts - Tutor management
src/controllers/tutor.controller.ts - Teacher management
src/controllers/docente.controller.ts - Person helper
src/lib/persona.helper.ts
Academic operations
- Academic structure
src/routes - Attendance
src/controllers/asistencia.controller.ts
Assessment and reporting
- Evaluation and grades
src/controllers/evaluacion.controller.ts - Bulletins and records
src/controllers/boletin.controller.ts - Bulletin calculations
src/services/boletin.service.ts - PDF output
src/lib/pdf.ts
Shared data access
- Spreadsheet import/export
src/lib/excel.helper.ts - Prisma access
src/lib/prisma.ts
Other components
- API client
- PostgreSQL database
Connections 26
- API client → Express application: sends requests
src/app.ts - Express application → API routes: mounts routes
src/app.ts - API routes → Authentication: authenticates
src/routes/boletin.routes.ts - API routes → Role checks: checks roles
src/routes/boletin.routes.ts - API routes → Bulletins and records: dispatches
src/routes/boletin.routes.ts - API routes → Attendance: dispatches
src/routes/asistencia.routes.ts - API routes → Evaluation and grades: dispatches
src/routes/evaluacion.routes.ts - API routes → People management: dispatches
src/routes/estudiante.routes.ts - API routes → Tutor management: dispatches
src/routes/tutor.routes.ts - API routes → Teacher management: dispatches
src/routes/docente.routes.ts - Express application → Academic structure: mounts domains
src/app.ts - People management → Person helper: creates profiles
src/controllers/estudiante.controller.ts - Tutor management → Person helper: creates profiles
src/controllers/tutor.controller.ts - People management → Spreadsheet import/export: imports sheets
src/controllers/estudiante.controller.ts - Tutor management → Spreadsheet import/export: imports sheets
src/controllers/tutor.controller.ts - Bulletins and records → Bulletin calculations: requests calculations
src/controllers/boletin.controller.ts - Bulletins and records → PDF output: generates PDFs
src/controllers/boletin.controller.ts - People management → Prisma access: reads and writes
src/controllers/estudiante.controller.ts - Tutor management → Prisma access: reads and writes
src/controllers/tutor.controller.ts - Teacher management → Prisma access: reads and writes
src/controllers/docente.controller.ts - Attendance → Prisma access: reads and writes
src/controllers/asistencia.controller.ts - Evaluation and grades → Prisma access: reads and writes
src/controllers/evaluacion.controller.ts - Bulletins and records → Prisma access: reads data
src/controllers/boletin.controller.ts - Bulletin calculations → Prisma access: queries data
src/services/boletin.service.ts - Authentication → Prisma access: checks account
src/middlewares/auth.middleware.ts - Prisma access → PostgreSQL database: queries
src/lib/prisma.ts