# butocakil/app-jadwal-sekolah architecture

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

- Interactive diagram: https://gitdiagram.com/butocakil/app-jadwal-sekolah
- Repository: https://github.com/butocakil/app-jadwal-sekolah

## Overview

App Jadwal Sekolah is a browser-based school timetable planner. Admins load or import school data, edit master data, periods, calendars and schedules, then inspect conflicts or run automatic scheduling and apply the result. Applied schedules are published for a separate public timetable and PDF view. The map also preserves the AI assistant and synchronization capabilities described or referenced by the repository. Edges are limited to README statements and source-index references; several UI and integration implementations were not sampled, so their internal links are omitted.

Main entry points: [`src/ui/app.ts`](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/app.ts) (Application shell), [`src/ui/hub.ts`](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/hub.ts) (Periods and grid), [`src/ui/kalenderTab.ts`](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/kalenderTab.ts) (Academic calendar), [`src/ui/grid.ts`](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/grid.ts) (Schedule grid)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin workspace"]
  node_app["Application shell<br/>[app.ts]"]
  node_master["Master data<br/>[master.ts]"]
end

subgraph group_planning["Schedule planning"]
  node_calendar["Academic calendar<br/>[kalenderTab.ts]"]
  node_schedule["Periods and grid<br/>[hub.ts]"]
  node_grid["Schedule grid<br/>[grid.ts]"]
  node_conflicts["Conflict inspector<br/>[inspektur.ts]"]
  node_auto["Auto-schedule UI<br/>[susun.ts]"]
  node_worker["Solver worker<br/>[solver.worker.ts]"]
  node_solver["Schedule solver<br/>[solver.ts]"]
  node_validator["Conflict validation<br/>[validator.ts]"]
end

subgraph group_ai["AI assistant"]
  node_ai["AI assistant UI<br/>[ai.ts]"]
  node_instructions["AI instructions<br/>[instruksi.ts]"]
  node_slotai["AI schedule actions<br/>[slotAi.ts]"]
end

subgraph group_exchange["Data exchange"]
  node_imports["Excel import<br/>[imporExcel.ts]"]
  node_storage[("Draft storage<br/>[simpan.ts]")]
  node_backup["Backup and restore<br/>[cadangan.ts]"]
  node_calendarimport["Calendar file import<br/>[imporKalender.ts]"]
end

subgraph group_public["Publishing and public"]
  node_sync["Publish synchronization<br/>[alur.ts]"]
  node_github["GitHub publishing<br/>[github.ts]"]
  node_publicpage["Public timetable<br/>[halaman.ts]"]
  node_pdf["PDF generation<br/>[buat.ts]"]
end

node_admin(("School admin"))

node_admin -->|"uses"| node_app
node_app -->|"loads drafts"| node_storage
node_app -->|"renders"| node_master
node_app -->|"renders"| node_imports
node_app -->|"renders"| node_schedule
node_app -->|"renders"| node_auto
node_app -->|"invokes import"| node_backup
node_schedule -->|"renders"| node_grid
node_schedule -->|"uses"| node_calendar
node_grid -->|"uses"| node_conflicts
node_auto -->|"dispatches"| node_worker
node_worker -->|"calls"| node_solver
node_solver -->|"checks constraints"| node_validator
node_calendar -->|"imports calendar"| node_calendarimport
node_app -->|"offers assistant"| node_ai
node_ai -->|"uses"| node_instructions
node_instructions -->|"applies actions"| node_slotai
node_sync -->|"publishes via"| node_github
node_admin -->|"publishes schedule"| node_sync
node_admin -->|"views applied schedule"| node_publicpage
node_publicpage -->|"generates"| node_pdf

