# codpangestu/jacos-fe architecture

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

- Interactive diagram: https://gitdiagram.com/codpangestu/jacos-fe
- Repository: https://github.com/codpangestu/jacos-fe

## Overview

JACOS is a role-based school operations web app: users enter through public or login routes, then use role-specific dashboards and workflows for school administration, teaching/staff duties, and parent access to child, attendance, pickup, and finance information. The router and selected pages show this structure; many other domain pages are represented by their exact enclosing directories because their implementations were not sampled. The API client confirms a cookie-authenticated backend boundary. The README is generic React/Vite template text, so product capabilities are inferred from the route and source index.

Main entry points: [`src/router.jsx`](https://github.com/codpangestu/jacos-fe/blob/main/src/router.jsx) (Role router), [`src/lib/api.js`](https://github.com/codpangestu/jacos-fe/blob/main/src/lib/api.js) (API client), [`src/pages/ortu/OrtuDashboard.jsx`](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/ortu/OrtuDashboard.jsx) (Parent dashboard), [`src/pages/auth`](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/auth) (Login and identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and shells"]
  node_app["App provider<br/>[App.jsx]"]
  node_routes["Role router<br/>[router.jsx]"]
  node_auth["Login and identity"]
  node_guards["Route guards"]
  node_responsive["Responsive shells"]
end

subgraph group_admin["Administration"]
  node_admin_dash["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_students["Student records<br/>[AdminStudents.jsx]"]
  node_admin_masters["Admin master data"]
  node_admin_attendance["Attendance reporting"]
  node_admin_finance["Finance management"]
  node_admin_people["Staff and leave"]
end

subgraph group_school["School operations"]
  node_teacher["Teacher workflows"]
  node_staff["Staff workflows"]
  node_pickup["Pickup verification<br/>[PickupVerify.jsx]"]
  node_self_attendance["Self attendance<br/>[SelfAttendance.jsx]"]
end

subgraph group_family["Family portal"]
  node_parent_dash["Parent dashboard<br/>[OrtuDashboard.jsx]"]
  node_parent_child["Child and attendance"]
  node_parent_finance["Parent payments"]
  node_parent_pickup["Parent pickups"]
end

subgraph group_shared["Shared services"]
  node_api["API client<br/>[api.js]"]
  node_notifications["Notifications"]
  node_child_context["Active child context<br/>[useOrtuChildren.js]"]
  node_format["Localization and formatting<br/>[format.js]"]
end

node_user(("School user"))
node_backend["JACOS backend"]

node_user -->|"opens"| node_app
node_app -->|"provides routing"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_admin_dash
node_routes -->|"routes to"| node_students
node_routes -->|"routes to"| node_admin_masters
node_routes -->|"routes to"| node_admin_attendance
node_routes -->|"routes to"| node_admin_finance
node_routes -->|"routes to"| node_admin_people
node_routes -->|"routes to"| node_teacher
node_routes -->|"routes to"| node_staff
node_routes -->|"routes to"| node_pickup
node_routes -->|"routes to"| node_self_attendance
node_routes -->|"routes to"| node_parent_dash
node_routes -->|"routes to"| node_parent_child
node_routes -->|"routes to"| node_parent_finance
node_routes -->|"routes to"| node_parent_pickup
node_routes -->|"wraps protected routes"| node_guards
node_parent_dash -->|"renders within"| node_responsive
node_responsive -->|"uses identity"| node_api
node_students -->|"loads records"| node_api
node_parent_dash -->|"gets child context"| node_child_context
node_child_context -->|"fetches children"| node_api
node_parent_dash -->|"loads dashboard data"| node_api
node_teacher -->|"uses API"| node_api
node_pickup -->|"uses API"| node_api
node_auth -->|"authenticates"| node_api
node_api -->|"sends HTTP requests"| node_backend
node_parent_dash -->|"displays notifications"| node_notifications
node_api -->|"clears expired session"| node_auth
node_admin_dash -->|"formats values"| node_format

click node_app "https://github.com/codpangestu/jacos-fe/blob/main/src/App.jsx"
click node_routes "https://github.com/codpangestu/jacos-fe/blob/main/src/router.jsx"
click node_auth "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/auth"
click node_guards "https://github.com/codpangestu/jacos-fe/tree/main/src/components"
click node_responsive "https://github.com/codpangestu/jacos-fe/blob/main/src/layouts/ResponsiveShell.jsx"
click node_admin_dash "https://github.com/codpangestu/jacos-fe/blob/main/src/pages/admin/AdminDashboard.jsx"
click node_students "https://github.com/codpangestu/jacos-fe/blob/main/src/pages/admin/AdminStudents.jsx"
click node_admin_masters "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin"
click node_admin_attendance "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin"
click node_admin_finance "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin"
click node_admin_people "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin"
click node_teacher "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/guru"
click node_staff "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/staff"
click node_pickup "https://github.com/codpangestu/jacos-fe/blob/main/src/pages/pickup/PickupVerify.jsx"
click node_self_attendance "https://github.com/codpangestu/jacos-fe/blob/main/src/pages/self-attendance/SelfAttendance.jsx"
click node_parent_dash "https://github.com/codpangestu/jacos-fe/blob/main/src/pages/ortu/OrtuDashboard.jsx"
click node_parent_child "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu"
click node_parent_finance "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu"
click node_parent_pickup "https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu"
click node_api "https://github.com/codpangestu/jacos-fe/blob/main/src/lib/api.js"
click node_notifications "https://github.com/codpangestu/jacos-fe/blob/main/src/components/NotificationBell.jsx"
click node_child_context "https://github.com/codpangestu/jacos-fe/blob/main/src/hooks/useOrtuChildren.js"
click node_format "https://github.com/codpangestu/jacos-fe/blob/main/src/lib/format.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_app,node_routes,node_auth,node_guards,node_responsive,node_user toneBlue
class node_admin_dash,node_students,node_admin_masters,node_admin_attendance,node_admin_finance,node_admin_people toneAmber
class node_teacher,node_staff,node_pickup,node_self_attendance toneMint
class node_parent_dash,node_parent_child,node_parent_finance,node_parent_pickup toneRose
class node_api,node_notifications,node_child_context,node_format,node_backend toneIndigo
```

## Components

### Access and shells

- [App provider](https://github.com/codpangestu/jacos-fe/blob/main/src/App.jsx): `src/App.jsx`
- [Role router](https://github.com/codpangestu/jacos-fe/blob/main/src/router.jsx): `src/router.jsx`
- [Login and identity](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/auth): `src/pages/auth`
- [Route guards](https://github.com/codpangestu/jacos-fe/tree/main/src/components): `src/components`
- [Responsive shells](https://github.com/codpangestu/jacos-fe/blob/main/src/layouts/ResponsiveShell.jsx): `src/layouts/ResponsiveShell.jsx`

### Administration

- [Admin dashboard](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/admin/AdminDashboard.jsx): `src/pages/admin/AdminDashboard.jsx`
- [Student records](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/admin/AdminStudents.jsx): `src/pages/admin/AdminStudents.jsx`
- [Admin master data](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin): `src/pages/admin`
- [Attendance reporting](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin): `src/pages/admin`
- [Finance management](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin): `src/pages/admin`
- [Staff and leave](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/admin): `src/pages/admin`

### School operations

- [Teacher workflows](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/guru): `src/pages/guru`
- [Staff workflows](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/staff): `src/pages/staff`
- [Pickup verification](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/pickup/PickupVerify.jsx): `src/pages/pickup/PickupVerify.jsx`
- [Self attendance](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/self-attendance/SelfAttendance.jsx): `src/pages/self-attendance/SelfAttendance.jsx`

### Family portal

- [Parent dashboard](https://github.com/codpangestu/jacos-fe/blob/main/src/pages/ortu/OrtuDashboard.jsx): `src/pages/ortu/OrtuDashboard.jsx`
- [Child and attendance](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu): `src/pages/ortu`
- [Parent payments](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu): `src/pages/ortu`
- [Parent pickups](https://github.com/codpangestu/jacos-fe/tree/main/src/pages/ortu): `src/pages/ortu`

### Shared services

- [API client](https://github.com/codpangestu/jacos-fe/blob/main/src/lib/api.js): `src/lib/api.js`
- [Notifications](https://github.com/codpangestu/jacos-fe/blob/main/src/components/NotificationBell.jsx): `src/components/NotificationBell.jsx`
- [Active child context](https://github.com/codpangestu/jacos-fe/blob/main/src/hooks/useOrtuChildren.js): `src/hooks/useOrtuChildren.js`
- [Localization and formatting](https://github.com/codpangestu/jacos-fe/blob/main/src/lib/format.js): `src/lib/format.js`

### Other components

- **School user**
- **JACOS backend**

## Connections

- School user → App provider: opens
- App provider → Role router: provides routing (evidence: `src/App.jsx`)
- Role router → Login and identity: routes to (evidence: `src/router.jsx`)
- Role router → Admin dashboard: routes to (evidence: `src/router.jsx`)
- Role router → Student records: routes to (evidence: `src/router.jsx`)
- Role router → Admin master data: routes to (evidence: `src/router.jsx`)
- Role router → Attendance reporting: routes to (evidence: `src/router.jsx`)
- Role router → Finance management: routes to (evidence: `src/router.jsx`)
- Role router → Staff and leave: routes to (evidence: `src/router.jsx`)
- Role router → Teacher workflows: routes to (evidence: `src/router.jsx`)
- Role router → Staff workflows: routes to (evidence: `src/router.jsx`)
- Role router → Pickup verification: routes to (evidence: `src/router.jsx`)
- Role router → Self attendance: routes to (evidence: `src/router.jsx`)
- Role router → Parent dashboard: routes to (evidence: `src/router.jsx`)
- Role router → Child and attendance: routes to (evidence: `src/router.jsx`)
- Role router → Parent payments: routes to (evidence: `src/router.jsx`)
- Role router → Parent pickups: routes to (evidence: `src/router.jsx`)
- Role router → Route guards: wraps protected routes (evidence: `src/router.jsx`)
- Parent dashboard → Responsive shells: renders within (evidence: `src/pages/ortu/OrtuDashboard.jsx`)
- Responsive shells → API client: uses identity (evidence: `src/layouts/ResponsiveShell.jsx`)
- Student records → API client: loads records (evidence: `src/pages/admin/AdminStudents.jsx`)
- Parent dashboard → Active child context: gets child context (evidence: `src/pages/ortu/OrtuDashboard.jsx`)
- Active child context → API client: fetches children (evidence: `src/hooks/useOrtuChildren.js`)
- Parent dashboard → API client: loads dashboard data (evidence: `src/pages/ortu/OrtuDashboard.jsx`)
- Teacher workflows → API client: uses API (evidence: `src/pages/guru/GuruAttendance.jsx`)
- Pickup verification → API client: uses API (evidence: `src/pages/pickup/PickupVerify.jsx`)
- Login and identity → API client: authenticates (evidence: `src/pages/auth/Login.jsx`)
- API client → JACOS backend: sends HTTP requests (evidence: `src/lib/api.js`)
- Parent dashboard → Notifications: displays notifications (evidence: `src/pages/ortu/OrtuDashboard.jsx`)
- API client → Login and identity: clears expired session (evidence: `src/lib/api.js`)
- Admin dashboard → Localization and formatting: formats values (evidence: `src/pages/admin/AdminDashboard.jsx`)
