# marcoantisctecnm025/siga_tdas architecture

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

- Interactive diagram: https://gitdiagram.com/marcoantisctecnm025/siga_tdas
- Repository: https://github.com/marcoantisctecnm025/siga_tdas

## Overview

SIGA is a role-based web system for tracking complementary activities and laboratory credits. Students sign in, submit evidence, and follow credit progress and review status; tutors manage students and workshops; coordinators administer users and rules, validate submissions and workshops, and produce reports. The map distinguishes those workflows from shared authentication, service/data access, and the Supabase or in-memory backend. Some page-to-service links are documented capabilities rather than inspected calls; those links are dashed, and unsampled implementation details are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/App.tsx) (Role-based routes), [`src/services`](https://github.com/marcoantisctecnm025/siga_tdas/tree/main/src/services) (Data services), [`src/services/talleresService.ts`](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/talleresService.ts) (Workshop service), [`src/services/usuariosService.ts`](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/usuariosService.ts) (User service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student workflow"]
  node_student_dashboard["Progress dashboard<br/>[DashboardPage.tsx]"]
  node_upload["Submit evidence"]
  node_history["Evidence history<br/>[HistorialPage.tsx]"]
end

subgraph group_tutor["Tutor workflow"]
  node_tutor_students["Advisee records<br/>[TutoradosPage.tsx]"]
  node_tutor_record["Advisee detail"]
  node_tutor_workshops["Workshop management<br/>[TalleresPage.tsx]"]
  node_workshop_detail["Workshop detail"]
end

subgraph group_coord["Coordinator workflow"]
  node_coord_dashboard["Overview dashboard<br/>[DashboardPage.tsx]"]
  node_validation["Evidence validation"]
  node_coord_workshops["Workshop review<br/>[TalleresPage.tsx]"]
  node_users["User administration<br/>[UsuariosPage.tsx]"]
  node_rules["Business rules<br/>[ReglasPage.tsx]"]
  node_reports["Reports and export<br/>[ReportesPage.tsx]"]
end

subgraph group_shared["Shared application and data"]
  node_login["Sign in<br/>[LoginPage.tsx]"]
  node_auth["Session and roles<br/>[AuthContext.tsx]"]
  node_app["Role-based routes<br/>[App.tsx]"]
  node_services["Data services"]
  node_auth_service["Authentication service<br/>[authService.ts]"]
  node_workshop_service["Workshop service<br/>[talleresService.ts]"]
  node_user_service["User service<br/>[usuariosService.ts]"]
  node_mappers["Data mappers<br/>[mappers.ts]"]
  node_ui["Shared UI components"]
  node_backend[("Supabase / demo store<br/>[supabaseClient.ts]")]
  node_admin_function["Admin edge function<br/>[index.ts]"]
end

node_student(("Student"))
node_tutor(("Tutor"))
node_coordinator(("Coordinator"))

node_student -->|"signs in"| node_login
node_tutor -->|"signs in"| node_login
node_coordinator -->|"signs in"| node_login
node_login -->|"requests session"| node_auth
node_auth -->|"delegates auth"| node_auth_service
node_auth -->|"refreshes profile"| node_user_service
node_auth_service -->|"auth and profile access"| node_backend
node_auth_service -->|"maps profile"| node_mappers
node_student -->|"opens role routes"| node_app
node_tutor -->|"opens role routes"| node_app
node_coordinator -->|"opens role routes"| node_app
node_app -->|"routes to"| node_student_dashboard
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_tutor_students
node_app -->|"routes to"| node_tutor_record
node_app -->|"routes to"| node_tutor_workshops
node_app -->|"routes to"| node_workshop_detail
node_app -->|"routes to"| node_coord_dashboard
node_app -->|"routes to"| node_validation
node_app -->|"routes to"| node_users
node_app -->|"routes to"| node_coord_workshops
node_app -->|"routes to"| node_rules
node_app -->|"routes to"| node_reports
node_upload -->|"submits evidence"| node_services
node_services -.->|"uses configured backend"| node_backend
node_student_dashboard -.->|"loads progress"| node_services
node_history -.->|"loads history"| node_services
node_tutor_students -.->|"loads advisees"| node_services
node_tutor_record -.->|"loads record"| node_services
node_tutor_workshops -.->|"manages workshops"| node_workshop_service
node_workshop_detail -->|"updates participants"| node_workshop_service
node_coord_workshops -.->|"reviews workshops"| node_workshop_service
node_users -->|"administers users"| node_user_service
node_validation -.->|"reviews evidence"| node_services
node_rules -.->|"configures rules"| node_services
node_reports -.->|"requests reports"| node_services
node_workshop_service -->|"reads and writes"| node_backend
node_workshop_service -->|"maps records"| node_mappers
node_user_service -->|"reads and writes"| node_backend
node_user_service -->|"maps records"| node_mappers
node_coordinator -.->|"administers accounts"| node_admin_function
node_ui -.->|"supports screens"| node_app

click node_login "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/auth/LoginPage.tsx"
click node_auth "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/context/AuthContext.tsx"
click node_app "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/App.tsx"
click node_student_dashboard "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/DashboardPage.tsx"
click node_upload "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/SubirConstanciaPage.tsx"
click node_history "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/HistorialPage.tsx"
click node_tutor_students "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TutoradosPage.tsx"
click node_tutor_record "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TutoradoDetallePage.tsx"
click node_tutor_workshops "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TalleresPage.tsx"
click node_workshop_detail "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TallerDetallePage.tsx"
click node_coord_dashboard "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/DashboardPage.tsx"
click node_validation "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ValidacionesPage.tsx"
click node_coord_workshops "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/TalleresPage.tsx"
click node_users "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/UsuariosPage.tsx"
click node_rules "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ReglasPage.tsx"
click node_reports "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ReportesPage.tsx"
click node_services "https://github.com/marcoantisctecnm025/siga_tdas/tree/main/src/services"
click node_auth_service "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/authService.ts"
click node_workshop_service "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/talleresService.ts"
click node_user_service "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/usuariosService.ts"
click node_mappers "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/mappers.ts"
click node_ui "https://github.com/marcoantisctecnm025/siga_tdas/tree/main/src/components/ui"
click node_backend "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/lib/supabaseClient.ts"
click node_admin_function "https://github.com/marcoantisctecnm025/siga_tdas/blob/main/supabase/functions/admin-usuarios/index.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_student_dashboard,node_upload,node_history toneBlue
class node_tutor_students,node_tutor_record,node_tutor_workshops,node_workshop_detail toneAmber
class node_coord_dashboard,node_validation,node_coord_workshops,node_users,node_rules,node_reports toneMint
class node_login,node_auth,node_app,node_services,node_auth_service,node_workshop_service,node_user_service,node_mappers,node_ui,node_backend,node_admin_function toneRose
class node_student,node_tutor,node_coordinator toneIndigo
```

## Components

### Student workflow

- [Progress dashboard](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/DashboardPage.tsx): `src/pages/alumno/DashboardPage.tsx`
- [Submit evidence](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/SubirConstanciaPage.tsx): `src/pages/alumno/SubirConstanciaPage.tsx`
- [Evidence history](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/alumno/HistorialPage.tsx): `src/pages/alumno/HistorialPage.tsx`

### Tutor workflow

- [Advisee records](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TutoradosPage.tsx): `src/pages/tutor/TutoradosPage.tsx`
- [Advisee detail](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TutoradoDetallePage.tsx): `src/pages/tutor/TutoradoDetallePage.tsx`
- [Workshop management](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TalleresPage.tsx): `src/pages/tutor/TalleresPage.tsx`
- [Workshop detail](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/tutor/TallerDetallePage.tsx): `src/pages/tutor/TallerDetallePage.tsx`

### Coordinator workflow

- [Overview dashboard](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/DashboardPage.tsx): `src/pages/coordinador/DashboardPage.tsx`
- [Evidence validation](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ValidacionesPage.tsx): `src/pages/coordinador/ValidacionesPage.tsx`
- [Workshop review](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/TalleresPage.tsx): `src/pages/coordinador/TalleresPage.tsx`
- [User administration](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/UsuariosPage.tsx): `src/pages/coordinador/UsuariosPage.tsx`
- [Business rules](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ReglasPage.tsx): `src/pages/coordinador/ReglasPage.tsx`
- [Reports and export](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/coordinador/ReportesPage.tsx): `src/pages/coordinador/ReportesPage.tsx`

### Shared application and data

- [Sign in](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/pages/auth/LoginPage.tsx): `src/pages/auth/LoginPage.tsx`
- [Session and roles](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Role-based routes](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/App.tsx): `src/App.tsx`
- [Data services](https://github.com/marcoantisctecnm025/siga_tdas/tree/main/src/services): `src/services`
- [Authentication service](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Workshop service](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/talleresService.ts): `src/services/talleresService.ts`
- [User service](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/usuariosService.ts): `src/services/usuariosService.ts`
- [Data mappers](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/services/mappers.ts): `src/services/mappers.ts`
- [Shared UI components](https://github.com/marcoantisctecnm025/siga_tdas/tree/main/src/components/ui): `src/components/ui`
- [Supabase / demo store](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`
- [Admin edge function](https://github.com/marcoantisctecnm025/siga_tdas/blob/main/supabase/functions/admin-usuarios/index.ts): `supabase/functions/admin-usuarios/index.ts`

### Other components

- **Student**
- **Tutor**
- **Coordinator**

## Connections

- Student → Sign in: signs in
- Tutor → Sign in: signs in
- Coordinator → Sign in: signs in
- Sign in → Session and roles: requests session (evidence: `src/pages/auth/LoginPage.tsx`)
- Session and roles → Authentication service: delegates auth (evidence: `src/context/AuthContext.tsx`)
- Session and roles → User service: refreshes profile (evidence: `src/context/AuthContext.tsx`)
- Authentication service → Supabase / demo store: auth and profile access (evidence: `src/services/authService.ts`)
- Authentication service → Data mappers: maps profile (evidence: `src/services/authService.ts`)
- Student → Role-based routes: opens role routes (evidence: `src/App.tsx`)
- Tutor → Role-based routes: opens role routes (evidence: `src/App.tsx`)
- Coordinator → Role-based routes: opens role routes (evidence: `src/App.tsx`)
- Role-based routes → Progress dashboard: routes to (evidence: `src/App.tsx`)
- Role-based routes → Submit evidence: routes to (evidence: `src/App.tsx`)
- Role-based routes → Evidence history: routes to (evidence: `src/App.tsx`)
- Role-based routes → Advisee records: routes to (evidence: `src/App.tsx`)
- Role-based routes → Advisee detail: routes to (evidence: `src/App.tsx`)
- Role-based routes → Workshop management: routes to (evidence: `src/App.tsx`)
- Role-based routes → Workshop detail: routes to (evidence: `src/App.tsx`)
- Role-based routes → Overview dashboard: routes to (evidence: `src/App.tsx`)
- Role-based routes → Evidence validation: routes to (evidence: `src/App.tsx`)
- Role-based routes → User administration: routes to (evidence: `src/App.tsx`)
- Role-based routes → Workshop review: routes to (evidence: `src/App.tsx`)
- Role-based routes → Business rules: routes to (evidence: `src/App.tsx`)
- Role-based routes → Reports and export: routes to (evidence: `src/App.tsx`)
- Submit evidence → Data services: submits evidence (evidence: `src/pages/alumno/SubirConstanciaPage.tsx`)
- Data services → Supabase / demo store: uses configured backend (evidence: `src/services/authService.ts`)
- Progress dashboard → Data services: loads progress
- Evidence history → Data services: loads history
- Advisee records → Data services: loads advisees
- Advisee detail → Data services: loads record
- Workshop management → Workshop service: manages workshops
- Workshop detail → Workshop service: updates participants (evidence: `src/pages/tutor/TallerDetallePage.tsx`)
- Workshop review → Workshop service: reviews workshops
- User administration → User service: administers users (evidence: `src/pages/coordinador/UsuariosPage.tsx`)
- Evidence validation → Data services: reviews evidence
- Business rules → Data services: configures rules
- Reports and export → Data services: requests reports
- Workshop service → Supabase / demo store: reads and writes (evidence: `src/services/talleresService.ts`)
- Workshop service → Data mappers: maps records (evidence: `src/services/talleresService.ts`)
- User service → Supabase / demo store: reads and writes (evidence: `src/services/usuariosService.ts`)
- User service → Data mappers: maps records (evidence: `src/services/usuariosService.ts`)
- Coordinator → Admin edge function: administers accounts (evidence: `README.md`)
- Shared UI components → Role-based routes: supports screens