click node_app "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/app.ts"
click node_master "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/master.ts"
click node_imports "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/imporExcel.ts"
click node_calendar "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/kalenderTab.ts"
click node_schedule "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/hub.ts"
click node_grid "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/grid.ts"
click node_conflicts "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/inspektur.ts"
click node_auto "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/susun.ts"
click node_worker "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/solver.worker.ts"
click node_solver "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/solver.ts"
click node_validator "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/validator.ts"
click node_storage "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/io/simpan.ts"
click node_backup "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/cadangan.ts"
click node_calendarimport "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/io/imporKalender.ts"
click node_ai "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/ai.ts"
click node_instructions "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ai/instruksi.ts"
click node_slotai "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ai/slotAi.ts"
click node_sync "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/sinkron/alur.ts"
click node_github "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/terbit/github.ts"
click node_publicpage "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/publik/halaman.ts"
click node_pdf "https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/publik/pdf/buat.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_app,node_master toneBlue
class node_calendar,node_schedule,node_grid,node_conflicts,node_auto,node_worker,node_solver,node_validator toneAmber
class node_ai,node_instructions,node_slotai toneMint
class node_imports,node_storage,node_backup,node_calendarimport toneRose
class node_sync,node_github,node_publicpage,node_pdf,node_admin toneIndigo
```

## Components

### Admin workspace

- [Application shell](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/app.ts): `src/ui/app.ts`
- [Master data](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/master.ts): `src/ui/master.ts`

### Schedule planning

- [Academic calendar](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/kalenderTab.ts): `src/ui/kalenderTab.ts`
- [Periods and grid](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/hub.ts): `src/ui/hub.ts`
- [Schedule grid](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/grid.ts): `src/ui/grid.ts`
- [Conflict inspector](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/inspektur.ts): `src/ui/inspektur.ts`
- [Auto-schedule UI](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/susun.ts): `src/ui/susun.ts`
- [Solver worker](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/solver.worker.ts): `src/mesin/solver.worker.ts`
- [Schedule solver](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/solver.ts): `src/mesin/solver.ts`
- [Conflict validation](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/mesin/validator.ts): `src/mesin/validator.ts`

### AI assistant

- [AI assistant UI](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/ai.ts): `src/ui/ai.ts`
- [AI instructions](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ai/instruksi.ts): `src/ai/instruksi.ts`
- [AI schedule actions](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ai/slotAi.ts): `src/ai/slotAi.ts`

### Data exchange

- [Excel import](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/imporExcel.ts): `src/ui/imporExcel.ts`
- [Draft storage](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/io/simpan.ts): `src/io/simpan.ts`
- [Backup and restore](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/ui/cadangan.ts): `src/ui/cadangan.ts`
- [Calendar file import](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/io/imporKalender.ts): `src/io/imporKalender.ts`

### Publishing and public

- [Publish synchronization](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/sinkron/alur.ts): `src/sinkron/alur.ts`
- [GitHub publishing](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/terbit/github.ts): `src/terbit/github.ts`
- [Public timetable](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/publik/halaman.ts): `src/publik/halaman.ts`
- [PDF generation](https://github.com/butocakil/app-jadwal-sekolah/blob/main/src/publik/pdf/buat.ts): `src/publik/pdf/buat.ts`

### Other components

- **School admin**

## Connections

- School admin → Application shell: uses (evidence: `README.md`)
- Application shell → Draft storage: loads drafts (evidence: `src/ui/app.ts`)
- Application shell → Master data: renders (evidence: `src/ui/app.ts`)
- Application shell → Excel import: renders (evidence: `src/ui/app.ts`)
- Application shell → Periods and grid: renders (evidence: `src/ui/app.ts`)
- Application shell → Auto-schedule UI: renders (evidence: `src/ui/app.ts`)
- Application shell → Backup and restore: invokes import (evidence: `src/ui/app.ts`)
- Periods and grid → Schedule grid: renders (evidence: `src/ui/hub.ts`)
- Periods and grid → Academic calendar: uses (evidence: `src/ui/hub.ts`)
- Schedule grid → Conflict inspector: uses (evidence: `src/ui/grid.ts`)
- Auto-schedule UI → Solver worker: dispatches (evidence: `README.md`)
- Solver worker → Schedule solver: calls (evidence: `src/mesin/solver.worker.ts`)
- Schedule solver → Conflict validation: checks constraints (evidence: `src/mesin/solver.ts`)
- Academic calendar → Calendar file import: imports calendar (evidence: `src/ui/kalenderTab.ts`)
- Application shell → AI assistant UI: offers assistant (evidence: `src/ui/app.ts`)
- AI assistant UI → AI instructions: uses (evidence: `src/ui/ai.ts`)
- AI instructions → AI schedule actions: applies actions (evidence: `src/ai/instruksi.ts`)
- Publish synchronization → GitHub publishing: publishes via (evidence: `src/sinkron/alur.ts`)
- School admin → Publish synchronization: publishes schedule (evidence: `README.md`)
- School admin → Public timetable: views applied schedule (evidence: `README.md`)
- Public timetable → PDF generation: generates (evidence: `src/publik/halaman.ts`)
