# gary750/pasedelistaqr architecture

> Architecture diagram of the GitHub repository gary750/pasedelistaqr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gary750/pasedelistaqr
- Repository: https://github.com/gary750/pasedelistaqr

## Overview

This is an attendance-management platform: staff use a web interface to manage school records, take attendance, view dashboards, and produce reports; a mobile app provides attendance-session and scanning workflows. The Express backend exposes those domains and persists records through Prisma/PostgreSQL. Authentication also supports account recovery by email, and attendance recording can trigger WhatsApp notifications. The excerpts establish backend route wiring, database access, report generation, and mobile attendance polling; most UI-to-API links are not shown, so they are omitted.

Main entry points: [`frontend_qr/src/App.jsx`](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/App.jsx) (Web application), [`backend_qr/src/config/prisma.js`](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/config/prisma.js) (Prisma data access), [`backend_qr/src/controllers/asistencias.controllers.js`](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/asistencias.controllers.js) (Attendance API), [`backend_qr/src/controllers/reportes.controllers.js`](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/reportes.controllers.js) (Report queries and exports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web administration"]
  node_app["Web application<br/>[App.jsx]"]
  node_student_ui["Student records<br/>[Alumnos.jsx]"]
  node_attendance_ui["Attendance views<br/>[Asistencia.jsx]"]
  node_dashboard_ui["Dashboard<br/>[Dashboard.jsx]"]
  node_groups_ui["Group management<br/>[Grupos.jsx]"]
  node_teacher_ui["Teacher management<br/>[TablaMaestros.jsx]"]
  node_reports_ui["Reports<br/>[Reportes.jsx]"]
  node_register_attendance_ui["Attendance entry"]
end

subgraph group_backend["Backend API"]
  node_auth_api["Authentication"]
  node_students_api["Student records API"]
  node_attendance_api["Attendance API"]
  node_groups_api["Groups API"]
  node_teachers_api["Teacher API"]
  node_dashboard_api["Dashboard data"]
  node_reports_api["Report queries and exports"]
  node_bulk_students["Bulk student import"]
  node_materias_api["Subjects API"]
  node_stats_api["Statistics API<br/>[stats.routes.js]"]
  node_api_app["Express application<br/>[app.js]"]
  node_report_routes["Report routes<br/>[reportes.routes.js]"]
  node_attendance_service["Attendance API service"]
end

subgraph group_mobile["Mobile attendance"]
  node_mobile_home["Attendance home<br/>[index.tsx]"]
  node_scanner["QR scanner<br/>[scanner.tsx]"]
  node_attendance_context["Attendance state and polling"]
end

subgraph group_data["Persistence and notifications"]
  node_prisma["Prisma data access<br/>[prisma.js]"]
  node_postgres[("PostgreSQL")]
  node_whatsapp["WhatsApp notifications"]
end

node_staff(("School staff"))

node_staff -->|"uses"| node_app
node_app -->|"routes to"| node_student_ui
node_app -->|"routes to"| node_attendance_ui
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_groups_ui
node_app -->|"routes to"| node_teacher_ui
node_app -->|"routes to"| node_reports_ui
node_app -->|"routes to"| node_register_attendance_ui
node_api_app -->|"mounts"| node_report_routes
node_report_routes -->|"dispatches"| node_reports_api
node_students_api -->|"queries"| node_prisma
node_attendance_api -->|"queries and writes"| node_prisma
node_auth_api -->|"queries"| node_prisma
node_reports_api -->|"queries"| node_prisma
node_teachers_api -->|"queries"| node_prisma
node_attendance_api -->|"notifies"| node_whatsapp
node_mobile_home -->|"uses"| node_attendance_context
node_attendance_context -.->|"requests records"| node_attendance_service
node_prisma -.->|"connects"| node_postgres

click node_app "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/App.jsx"
click node_student_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Alumnos.jsx"
click node_attendance_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Asistencia.jsx"
click node_dashboard_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Dashboard.jsx"
click node_groups_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Grupos.jsx"
click node_teacher_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/TablaMaestros.jsx"
click node_reports_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Reportes.jsx"
click node_register_attendance_ui "https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/RegistrarAsistencia.jsx"
click node_auth_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/authentication.controllers.js"
click node_students_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/alumnos.controllers.js"
click node_attendance_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/asistencias.controllers.js"
click node_groups_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/grupos.controllers.js"
click node_teachers_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/maestroController.js"
click node_dashboard_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/dashboard.controllers.js"
click node_reports_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/reportes.controllers.js"
click node_bulk_students "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/cargaMasiva.controllers.js"
click node_materias_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/materias.controllers.js"
click node_stats_api "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/routes/stats.routes.js"
click node_api_app "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/app.js"
click node_report_routes "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/routes/reportes.routes.js"
click node_prisma "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/config/prisma.js"
click node_whatsapp "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/whatsapp.service.js"
click node_mobile_home "https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/app/index.tsx"
click node_scanner "https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/app/scanner.tsx"
click node_attendance_context "https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/context/AttendanceContext.tsx"
click node_attendance_service "https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/asistencias.controllers.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_student_ui,node_attendance_ui,node_dashboard_ui,node_groups_ui,node_teacher_ui,node_reports_ui,node_register_attendance_ui toneBlue
class node_auth_api,node_students_api,node_attendance_api,node_groups_api,node_teachers_api,node_dashboard_api,node_reports_api,node_bulk_students,node_materias_api,node_stats_api,node_api_app,node_report_routes,node_attendance_service toneAmber
class node_mobile_home,node_scanner,node_attendance_context toneMint
class node_prisma,node_postgres,node_whatsapp toneRose
class node_staff toneIndigo
```

## Components

### Web administration

- [Web application](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/App.jsx): `frontend_qr/src/App.jsx`
- [Student records](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Alumnos.jsx): `frontend_qr/src/Components/Alumnos.jsx`
- [Attendance views](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Asistencia.jsx): `frontend_qr/src/Components/Asistencia.jsx`
- [Dashboard](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Dashboard.jsx): `frontend_qr/src/Components/Dashboard.jsx`
- [Group management](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Grupos.jsx): `frontend_qr/src/Components/Grupos.jsx`
- [Teacher management](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/TablaMaestros.jsx): `frontend_qr/src/Components/TablaMaestros.jsx`
- [Reports](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/Reportes.jsx): `frontend_qr/src/Components/Reportes.jsx`
- [Attendance entry](https://github.com/gary750/pasedelistaqr/blob/Gary/frontend_qr/src/Components/RegistrarAsistencia.jsx): `frontend_qr/src/Components/RegistrarAsistencia.jsx`

### Backend API

- [Authentication](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/authentication.controllers.js): `backend_qr/src/controllers/authentication.controllers.js`
- [Student records API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/alumnos.controllers.js): `backend_qr/src/controllers/alumnos.controllers.js`
- [Attendance API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/asistencias.controllers.js): `backend_qr/src/controllers/asistencias.controllers.js`
- [Groups API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/grupos.controllers.js): `backend_qr/src/controllers/grupos.controllers.js`
- [Teacher API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/maestroController.js): `backend_qr/src/controllers/maestroController.js`
- [Dashboard data](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/dashboard.controllers.js): `backend_qr/src/controllers/dashboard.controllers.js`
- [Report queries and exports](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/reportes.controllers.js): `backend_qr/src/controllers/reportes.controllers.js`
- [Bulk student import](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/cargaMasiva.controllers.js): `backend_qr/src/controllers/cargaMasiva.controllers.js`
- [Subjects API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/materias.controllers.js): `backend_qr/src/controllers/materias.controllers.js`
- [Statistics API](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/routes/stats.routes.js): `backend_qr/src/routes/stats.routes.js`
- [Express application](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/app.js): `backend_qr/src/app.js`
- [Report routes](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/routes/reportes.routes.js): `backend_qr/src/routes/reportes.routes.js`
- [Attendance API service](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/asistencias.controllers.js): `backend_qr/src/controllers/asistencias.controllers.js`

### Mobile attendance

- [Attendance home](https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/app/index.tsx): `mobile-app/src/app/index.tsx`
- [QR scanner](https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/app/scanner.tsx): `mobile-app/src/app/scanner.tsx`
- [Attendance state and polling](https://github.com/gary750/pasedelistaqr/blob/Gary/mobile-app/src/context/AttendanceContext.tsx): `mobile-app/src/context/AttendanceContext.tsx`

### Persistence and notifications

- [Prisma data access](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/config/prisma.js): `backend_qr/src/config/prisma.js`
- **PostgreSQL**
- [WhatsApp notifications](https://github.com/gary750/pasedelistaqr/blob/Gary/backend_qr/src/controllers/whatsapp.service.js): `backend_qr/src/controllers/whatsapp.service.js`

### Other components

- **School staff**

## Connections

- School staff → Web application: uses (evidence: `frontend_qr/src/App.jsx`)
- Web application → Student records: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Attendance views: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Dashboard: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Group management: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Teacher management: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Reports: routes to (evidence: `frontend_qr/src/App.jsx`)
- Web application → Attendance entry: routes to (evidence: `frontend_qr/src/App.jsx`)
- Express application → Report routes: mounts (evidence: `backend_qr/src/app.js`)
- Report routes → Report queries and exports: dispatches (evidence: `backend_qr/src/routes/reportes.routes.js`)
- Student records API → Prisma data access: queries (evidence: `backend_qr/src/controllers/alumnos.controllers.js`)
- Attendance API → Prisma data access: queries and writes (evidence: `backend_qr/src/controllers/asistencias.controllers.js`)
- Authentication → Prisma data access: queries (evidence: `backend_qr/src/controllers/authentication.controllers.js`)
- Report queries and exports → Prisma data access: queries (evidence: `backend_qr/src/controllers/reportes.controllers.js`)
- Teacher API → Prisma data access: queries (evidence: `backend_qr/src/controllers/maestroController.js`)
- Attendance API → WhatsApp notifications: notifies (evidence: `backend_qr/src/controllers/asistencias.controllers.js`)
- Attendance home → Attendance state and polling: uses (evidence: `mobile-app/src/app/index.tsx`)
- Attendance state and polling → Attendance API service: requests records
- Prisma data access → PostgreSQL: connects
