# ceqinformatica/ceq-app architecture

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

- Interactive diagram: https://gitdiagram.com/ceqinformatica/ceq-app
- Repository: https://github.com/ceqinformatica/ceq-app

## Overview

Portal CEQ is a student-facing Expo app backed by its own Supabase project, with an admin area for managing CEQ content. The main journey is login and profile setup, then academic planning and tracking (curriculum, progress, and signature), alongside agenda and CEQ services. Academic screens use data access and calculation modules; authentication and session state support access to the app. The README documents these capabilities and the data-layer split. Some route and admin implementations were not sampled, so their internal calls are not asserted.

Main entry points: [`src/app/materia/[id].tsx`](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/materia/%5Bid%5D.tsx) (Subject details), [`src/datos/academico.ts`](https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/academico.ts) (Academic data access), [`src/app/(tabs)/carrera.tsx`](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/carrera.tsx) (Career and curriculum), [`src/components/academico.tsx`](https://github.com/ceqinformatica/ceq-app/blob/main/src/components/academico.tsx) (Academic components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and session"]
  node_login["Login and onboarding<br/>[login.tsx]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_session["Session and profile<br/>[SesionProvider.tsx]"]
end

subgraph group_academic["Academic journey"]
  node_home["Home<br/>[index.tsx]"]
  node_career["Career and curriculum<br/>[carrera.tsx]"]
  node_subject["Subject details<br/>[&#91;id&#93;.tsx]"]
  node_signature["Signature calculator<br/>[firma.ts]"]
  node_progress["Career progress<br/>[progreso.ts]"]
  node_finals["Finals rules and results<br/>[finales.ts]"]
  node_regulations["FCQ signature rules<br/>[reglamento-fcq.ts]"]
end

subgraph group_services["Student services"]
  node_agenda["Agenda<br/>[agenda.tsx]"]
  node_ceq["CEQ modules<br/>[ceq.tsx]"]
  node_admin["Admin area<br/>[index.tsx]"]
end

subgraph group_platform["Data and presentation"]
  node_academicdata["Academic data access<br/>[academico.ts]"]
  node_demo[("Demo data<br/>[demo.ts]")]
  node_datahook["Data and cache hook<br/>[usarDatos.ts]"]
  node_academicui["Academic components<br/>[academico.tsx]"]
  node_ui["Shared interface<br/>[ui.tsx]"]
  node_motion["Motion and feedback<br/>[movimiento.tsx]"]
  node_themeprovider["Theme preference<br/>[TemaProvider.tsx]"]
  node_theme["Theme definitions<br/>[tema.ts]"]
  node_types["Database types<br/>[tipos-db.ts]"]
  node_classtype["Class type rules<br/>[tipo-clase.ts]"]
  node_errors["Error handling<br/>[errores.ts]"]
end

node_student(("Student"))
node_supabase[("Supabase")]

node_student -->|"starts with"| node_login
node_login -.->|"signs in"| node_auth
node_auth -->|"authenticates"| node_supabase
node_session -.->|"loads profile"| node_supabase
node_student -->|"opens app"| node_home
node_home -->|"opens career"| node_career
node_career -.->|"views subject"| node_subject
node_subject -->|"loads academic data"| node_academicdata
node_subject -->|"calculates signature"| node_signature
node_subject -->|"calculates progress"| node_progress
node_subject -->|"uses finals rules"| node_finals
node_signature -->|"reads rules"| node_regulations
node_academicdata -->|"reads and writes"| node_supabase
node_academicdata -->|"uses demo mode"| node_demo
node_student -->|"opens agenda"| node_agenda
node_student -->|"opens CEQ"| node_ceq
node_admin -.->|"manages content"| node_supabase
node_career -.->|"renders academic UI"| node_academicui
node_academicui -->|"uses controls"| node_ui
node_academicui -->|"uses interactions"| node_motion
node_themeprovider -->|"sets scheme"| node_theme
node_ui -->|"uses styles"| node_theme
node_academicdata -->|"uses data types"| node_types
node_types -->|"uses class types"| node_classtype
node_academicdata -->|"translates errors"| node_errors
node_student -.->|"loads screen data"| node_datahook

click node_login "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/login.tsx"
click node_auth "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/auth.ts"
click node_session "https://github.com/ceqinformatica/ceq-app/blob/main/src/context/SesionProvider.tsx"
click node_home "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/index.tsx"
click node_career "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/carrera.tsx"
click node_subject "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/materia/%5Bid%5D.tsx"
click node_signature "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/firma.ts"
click node_progress "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/progreso.ts"
click node_finals "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/finales.ts"
click node_academicdata "https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/academico.ts"
click node_agenda "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/agenda.tsx"
click node_ceq "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/ceq.tsx"
click node_admin "https://github.com/ceqinformatica/ceq-app/blob/main/src/app/admin/index.tsx"
click node_demo "https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/demo.ts"
click node_datahook "https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/usarDatos.ts"
click node_regulations "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/reglamento-fcq.ts"
click node_academicui "https://github.com/ceqinformatica/ceq-app/blob/main/src/components/academico.tsx"
click node_ui "https://github.com/ceqinformatica/ceq-app/blob/main/src/components/ui.tsx"
click node_motion "https://github.com/ceqinformatica/ceq-app/blob/main/src/components/movimiento.tsx"
click node_themeprovider "https://github.com/ceqinformatica/ceq-app/blob/main/src/context/TemaProvider.tsx"
click node_theme "https://github.com/ceqinformatica/ceq-app/blob/main/src/tema.ts"
click node_types "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/tipos-db.ts"
click node_classtype "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/tipo-clase.ts"
click node_errors "https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/errores.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_login,node_auth,node_session toneBlue
class node_home,node_career,node_subject,node_signature,node_progress,node_finals,node_regulations,node_supabase toneAmber
class node_agenda,node_ceq,node_admin toneMint
class node_academicdata,node_demo,node_datahook,node_academicui,node_ui,node_motion,node_themeprovider,node_theme,node_types,node_classtype,node_errors toneRose
class node_student toneIndigo
```

## Components

### Access and session

- [Login and onboarding](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/login.tsx): `src/app/login.tsx`
- [Authentication](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Session and profile](https://github.com/ceqinformatica/ceq-app/blob/main/src/context/SesionProvider.tsx): `src/context/SesionProvider.tsx`

### Academic journey

- [Home](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/index.tsx): `src/app/(tabs)/index.tsx`
- [Career and curriculum](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/carrera.tsx): `src/app/(tabs)/carrera.tsx`
- [Subject details](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/materia/%5Bid%5D.tsx): `src/app/materia/[id].tsx`
- [Signature calculator](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/firma.ts): `src/lib/firma.ts`
- [Career progress](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/progreso.ts): `src/lib/progreso.ts`
- [Finals rules and results](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/finales.ts): `src/lib/finales.ts`
- [FCQ signature rules](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/reglamento-fcq.ts): `src/lib/reglamento-fcq.ts`

### Student services

- [Agenda](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/agenda.tsx): `src/app/(tabs)/agenda.tsx`
- [CEQ modules](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/(tabs)/ceq.tsx): `src/app/(tabs)/ceq.tsx`
- [Admin area](https://github.com/ceqinformatica/ceq-app/blob/main/src/app/admin/index.tsx): `src/app/admin/index.tsx`

### Data and presentation

- [Academic data access](https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/academico.ts): `src/datos/academico.ts`
- [Demo data](https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/demo.ts): `src/datos/demo.ts`
- [Data and cache hook](https://github.com/ceqinformatica/ceq-app/blob/main/src/datos/usarDatos.ts): `src/datos/usarDatos.ts`
- [Academic components](https://github.com/ceqinformatica/ceq-app/blob/main/src/components/academico.tsx): `src/components/academico.tsx`
- [Shared interface](https://github.com/ceqinformatica/ceq-app/blob/main/src/components/ui.tsx): `src/components/ui.tsx`
- [Motion and feedback](https://github.com/ceqinformatica/ceq-app/blob/main/src/components/movimiento.tsx): `src/components/movimiento.tsx`
- [Theme preference](https://github.com/ceqinformatica/ceq-app/blob/main/src/context/TemaProvider.tsx): `src/context/TemaProvider.tsx`
- [Theme definitions](https://github.com/ceqinformatica/ceq-app/blob/main/src/tema.ts): `src/tema.ts`
- [Database types](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/tipos-db.ts): `src/lib/tipos-db.ts`
- [Class type rules](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/tipo-clase.ts): `src/lib/tipo-clase.ts`
- [Error handling](https://github.com/ceqinformatica/ceq-app/blob/main/src/lib/errores.ts): `src/lib/errores.ts`

### Other components

- **Student**
- **Supabase**

## Connections

- Student → Login and onboarding: starts with
- Login and onboarding → Authentication: signs in
- Authentication → Supabase: authenticates (evidence: `src/lib/auth.ts`)
- Session and profile → Supabase: loads profile
- Student → Home: opens app
- Home → Career and curriculum: opens career
- Career and curriculum → Subject details: views subject
- Subject details → Academic data access: loads academic data (evidence: `src/app/materia/[id].tsx`)
- Subject details → Signature calculator: calculates signature (evidence: `src/app/materia/[id].tsx`)
- Subject details → Career progress: calculates progress (evidence: `src/app/materia/[id].tsx`)
- Subject details → Finals rules and results: uses finals rules (evidence: `src/app/materia/[id].tsx`)
- Signature calculator → FCQ signature rules: reads rules (evidence: `src/lib/reglamento-fcq.ts`)
- Academic data access → Supabase: reads and writes
- Academic data access → Demo data: uses demo mode (evidence: `src/datos/academico.ts`)
- Student → Agenda: opens agenda
- Student → CEQ modules: opens CEQ
- Admin area → Supabase: manages content
- Career and curriculum → Academic components: renders academic UI
- Academic components → Shared interface: uses controls (evidence: `src/components/academico.tsx`)
- Academic components → Motion and feedback: uses interactions (evidence: `src/components/academico.tsx`)
- Theme preference → Theme definitions: sets scheme (evidence: `src/context/TemaProvider.tsx`)
- Shared interface → Theme definitions: uses styles (evidence: `src/components/ui.tsx`)
- Academic data access → Database types: uses data types (evidence: `src/datos/academico.ts`)
- Database types → Class type rules: uses class types (evidence: `src/lib/tipos-db.ts`)
- Academic data access → Error handling: translates errors (evidence: `src/datos/academico.ts`)
- Student → Data and cache hook: loads screen data
