# bonifacho/sintesis_mobile architecture

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

- Interactive diagram: https://gitdiagram.com/bonifacho/sintesis_mobile
- Repository: https://github.com/bonifacho/sintesis_mobile

## Overview

SÍNTESIS is a role-based mobile learning platform: users authenticate, then enter student, teacher, or trainee experiences. Students browse subjects and OVAs, take assessments, and review results and progress; teachers manage groups and inspect student activity and results; trainees have read-only group and student oversight. The API client handles authenticated requests and trainee write restrictions, while auth state persists the session. Feature-level API wiring is based on the README and tree where screen source was not sampled.

Main entry points: [`src/api/academic.ts`](https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/academic.ts) (Academic API), [`src/api/client.ts`](https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/client.ts) (HTTP client), [`app/index.tsx`](https://github.com/bonifacho/sintesis_mobile/blob/main/app/index.tsx) (Role routing), [`src/store/authStore.ts`](https://github.com/bonifacho/sintesis_mobile/blob/main/src/store/authStore.ts) (Session state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_router["Role routing<br/>[index.tsx]"]
  node_authscreens["Sign in<br/>[login.tsx]"]
end

subgraph group_learning["Learning experience"]
  node_studenthome["Student home<br/>[index.tsx]"]
  node_subjects["Subjects<br/>[index.tsx]"]
  node_ova["OVA browsing<br/>[index.tsx]"]
  node_video["OVA media<br/>[&#91;id&#93;.tsx]"]
  node_exam["Assessment<br/>[&#91;ovaId&#93;.tsx]"]
  node_result["Exam result<br/>[&#91;attemptId&#93;.tsx]"]
  node_progress["Student progress<br/>[index.tsx]"]
end

subgraph group_oversight["Academic oversight"]
  node_teacherhome["Teacher groups<br/>[index.tsx]"]
  node_students["Student oversight<br/>[index.tsx]"]
  node_activity["Group activity<br/>[index.tsx]"]
  node_teacherresults["Teacher results<br/>[index.tsx]"]
  node_traineehome["Trainee groups<br/>[index.tsx]"]
  node_traineestudents["Observed students<br/>[index.tsx]"]
  node_traineestats["Trainee metrics<br/>[index.tsx]"]
end

subgraph group_platform["Client platform"]
  node_authapi["Auth API<br/>[auth.ts]"]
  node_academicapi["Academic API<br/>[academic.ts]"]
  node_client["HTTP client<br/>[client.ts]"]
  node_authstore[("Session state<br/>[authStore.ts]")]
  node_academicmodels["Academic models<br/>[academic.ts]"]
  node_academicqueries["Academic queries<br/>[useAcademic.ts]"]
end

node_user(("User"))
node_backend[("Learning backend")]

node_user -->|"signs in"| node_authscreens
node_authscreens -->|"submits credentials"| node_authapi
node_authapi -->|"sends request"| node_client
node_client -->|"requests data"| node_backend
node_authapi -->|"sets session"| node_authstore
node_authstore -->|"provides role"| node_router
node_router -->|"routes student"| node_studenthome
node_router -->|"routes teacher"| node_teacherhome
node_router -->|"routes trainee"| node_traineehome
node_studenthome -->|"loads summary"| node_academicapi
node_subjects -->|"loads subjects"| node_academicapi
node_ova -->|"loads OVAs"| node_academicapi
node_video -->|"loads OVA"| node_academicapi
node_exam -->|"submits assessment"| node_academicapi
node_result -->|"loads result"| node_academicapi
node_progress -->|"loads metrics"| node_academicapi
node_teacherhome -->|"loads groups"| node_academicapi
node_students -->|"loads students"| node_academicapi
node_activity -->|"loads activity"| node_academicapi
node_teacherresults -->|"loads results"| node_academicapi
node_traineehome -->|"loads groups"| node_academicapi
node_traineestudents -->|"loads students"| node_academicapi
node_traineestats -->|"loads metrics"| node_academicapi
node_academicqueries -->|"queries data"| node_academicapi
node_academicapi -->|"sends requests"| node_client
node_academicapi -->|"uses types"| node_academicmodels
node_client -->|"reads token"| node_authstore
node_client -->|"blocks trainee writes"| node_authstore

click node_router "https://github.com/bonifacho/sintesis_mobile/blob/main/app/index.tsx"
click node_authscreens "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(auth)/login.tsx"
click node_studenthome "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/index.tsx"
click node_subjects "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/subjects/index.tsx"
click node_ova "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/index.tsx"
click node_video "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/video/%5Bid%5D.tsx"
click node_exam "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/exam/%5BovaId%5D.tsx"
click node_result "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/exam/result/%5BattemptId%5D.tsx"
click node_progress "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/progress/index.tsx"
click node_teacherhome "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/index.tsx"
click node_students "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/students/index.tsx"
click node_activity "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/activity/index.tsx"
click node_teacherresults "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/results/index.tsx"
click node_traineehome "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/index.tsx"
click node_traineestudents "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/students/index.tsx"
click node_traineestats "https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/stats/index.tsx"
click node_authapi "https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/auth.ts"
click node_academicapi "https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/academic.ts"
click node_client "https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/client.ts"
click node_authstore "https://github.com/bonifacho/sintesis_mobile/blob/main/src/store/authStore.ts"
click node_academicmodels "https://github.com/bonifacho/sintesis_mobile/blob/main/src/models/academic.ts"
click node_academicqueries "https://github.com/bonifacho/sintesis_mobile/blob/main/src/hooks/useAcademic.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_router,node_authscreens,node_user toneBlue
class node_studenthome,node_subjects,node_ova,node_video,node_exam,node_result,node_progress,node_backend toneAmber
class node_teacherhome,node_students,node_activity,node_teacherresults,node_traineehome,node_traineestudents,node_traineestats toneMint
class node_authapi,node_academicapi,node_client,node_authstore,node_academicmodels,node_academicqueries toneRose
```

## Components

### App navigation

- [Role routing](https://github.com/bonifacho/sintesis_mobile/blob/main/app/index.tsx): `app/index.tsx`
- [Sign in](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(auth)/login.tsx): `app/(auth)/login.tsx`

### Learning experience

- [Student home](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/index.tsx): `app/(student)/index.tsx`
- [Subjects](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/subjects/index.tsx): `app/(student)/subjects/index.tsx`
- [OVA browsing](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/index.tsx): `app/(student)/ovas/index.tsx`
- [OVA media](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/video/%5Bid%5D.tsx): `app/(student)/ovas/video/[id].tsx`
- [Assessment](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/exam/%5BovaId%5D.tsx): `app/(student)/ovas/exam/[ovaId].tsx`
- [Exam result](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/ovas/exam/result/%5BattemptId%5D.tsx): `app/(student)/ovas/exam/result/[attemptId].tsx`
- [Student progress](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(student)/progress/index.tsx): `app/(student)/progress/index.tsx`

### Academic oversight

- [Teacher groups](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/index.tsx): `app/(teacher)/index.tsx`
- [Student oversight](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/students/index.tsx): `app/(teacher)/students/index.tsx`
- [Group activity](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/activity/index.tsx): `app/(teacher)/activity/index.tsx`
- [Teacher results](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(teacher)/results/index.tsx): `app/(teacher)/results/index.tsx`
- [Trainee groups](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/index.tsx): `app/(trainee)/index.tsx`
- [Observed students](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/students/index.tsx): `app/(trainee)/students/index.tsx`
- [Trainee metrics](https://github.com/bonifacho/sintesis_mobile/blob/main/app/(trainee)/stats/index.tsx): `app/(trainee)/stats/index.tsx`

### Client platform

- [Auth API](https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/auth.ts): `src/api/auth.ts`
- [Academic API](https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/academic.ts): `src/api/academic.ts`
- [HTTP client](https://github.com/bonifacho/sintesis_mobile/blob/main/src/api/client.ts): `src/api/client.ts`
- [Session state](https://github.com/bonifacho/sintesis_mobile/blob/main/src/store/authStore.ts): `src/store/authStore.ts`
- [Academic models](https://github.com/bonifacho/sintesis_mobile/blob/main/src/models/academic.ts): `src/models/academic.ts`
- [Academic queries](https://github.com/bonifacho/sintesis_mobile/blob/main/src/hooks/useAcademic.ts): `src/hooks/useAcademic.ts`

### Other components

- **User**
- **Learning backend**

## Connections

- User → Sign in: signs in
- Sign in → Auth API: submits credentials
- Auth API → HTTP client: sends request
- HTTP client → Learning backend: requests data
- Auth API → Session state: sets session
- Session state → Role routing: provides role
- Role routing → Student home: routes student
- Role routing → Teacher groups: routes teacher
- Role routing → Trainee groups: routes trainee
- Student home → Academic API: loads summary
- Subjects → Academic API: loads subjects
- OVA browsing → Academic API: loads OVAs
- OVA media → Academic API: loads OVA
- Assessment → Academic API: submits assessment
- Exam result → Academic API: loads result
- Student progress → Academic API: loads metrics
- Teacher groups → Academic API: loads groups
- Student oversight → Academic API: loads students
- Group activity → Academic API: loads activity
- Teacher results → Academic API: loads results
- Trainee groups → Academic API: loads groups
- Observed students → Academic API: loads students
- Trainee metrics → Academic API: loads metrics
- Academic queries → Academic API: queries data
- Academic API → HTTP client: sends requests
- Academic API → Academic models: uses types
- HTTP client → Session state: reads token
- HTTP client → Session state: blocks trainee writes
