# joaquincuevas/soft-g2-cursus architecture

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

- Interactive diagram: https://gitdiagram.com/joaquincuevas/soft-g2-cursus
- Repository: https://github.com/joaquincuevas/soft-g2-cursus

## Overview

CURSUS is a multiuniversity academic-management platform: users authenticate, enter a university-scoped session, and use role- and section-protected workflows for course administration and teaching. Those workflows cover course membership, section resources, attendance, announcements, and grading; dashboards and institutional administration provide broader views. PostgreSQL Row-Level Security isolates university data, while course-file storage uses S3. The graph reflects README statements and shown imports/calls; unsampled modules are represented only where their paths and subsystem are clear, and unshown links are omitted.

Main entry points: [`backend/src/espacio/integrante-seccion.guard.ts`](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/espacio/integrante-seccion.guard.ts) (Section membership), [`backend/src/database/base-de-datos.service.ts`](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/database/base-de-datos.service.ts) (PostgreSQL data access), [`frontend/src/auth/auth.ts`](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/auth/auth.ts) (Web authentication), [`backend/src/auth/auth.service.ts`](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/auth.service.ts) (Authentication API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_routes["App routes<br/>[App.tsx]"]
  node_web_auth["Web authentication<br/>[auth.ts]"]
  node_web_session["Session context<br/>[session.ts]"]
end

subgraph group_identity["Identity and security"]
  node_auth_api["Authentication API<br/>[auth.service.ts]"]
  node_auth_guard["JWT access guard<br/>[jwt-auth.guard.ts]"]
  node_mfa["MFA security<br/>[mfa.service.ts]"]
  node_university_context["University context"]
end

subgraph group_academics["Academic administration"]
  node_course_admin["Course administration"]
  node_dashboards["Dashboards and metrics"]
  node_superadmin["University administration"]
end

subgraph group_learning["Section learning"]
  node_section_access["Section membership"]
  node_section_space["Section space"]
  node_attendance["Attendance"]
  node_grading["Grades and review"]
  node_materials["Course materials"]
  node_announcements["Announcements"]
  node_file_api["File management"]
end

subgraph group_platform["Data and platform"]
  node_contracts["Shared API contracts<br/>[index.ts]"]
  node_database[("PostgreSQL data access")]
  node_s3[("S3 object storage")]
end

node_user(("University user"))

node_user -->|"uses"| node_routes
node_routes -->|"routes through"| node_web_auth
node_web_auth -->|"requests login"| node_auth_api
node_auth_api -->|"checks MFA"| node_mfa
node_auth_guard -->|"validates session"| node_auth_api
node_web_session -->|"uses auth"| node_web_auth
node_course_admin -->|"uses data access"| node_database
node_section_space -->|"guards routes"| node_section_access
node_attendance -->|"guards routes"| node_section_access
node_grading -->|"guards routes"| node_section_access
node_section_access -->|"resolves context"| node_university_context
node_attendance -->|"uses types"| node_contracts
node_course_admin -->|"uses types"| node_contracts
node_grading -->|"uses types"| node_contracts
node_announcements -->|"uses data access"| node_database
node_announcements -->|"guards routes"| node_section_access
node_file_api -->|"guards routes"| node_section_access
node_dashboards -->|"uses data access"| node_database
node_superadmin -.->|"uses data access"| node_database
node_file_api -.->|"stores files"| node_s3
node_university_context -->|"scopes queries"| node_database

click node_routes "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/App.tsx"
click node_web_auth "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/auth/auth.ts"
click node_web_session "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/session/session.ts"
click node_auth_api "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/auth.service.ts"
click node_auth_guard "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/jwt-auth.guard.ts"
click node_mfa "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/seguridad/mfa.service.ts"
click node_university_context "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/universidad-actual.decorator.ts"
click node_course_admin "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/gestion/gestion.controller.ts"
click node_section_access "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/espacio/integrante-seccion.guard.ts"
click node_section_space "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/espacio/espacio.controller.ts"
click node_attendance "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/asistencia/asistencia.controller.ts"
click node_grading "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/notas/notas.controller.ts"
click node_materials "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/materiales/materiales.controller.ts"
click node_announcements "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/anuncios/anuncios.controller.ts"
click node_file_api "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/archivos/archivos.controller.ts"
click node_dashboards "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/dashboard/dashboard.controller.ts"
click node_superadmin "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/superadmin/universidades.controller.ts"
click node_contracts "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/shared/src/index.ts"
click node_database "https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/database/base-de-datos.service.ts"

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_routes,node_web_auth,node_web_session,node_user toneBlue
class node_auth_api,node_auth_guard,node_mfa,node_university_context toneAmber
class node_course_admin,node_dashboards,node_superadmin toneMint
class node_section_access,node_section_space,node_attendance,node_grading,node_materials,node_announcements,node_file_api toneRose
class node_contracts,node_database,node_s3 toneIndigo
```

## Components

### Web client

- [App routes](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Web authentication](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/auth/auth.ts): `frontend/src/auth/auth.ts`
- [Session context](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/frontend/src/session/session.ts): `frontend/src/session/session.ts`

### Identity and security

- [Authentication API](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/auth.service.ts): `backend/src/auth/auth.service.ts`
- [JWT access guard](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/jwt-auth.guard.ts): `backend/src/auth/jwt-auth.guard.ts`
- [MFA security](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/seguridad/mfa.service.ts): `backend/src/seguridad/mfa.service.ts`
- [University context](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/auth/universidad-actual.decorator.ts): `backend/src/auth/universidad-actual.decorator.ts`

### Academic administration

- [Course administration](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/gestion/gestion.controller.ts): `backend/src/gestion/gestion.controller.ts`
- [Dashboards and metrics](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/dashboard/dashboard.controller.ts): `backend/src/dashboard/dashboard.controller.ts`
- [University administration](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/superadmin/universidades.controller.ts): `backend/src/superadmin/universidades.controller.ts`

### Section learning

- [Section membership](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/espacio/integrante-seccion.guard.ts): `backend/src/espacio/integrante-seccion.guard.ts`
- [Section space](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/espacio/espacio.controller.ts): `backend/src/espacio/espacio.controller.ts`
- [Attendance](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/asistencia/asistencia.controller.ts): `backend/src/asistencia/asistencia.controller.ts`
- [Grades and review](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/notas/notas.controller.ts): `backend/src/notas/notas.controller.ts`
- [Course materials](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/materiales/materiales.controller.ts): `backend/src/materiales/materiales.controller.ts`
- [Announcements](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/anuncios/anuncios.controller.ts): `backend/src/anuncios/anuncios.controller.ts`
- [File management](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/archivos/archivos.controller.ts): `backend/src/archivos/archivos.controller.ts`

### Data and platform

- [Shared API contracts](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/shared/src/index.ts): `shared/src/index.ts`
- [PostgreSQL data access](https://github.com/joaquincuevas/soft-g2-cursus/blob/develop/backend/src/database/base-de-datos.service.ts): `backend/src/database/base-de-datos.service.ts`
- **S3 object storage**

### Other components

- **University user**

## Connections

- University user → App routes: uses (evidence: `frontend/src/App.tsx`)
- App routes → Web authentication: routes through (evidence: `frontend/src/App.tsx`)
- Web authentication → Authentication API: requests login (evidence: `frontend/src/auth/auth.ts`)
- Authentication API → MFA security: checks MFA (evidence: `backend/src/auth/auth.service.ts`)
- JWT access guard → Authentication API: validates session (evidence: `backend/src/auth/jwt-auth.guard.ts`)
- Session context → Web authentication: uses auth (evidence: `frontend/src/session/session.ts`)
- Course administration → PostgreSQL data access: uses data access (evidence: `backend/src/gestion/gestion.controller.ts`)
- Section space → Section membership: guards routes (evidence: `backend/src/espacio/espacio.controller.ts`)
- Attendance → Section membership: guards routes (evidence: `backend/src/asistencia/asistencia.controller.ts`)
- Grades and review → Section membership: guards routes (evidence: `backend/src/notas/notas.controller.ts`)
- Section membership → University context: resolves context (evidence: `backend/src/espacio/integrante-seccion.guard.ts`)
- Attendance → Shared API contracts: uses types (evidence: `backend/src/asistencia/asistencia.controller.ts`)
- Course administration → Shared API contracts: uses types (evidence: `backend/src/gestion/gestion.controller.ts`)
- Grades and review → Shared API contracts: uses types (evidence: `backend/src/notas/notas.controller.ts`)
- Announcements → PostgreSQL data access: uses data access (evidence: `backend/src/anuncios/anuncios.controller.ts`)
- Announcements → Section membership: guards routes (evidence: `backend/src/anuncios/anuncios.controller.ts`)
- File management → Section membership: guards routes (evidence: `backend/src/archivos/archivos.controller.ts`)
- Dashboards and metrics → PostgreSQL data access: uses data access (evidence: `backend/src/dashboard/dashboard.controller.ts`)
- University administration → PostgreSQL data access: uses data access
- File management → S3 object storage: stores files (evidence: `README.md`)
- University context → PostgreSQL data access: scopes queries (evidence: `backend/src/auth/universidad-actual.decorator.ts`)
