# jhonatansanga-58/uepv-app-web architecture

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

- Interactive diagram: https://gitdiagram.com/jhonatansanga-58/uepv-app-web
- Repository: https://github.com/jhonatansanga-58/uepv-app-web

## Overview

This repository implements school administration across a Next.js web app and an Expo mobile app. Users manage students, courses, subjects, attendance, leave requests, and notices; mobile users also authenticate and access attendance, leave, and notice capabilities. The sampled server handlers show API-to-Prisma reads and writes, plus attendance push notifications. Many page and mobile feature files are present in the tree but were not sampled, so their detailed call paths are not asserted here.

Main entry points: [`src/lib/prisma.ts`](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/lib/prisma.ts) (Prisma database access), [`src/app/api/attendance/route.ts`](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/attendance/route.ts) (Attendance API), [`mobile-expo/my-expo-app/services/auth.ts`](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/mobile-expo/my-expo-app/services/auth.ts) (Mobile authentication), [`src/app/api/students/route.ts`](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/students/route.ts) (Student API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_web_auth["Web authentication<br/>[page.tsx]"]
  node_web_admin["Administration"]
  node_web_attendance["Attendance pages"]
  node_web_leaves["Leave pages"]
  node_web_notices["Notice pages"]
  node_web_dashboard["Dashboard<br/>[page.tsx]"]
end

subgraph group_mobile["Mobile app"]
  node_mobile_auth["Mobile authentication<br/>[auth.ts]"]
  node_mobile_attendance["Mobile attendance"]
  node_mobile_licences["Leave and licences"]
  node_mobile_notices["Mobile notices"]
end

subgraph group_api["Application API"]
  node_api_attendance["Attendance API<br/>[route.ts]"]
  node_api_students["Student API<br/>[route.ts]"]
  node_api_leaves["Leave request API<br/>[route.ts]"]
  node_api_notices["Notice APIs"]
  node_api_academics["Academic APIs<br/>[route.ts]"]
  node_api_mobile["Mobile APIs"]
  node_api_auth["Web auth API<br/>[route.ts]"]
end

subgraph group_data["Persistence and messaging"]
  node_database[("Prisma database access<br/>[prisma.ts]")]
  node_push["Firebase push service<br/>[notifications.js]"]
end

node_web_user(("School user"))
node_mobile_user(("Mobile user"))

node_web_user -.->|"signs in"| node_web_auth
node_web_user -.->|"manages records"| node_web_admin
node_web_user -.->|"records attendance"| node_web_attendance
node_web_user -.->|"reviews leave"| node_web_leaves
node_web_user -.->|"manages notices"| node_web_notices
node_web_user -.->|"views overview"| node_web_dashboard
node_mobile_user -.->|"authenticates"| node_mobile_auth
node_mobile_user -.->|"uses attendance"| node_mobile_attendance
node_mobile_user -.->|"requests leave"| node_mobile_licences
node_mobile_user -.->|"views notices"| node_mobile_notices
node_mobile_auth -->|"posts login"| node_api_mobile
node_api_attendance -->|"reads and writes"| node_database
node_api_attendance -->|"sends multicast"| node_push
node_api_students -->|"reads and writes"| node_database
node_api_leaves -->|"reads and writes"| node_database
node_api_notices -->|"reads and writes"| node_database
node_api_academics -->|"reads and writes"| node_database
node_api_auth -->|"uses database"| node_database

click node_web_auth "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/(auth)/login/page.tsx"
click node_web_admin "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/admin"
click node_web_attendance "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/attendances"
click node_web_leaves "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/leaves"
click node_web_notices "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/notices"
click node_web_dashboard "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/(main)/dashboard/page.tsx"
click node_mobile_auth "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/mobile-expo/my-expo-app/services/auth.ts"
click node_mobile_attendance "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/mobile-expo/my-expo-app/screens/AttendanceScreen.tsx"
click node_mobile_licences "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/mobile-expo/my-expo-app/app/(main)/(drawer)/(licences)"
click node_mobile_notices "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/mobile-expo/my-expo-app/app/(main)/(drawer)/(notices)"
click node_api_attendance "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/attendance/route.ts"
click node_api_students "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/students/route.ts"
click node_api_leaves "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/leaverequest/route.ts"
click node_api_notices "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/api/notices"
click node_api_academics "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/courses/route.ts"
click node_api_mobile "https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/api/mobile"
click node_api_auth "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_database "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/lib/prisma.ts"
click node_push "https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/utils/notifications.js"

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_web_auth,node_web_admin,node_web_attendance,node_web_leaves,node_web_notices,node_web_dashboard,node_web_user,node_mobile_user toneBlue
class node_mobile_auth,node_mobile_attendance,node_mobile_licences,node_mobile_notices toneAmber
class node_api_attendance,node_api_students,node_api_leaves,node_api_notices,node_api_academics,node_api_mobile,node_api_auth toneMint
class node_database,node_push toneRose
```

## Components

### Web experience

- [Web authentication](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/(auth)/login/page.tsx): `src/app/(auth)/login/page.tsx`
- [Administration](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/admin): `src/app/(main)/admin`
- [Attendance pages](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/attendances): `src/app/(main)/attendances`
- [Leave pages](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/leaves): `src/app/(main)/leaves`
- [Notice pages](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/(main)/notices): `src/app/(main)/notices`
- [Dashboard](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/(main)/dashboard/page.tsx): `src/app/(main)/dashboard/page.tsx`

### Mobile app

- [Mobile authentication](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/mobile-expo/my-expo-app/services/auth.ts): `mobile-expo/my-expo-app/services/auth.ts`
- [Mobile attendance](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/mobile-expo/my-expo-app/screens/AttendanceScreen.tsx): `mobile-expo/my-expo-app/screens/AttendanceScreen.tsx`
- [Leave and licences](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/mobile-expo/my-expo-app/app/(main)/(drawer)/(licences)): `mobile-expo/my-expo-app/app/(main)/(drawer)/(licences)`
- [Mobile notices](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/mobile-expo/my-expo-app/app/(main)/(drawer)/(notices)): `mobile-expo/my-expo-app/app/(main)/(drawer)/(notices)`

### Application API

- [Attendance API](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/attendance/route.ts): `src/app/api/attendance/route.ts`
- [Student API](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/students/route.ts): `src/app/api/students/route.ts`
- [Leave request API](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/leaverequest/route.ts): `src/app/api/leaverequest/route.ts`
- [Notice APIs](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/api/notices): `src/app/api/notices`
- [Academic APIs](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/courses/route.ts): `src/app/api/courses/route.ts`
- [Mobile APIs](https://github.com/jhonatansanga-58/uepv-app-web/tree/master/src/app/api/mobile): `src/app/api/mobile`
- [Web auth API](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/app/api/auth/%5B...nextauth%5D/route.ts): `src/app/api/auth/[...nextauth]/route.ts`

### Persistence and messaging

- [Prisma database access](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/lib/prisma.ts): `src/lib/prisma.ts`
- [Firebase push service](https://github.com/jhonatansanga-58/uepv-app-web/blob/master/src/utils/notifications.js): `src/utils/notifications.js`

### Other components

- **School user**
- **Mobile user**

## Connections

- School user → Web authentication: signs in
- School user → Administration: manages records
- School user → Attendance pages: records attendance
- School user → Leave pages: reviews leave
- School user → Notice pages: manages notices
- School user → Dashboard: views overview
- Mobile user → Mobile authentication: authenticates
- Mobile user → Mobile attendance: uses attendance
- Mobile user → Leave and licences: requests leave
- Mobile user → Mobile notices: views notices
- Mobile authentication → Mobile APIs: posts login (evidence: `mobile-expo/my-expo-app/services/auth.ts`)
- Attendance API → Prisma database access: reads and writes (evidence: `src/app/api/attendance/route.ts`)
- Attendance API → Firebase push service: sends multicast (evidence: `src/app/api/attendance/route.ts`)
- Student API → Prisma database access: reads and writes (evidence: `src/app/api/students/route.ts`)
- Leave request API → Prisma database access: reads and writes (evidence: `src/app/api/leaverequest/route.ts`)
- Notice APIs → Prisma database access: reads and writes (evidence: `src/app/api/notices/notifications/route.ts`)
- Academic APIs → Prisma database access: reads and writes (evidence: `src/app/api/courses/route.ts`)
- Web auth API → Prisma database access: uses database (evidence: `src/app/api/auth/[...nextauth]/route.ts`)
