# jazmanudin27/e-sekolah architecture

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

- Interactive diagram: https://gitdiagram.com/jazmanudin27/e-sekolah
- Repository: https://github.com/jazmanudin27/e-sekolah

## Overview

E-Sekolah is a unified school-attendance and administration product: teachers, class accounts, and administrators use web or Android clients backed by one REST API. The main workflow is sign-in, then recording or reviewing teacher and student attendance, schedules, leave requests, and reports; administrators also manage school data. The graph follows the documented client/API/layered-server structure. Sampled source confirms app routing, API authentication, teacher-presence logic, leave handling, and tenant database selection; unsampled feature wiring is shown only where documented.

Main entry points: [`src/models`](https://github.com/jazmanudin27/e-sekolah/tree/main/src/models) (SQL models), [`src/routes/index.js`](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/index.js) (API routes), [`client/src/App.jsx`](https://github.com/jazmanudin27/e-sekolah/blob/main/client/src/App.jsx) (Web application), [`src/server.js`](https://github.com/jazmanudin27/e-sekolah/blob/main/src/server.js) (Express server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Clients"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_httpclient["API client<br/>[client.js]"]
  node_android["Android shell<br/>[MainActivity.java]"]
end

subgraph group_api["API runtime"]
  node_server["Express server<br/>[server.js]"]
  node_routes["API routes<br/>[index.js]"]
  node_authroutes["Auth routes<br/>[auth.routes.js]"]
  node_presenceroutes["Presence routes<br/>[presensi.routes.js]"]
  node_studentroutes["Student attendance routes"]
  node_subjectroutes["Subject attendance routes"]
  node_rekaproutes["Report routes<br/>[rekap.routes.js]"]
  node_masterroutes["School data routes<br/>[kelas.routes.js]"]
end

subgraph group_domain["School workflows"]
  node_auth["Sign-in and profile<br/>[auth.controller.js]"]
  node_presence["Teacher presence"]
  node_studentattendance["Daily attendance"]
  node_subjectattendance["Subject attendance"]
  node_leave["Leave requests<br/>[izin.controller.js]"]
  node_schedule["Schedules"]
  node_dashboard["Dashboard summary"]
  node_reports["Attendance reports"]
  node_schooldata["School master data"]
end

subgraph group_storage["Persistence"]
  node_models["SQL models"]
  node_tenantdb["Tenant database access<br/>[database.js]"]
end

node_users(("School users"))
node_mysql[("MySQL databases")]

node_users -->|"use"| node_webapp
node_webapp -->|"sign in"| node_auth
node_webapp -->|"request data"| node_httpclient
node_android -->|"use API"| node_server
node_httpclient -->|"HTTP requests"| node_server
node_server -->|"mount /api"| node_routes
node_routes -->|"dispatch"| node_authroutes
node_routes -->|"dispatch"| node_presenceroutes
node_routes -->|"dispatch"| node_studentroutes
node_routes -->|"dispatch"| node_subjectroutes
node_routes -->|"dispatch"| node_rekaproutes
node_routes -->|"dispatch"| node_masterroutes
node_authroutes -->|"invoke"| node_auth
node_presenceroutes -->|"invoke"| node_presence
node_studentroutes -->|"invoke"| node_studentattendance
node_subjectroutes -->|"invoke"| node_subjectattendance
node_rekaproutes -->|"invoke"| node_reports
node_masterroutes -->|"invoke"| node_schooldata
node_auth -->|"read accounts"| node_models
node_presence -->|"read/write presence"| node_models
node_studentattendance -->|"attendance data"| node_models
node_subjectattendance -->|"attendance data"| node_models
node_leave -->|"leave records"| node_models
node_schedule -->|"schedule data"| node_models
node_dashboard -->|"summary data"| node_models
node_reports -->|"report data"| node_models
node_schooldata -->|"school records"| node_models
node_models -->|"execute queries"| node_tenantdb
node_tenantdb -->|"select tenant pool"| node_mysql

click node_webapp "https://github.com/jazmanudin27/e-sekolah/blob/main/client/src/App.jsx"
click node_httpclient "https://github.com/jazmanudin27/e-sekolah/blob/main/client/src/api/client.js"
click node_android "https://github.com/jazmanudin27/e-sekolah/blob/main/client/android/app/src/main/java/com/esekolah/app/MainActivity.java"
click node_server "https://github.com/jazmanudin27/e-sekolah/blob/main/src/server.js"
click node_routes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/index.js"
click node_authroutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/auth.routes.js"
click node_presenceroutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/presensi.routes.js"
click node_studentroutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/absensiSiswa.routes.js"
click node_subjectroutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/absensiMapel.routes.js"
click node_rekaproutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/rekap.routes.js"
click node_masterroutes "https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/kelas.routes.js"
click node_auth "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/auth.controller.js"
click node_presence "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/presensi.controller.js"
click node_studentattendance "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/absensiSiswa.controller.js"
click node_subjectattendance "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/absensiMapel.controller.js"
click node_leave "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/izin.controller.js"
click node_schedule "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/jadwal.controller.js"
click node_dashboard "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/dashboard.controller.js"
click node_reports "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/rekap.controller.js"
click node_schooldata "https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/kelas.controller.js"
click node_models "https://github.com/jazmanudin27/e-sekolah/tree/main/src/models"
click node_tenantdb "https://github.com/jazmanudin27/e-sekolah/blob/main/src/config/database.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_webapp,node_httpclient,node_android,node_users toneBlue
class node_server,node_routes,node_authroutes,node_presenceroutes,node_studentroutes,node_subjectroutes,node_rekaproutes,node_masterroutes,node_mysql toneAmber
class node_auth,node_presence,node_studentattendance,node_subjectattendance,node_leave,node_schedule,node_dashboard,node_reports,node_schooldata toneMint
class node_models,node_tenantdb toneRose
```

## Components

### Clients

- [Web application](https://github.com/jazmanudin27/e-sekolah/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [API client](https://github.com/jazmanudin27/e-sekolah/blob/main/client/src/api/client.js): `client/src/api/client.js`
- [Android shell](https://github.com/jazmanudin27/e-sekolah/blob/main/client/android/app/src/main/java/com/esekolah/app/MainActivity.java): `client/android/app/src/main/java/com/esekolah/app/MainActivity.java`

### API runtime

- [Express server](https://github.com/jazmanudin27/e-sekolah/blob/main/src/server.js): `src/server.js`
- [API routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/index.js): `src/routes/index.js`
- [Auth routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/auth.routes.js): `src/routes/auth.routes.js`
- [Presence routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/presensi.routes.js): `src/routes/presensi.routes.js`
- [Student attendance routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/absensiSiswa.routes.js): `src/routes/absensiSiswa.routes.js`
- [Subject attendance routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/absensiMapel.routes.js): `src/routes/absensiMapel.routes.js`
- [Report routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/rekap.routes.js): `src/routes/rekap.routes.js`
- [School data routes](https://github.com/jazmanudin27/e-sekolah/blob/main/src/routes/kelas.routes.js): `src/routes/kelas.routes.js`

### School workflows

- [Sign-in and profile](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/auth.controller.js): `src/controllers/auth.controller.js`
- [Teacher presence](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/presensi.controller.js): `src/controllers/presensi.controller.js`
- [Daily attendance](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/absensiSiswa.controller.js): `src/controllers/absensiSiswa.controller.js`
- [Subject attendance](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/absensiMapel.controller.js): `src/controllers/absensiMapel.controller.js`
- [Leave requests](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/izin.controller.js): `src/controllers/izin.controller.js`
- [Schedules](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/jadwal.controller.js): `src/controllers/jadwal.controller.js`
- [Dashboard summary](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/dashboard.controller.js): `src/controllers/dashboard.controller.js`
- [Attendance reports](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/rekap.controller.js): `src/controllers/rekap.controller.js`
- [School master data](https://github.com/jazmanudin27/e-sekolah/blob/main/src/controllers/kelas.controller.js): `src/controllers/kelas.controller.js`

### Persistence

- [SQL models](https://github.com/jazmanudin27/e-sekolah/tree/main/src/models): `src/models`
- [Tenant database access](https://github.com/jazmanudin27/e-sekolah/blob/main/src/config/database.js): `src/config/database.js`

### Other components

- **School users**
- **MySQL databases**

## Connections

- School users → Web application: use
- Web application → Sign-in and profile: sign in
- Web application → API client: request data
- Android shell → Express server: use API
- API client → Express server: HTTP requests
- Express server → API routes: mount /api
- API routes → Auth routes: dispatch
- API routes → Presence routes: dispatch
- API routes → Student attendance routes: dispatch
- API routes → Subject attendance routes: dispatch
- API routes → Report routes: dispatch
- API routes → School data routes: dispatch
- Auth routes → Sign-in and profile: invoke
- Presence routes → Teacher presence: invoke
- Student attendance routes → Daily attendance: invoke
- Subject attendance routes → Subject attendance: invoke
- Report routes → Attendance reports: invoke
- School data routes → School master data: invoke
- Sign-in and profile → SQL models: read accounts
- Teacher presence → SQL models: read/write presence
- Daily attendance → SQL models: attendance data
- Subject attendance → SQL models: attendance data
- Leave requests → SQL models: leave records
- Schedules → SQL models: schedule data
- Dashboard summary → SQL models: summary data
- Attendance reports → SQL models: report data
- School master data → SQL models: school records
- SQL models → Tenant database access: execute queries
- Tenant database access → MySQL databases: select tenant pool
