# proyecto-software-equipo-404-found/tiza architecture

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

- Interactive diagram: https://gitdiagram.com/proyecto-software-equipo-404-found/tiza
- Repository: https://github.com/proyecto-software-equipo-404-found/tiza

## Overview

Tiza is an educational assessment platform: teachers prepare and publish exams, open live PIN/QR sessions, review AI-assisted grading, approve final marks, and inspect metrics; students join, submit answers, and later view approved results. Administrators manage users, courses, cohorts, and enrollments. The frontend reaches independent .NET services through a YARP gateway. The README documents the broad service boundaries and capabilities; sampled handlers confirm selected authentication, course/material, assessment, live-room, and LLM behavior. Unsampled service internals and most runtime wiring are represented only at their documented subsystem boundaries.

Main entry points: [`frontend/src/App.tsx`](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/App.tsx) (Tiza web app), [`services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs`](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs) (Exams and submissions), [`gateway/src/PEI.Gateway/Program.cs`](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/gateway/src/PEI.Gateway/Program.cs) (API gateway), [`services/sala-en-vivo/src/PEI.SalaEnVivo.Api/Controllers/SalasController.cs`](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/sala-en-vivo/src/PEI.SalaEnVivo.Api/Controllers/SalasController.cs) (Live exam rooms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_spa["Tiza web app<br/>[App.tsx]"]
  node_auth_ui["Login and sessions<br/>[SesionContext.tsx]"]
  node_course_ui["Courses and materials<br/>[PaginaCursos.tsx]"]
  node_exam_ui["Exam authoring"]
  node_student_ui["Student exam view"]
  node_review_ui["Review and metrics"]
  node_admin_ui["User management<br/>[PaginaUsuarios.tsx]"]
end

subgraph group_identity_courses["Identity and courses"]
  node_identity["Identity service<br/>[AuthController.cs]"]
  node_courses["Courses and enrollment"]
  node_materials["PDF materials"]
end

subgraph group_assessment["Assessment lifecycle"]
  node_evaluations["Exams and submissions"]
  node_grading["Teacher grading"]
  node_metrics["Exam metrics"]
end

subgraph group_live_ai["Live rooms and AI"]
  node_live["Live exam rooms<br/>[SalasController.cs]"]
  node_presence["Realtime presence"]
  node_ai["AI grading and questions"]
  node_llm["Resilient LLM clients"]
  node_mcp["AI MCP server<br/>[Program.cs]"]
end

subgraph group_platform["Service platform"]
  node_gateway["API gateway<br/>[Program.cs]"]
  node_postgres[("PostgreSQL stores")]
  node_redis[("Redis presence")]
end

node_actors(("Education users"))
node_llm_providers["LLM providers"]

node_actors -->|"use"| node_spa
node_spa -->|"API requests"| node_gateway
node_spa -.->|"renders"| node_auth_ui
node_spa -.->|"renders"| node_course_ui
node_spa -.->|"renders"| node_exam_ui
node_spa -.->|"renders"| node_student_ui
node_spa -.->|"renders"| node_review_ui
node_spa -.->|"renders"| node_admin_ui
node_gateway -->|"routes requests"| node_identity
node_gateway -->|"routes requests"| node_courses
node_gateway -->|"routes requests"| node_evaluations
node_gateway -->|"routes requests"| node_live
node_gateway -->|"routes requests"| node_ai
node_auth_ui -.->|"authenticates"| node_identity
node_course_ui -->|"manages courses"| node_courses
node_course_ui -->|"handles materials"| node_materials
node_exam_ui -->|"creates exams"| node_evaluations
node_exam_ui -->|"requests suggestions"| node_ai
node_student_ui -->|"joins room"| node_live
node_student_ui -->|"views exams"| node_evaluations
node_review_ui -->|"reviews results"| node_evaluations
node_review_ui -->|"views metrics"| node_metrics
node_admin_ui -->|"manages users"| node_identity
node_admin_ui -->|"manages enrollment"| node_courses
node_live -->|"loads exam questions"| node_evaluations
node_live -->|"tracks presence"| node_presence
node_presence -->|"stores presence"| node_redis
node_evaluations -->|"reviews submissions"| node_grading
node_grading -->|"requests suggested marks"| node_ai
node_ai -.->|"completes prompts"| node_llm
node_llm -->|"fails over"| node_llm_providers
node_ai -.->|"provides tools"| node_mcp
node_evaluations -->|"serves metrics"| node_metrics
node_identity -->|"persists identity"| node_postgres
node_courses -->|"persists course data"| node_postgres
node_evaluations -->|"persists assessments"| node_postgres
node_live -->|"persists room data"| node_postgres

click node_spa "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/auth/SesionContext.tsx"
click node_course_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/cursos/pages/PaginaCursos.tsx"
click node_exam_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/evaluaciones/pages/PaginaEvaluaciones.tsx"
click node_student_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/mis-examenes/PaginaMisExamenes.tsx"
click node_review_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/revision-notas/pages/PaginaResultados.tsx"
click node_admin_ui "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/usuarios/PaginaUsuarios.tsx"
click node_gateway "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/gateway/src/PEI.Gateway/Program.cs"
click node_identity "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/identidad/src/PEI.Identidad.Api/Controllers/AuthController.cs"
click node_courses "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/cursos/src/PEI.Cursos.Api/Controllers/CursosController.cs"
click node_materials "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/cursos/src/PEI.Cursos.Application/UseCases/Materiales/Queries/ObtenerTextoMaterialPublicoQueryHandler.cs"
click node_evaluations "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs"
click node_grading "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Application/Correccion/AprobarNotaEntrega.cs"
click node_live "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/sala-en-vivo/src/PEI.SalaEnVivo.Api/Controllers/SalasController.cs"
click node_presence "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/sala-en-vivo/src/PEI.SalaEnVivo.Infrastructure/Services/PresenciaSalaRedisService.cs"
click node_ai "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.Application/Services/CorreccionService.cs"
click node_llm "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.Infrastructure/LlmClients/PollyResilientLlmClient.cs"
click node_mcp "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.McpServer/Program.cs"
click node_metrics "https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Application/Evaluaciones/Queries/GetMetricasEvaluacion.cs"

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_spa,node_auth_ui,node_course_ui,node_exam_ui,node_student_ui,node_review_ui,node_admin_ui,node_actors toneBlue
class node_identity,node_courses,node_materials toneAmber
class node_evaluations,node_grading,node_metrics toneMint
class node_live,node_presence,node_ai,node_llm,node_mcp toneRose
class node_gateway,node_postgres,node_redis,node_llm_providers toneIndigo
```

## Components

### Web application

- [Tiza web app](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Login and sessions](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/auth/SesionContext.tsx): `frontend/src/features/auth/SesionContext.tsx`
- [Courses and materials](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/cursos/pages/PaginaCursos.tsx): `frontend/src/features/cursos/pages/PaginaCursos.tsx`
- [Exam authoring](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/evaluaciones/pages/PaginaEvaluaciones.tsx): `frontend/src/features/evaluaciones/pages/PaginaEvaluaciones.tsx`
- [Student exam view](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/mis-examenes/PaginaMisExamenes.tsx): `frontend/src/features/mis-examenes/PaginaMisExamenes.tsx`
- [Review and metrics](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/revision-notas/pages/PaginaResultados.tsx): `frontend/src/features/revision-notas/pages/PaginaResultados.tsx`
- [User management](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/frontend/src/features/usuarios/PaginaUsuarios.tsx): `frontend/src/features/usuarios/PaginaUsuarios.tsx`

### Identity and courses

- [Identity service](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/identidad/src/PEI.Identidad.Api/Controllers/AuthController.cs): `services/identidad/src/PEI.Identidad.Api/Controllers/AuthController.cs`
- [Courses and enrollment](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/cursos/src/PEI.Cursos.Api/Controllers/CursosController.cs): `services/cursos/src/PEI.Cursos.Api/Controllers/CursosController.cs`
- [PDF materials](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/cursos/src/PEI.Cursos.Application/UseCases/Materiales/Queries/ObtenerTextoMaterialPublicoQueryHandler.cs): `services/cursos/src/PEI.Cursos.Application/UseCases/Materiales/Queries/ObtenerTextoMaterialPublicoQueryHandler.cs`

### Assessment lifecycle

- [Exams and submissions](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs): `services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs`
- [Teacher grading](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Application/Correccion/AprobarNotaEntrega.cs): `services/evaluaciones/src/PEI.Evaluaciones.Application/Correccion/AprobarNotaEntrega.cs`
- [Exam metrics](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/evaluaciones/src/PEI.Evaluaciones.Application/Evaluaciones/Queries/GetMetricasEvaluacion.cs): `services/evaluaciones/src/PEI.Evaluaciones.Application/Evaluaciones/Queries/GetMetricasEvaluacion.cs`

### Live rooms and AI

- [Live exam rooms](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/sala-en-vivo/src/PEI.SalaEnVivo.Api/Controllers/SalasController.cs): `services/sala-en-vivo/src/PEI.SalaEnVivo.Api/Controllers/SalasController.cs`
- [Realtime presence](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/sala-en-vivo/src/PEI.SalaEnVivo.Infrastructure/Services/PresenciaSalaRedisService.cs): `services/sala-en-vivo/src/PEI.SalaEnVivo.Infrastructure/Services/PresenciaSalaRedisService.cs`
- [AI grading and questions](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.Application/Services/CorreccionService.cs): `services/ia/src/PEI.IA.Application/Services/CorreccionService.cs`
- [Resilient LLM clients](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.Infrastructure/LlmClients/PollyResilientLlmClient.cs): `services/ia/src/PEI.IA.Infrastructure/LlmClients/PollyResilientLlmClient.cs`
- [AI MCP server](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/services/ia/src/PEI.IA.McpServer/Program.cs): `services/ia/src/PEI.IA.McpServer/Program.cs`

### Service platform

- [API gateway](https://github.com/proyecto-software-equipo-404-found/tiza/blob/main/gateway/src/PEI.Gateway/Program.cs): `gateway/src/PEI.Gateway/Program.cs`
- **PostgreSQL stores**
- **Redis presence**

### Other components

- **Education users**
- **LLM providers**

## Connections

- Education users → Tiza web app: use
- Tiza web app → API gateway: API requests
- Tiza web app → Login and sessions: renders
- Tiza web app → Courses and materials: renders
- Tiza web app → Exam authoring: renders
- Tiza web app → Student exam view: renders
- Tiza web app → Review and metrics: renders
- Tiza web app → User management: renders
- API gateway → Identity service: routes requests
- API gateway → Courses and enrollment: routes requests
- API gateway → Exams and submissions: routes requests
- API gateway → Live exam rooms: routes requests
- API gateway → AI grading and questions: routes requests
- Login and sessions → Identity service: authenticates
- Courses and materials → Courses and enrollment: manages courses
- Courses and materials → PDF materials: handles materials
- Exam authoring → Exams and submissions: creates exams
- Exam authoring → AI grading and questions: requests suggestions
- Student exam view → Live exam rooms: joins room
- Student exam view → Exams and submissions: views exams
- Review and metrics → Exams and submissions: reviews results
- Review and metrics → Exam metrics: views metrics
- User management → Identity service: manages users
- User management → Courses and enrollment: manages enrollment
- Live exam rooms → Exams and submissions: loads exam questions
- Live exam rooms → Realtime presence: tracks presence
- Realtime presence → Redis presence: stores presence
- Exams and submissions → Teacher grading: reviews submissions
- Teacher grading → AI grading and questions: requests suggested marks
- AI grading and questions → Resilient LLM clients: completes prompts
- Resilient LLM clients → LLM providers: fails over (evidence: `services/ia/src/PEI.IA.Infrastructure/LlmClients/PollyResilientLlmClient.cs`)
- AI grading and questions → AI MCP server: provides tools
- Exams and submissions → Exam metrics: serves metrics (evidence: `services/evaluaciones/src/PEI.Evaluaciones.Api/Controllers/EvaluacionesController.cs`)
- Identity service → PostgreSQL stores: persists identity
- Courses and enrollment → PostgreSQL stores: persists course data
- Exams and submissions → PostgreSQL stores: persists assessments
- Live exam rooms → PostgreSQL stores: persists room data
