# kiminobouken/demo-pkl architecture

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

- Interactive diagram: https://gitdiagram.com/kiminobouken/demo-pkl
- Repository: https://github.com/kiminobouken/demo-pkl

## Overview

Ini adalah demo web lokal untuk presensi siswa PKL. Alur utama: siswa membuka antarmuka, mengambil foto dan opsional membagikan lokasi, lalu mengirim foto ke endpoint lokal untuk disimpan bersama metadata. Demo juga menyediakan dashboard, rekap yang dapat difilter, profil dan penempatan siswa, serta toggle notifikasi. README menyebut kemampuan antarmuka yang sumbernya tidak disampel; relasi endpoint dan penyimpanan ditunjukkan oleh kode yang tersedia. Data simulasi, tanpa autentikasi atau backend produksi.

Main entry points: [`app.js`](https://github.com/kiminobouken/demo-pkl/blob/main/app.js) (Navigasi tampilan), [`server.js`](https://github.com/kiminobouken/demo-pkl/blob/main/server.js) (Endpoint foto), [`index.html`](https://github.com/kiminobouken/demo-pkl/blob/main/index.html) (Halaman demo), [`images`](https://github.com/kiminobouken/demo-pkl/tree/main/images) (Foto presensi)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Antarmuka demo"]
  node_web["Halaman demo<br/>[index.html]"]
  node_navigation["Navigasi tampilan<br/>[app.js]"]
  node_dashboard["Dashboard siswa<br/>[index.html]"]
  node_history["Rekap presensi<br/>[app.js]"]
  node_profile["Profil penempatan<br/>[index.html]"]
  node_notifications["Toggle notifikasi<br/>[app.js]"]
end

subgraph group_attendance["Alur presensi"]
  node_capture["Foto dan lokasi<br/>[app.js]"]
  node_browser_camera["Kamera browser"]
  node_browser_location["Geolocation API"]
end

subgraph group_runtime["Server dan penyimpanan"]
  node_local_server["Server lokal<br/>[server.js]"]
  node_photo_api["Endpoint foto<br/>[server.js]"]
  node_image_store[("Foto presensi")]
  node_metadata_log[("Log metadata<br/>[presensi-log.jsonl]")]
end

node_student(("Siswa"))

node_student -->|"membuka"| node_web
node_web -.->|"menyediakan tampilan"| node_navigation
node_navigation -->|"beralih ke"| node_dashboard
node_navigation -->|"beralih ke"| node_history
node_navigation -.->|"beralih ke"| node_profile
node_navigation -.->|"beralih ke"| node_notifications
node_student -.->|"memulai presensi"| node_capture
node_capture -->|"meminta kamera"| node_browser_camera
node_capture -->|"meminta lokasi"| node_browser_location
node_capture -->|"mengirim foto"| node_photo_api
node_local_server -->|"menangani permintaan"| node_photo_api
node_photo_api -->|"menulis foto"| node_image_store
node_photo_api -->|"menambahkan metadata"| node_metadata_log
node_local_server -->|"menyajikan berkas"| node_web

click node_web "https://github.com/kiminobouken/demo-pkl/blob/main/index.html"
click node_navigation "https://github.com/kiminobouken/demo-pkl/blob/main/app.js"
click node_dashboard "https://github.com/kiminobouken/demo-pkl/blob/main/index.html"
click node_history "https://github.com/kiminobouken/demo-pkl/blob/main/app.js"
click node_profile "https://github.com/kiminobouken/demo-pkl/blob/main/index.html"
click node_notifications "https://github.com/kiminobouken/demo-pkl/blob/main/app.js"
click node_capture "https://github.com/kiminobouken/demo-pkl/blob/main/app.js"
click node_local_server "https://github.com/kiminobouken/demo-pkl/blob/main/server.js"
click node_photo_api "https://github.com/kiminobouken/demo-pkl/blob/main/server.js"
click node_image_store "https://github.com/kiminobouken/demo-pkl/tree/main/images"
click node_metadata_log "https://github.com/kiminobouken/demo-pkl/blob/main/images/presensi-log.jsonl"

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,node_navigation,node_dashboard,node_history,node_profile,node_notifications toneBlue
class node_capture,node_browser_camera,node_browser_location toneAmber
class node_local_server,node_photo_api,node_image_store,node_metadata_log toneMint
class node_student toneIndigo
```

## Components

### Antarmuka demo

- [Halaman demo](https://github.com/kiminobouken/demo-pkl/blob/main/index.html): `index.html`
- [Navigasi tampilan](https://github.com/kiminobouken/demo-pkl/blob/main/app.js): `app.js`
- [Dashboard siswa](https://github.com/kiminobouken/demo-pkl/blob/main/index.html): `index.html`
- [Rekap presensi](https://github.com/kiminobouken/demo-pkl/blob/main/app.js): `app.js`
- [Profil penempatan](https://github.com/kiminobouken/demo-pkl/blob/main/index.html): `index.html`
- [Toggle notifikasi](https://github.com/kiminobouken/demo-pkl/blob/main/app.js): `app.js`

### Alur presensi

- [Foto dan lokasi](https://github.com/kiminobouken/demo-pkl/blob/main/app.js): `app.js`
- **Kamera browser**
- **Geolocation API**

### Server dan penyimpanan

- [Server lokal](https://github.com/kiminobouken/demo-pkl/blob/main/server.js): `server.js`
- [Endpoint foto](https://github.com/kiminobouken/demo-pkl/blob/main/server.js): `server.js`
- [Foto presensi](https://github.com/kiminobouken/demo-pkl/tree/main/images): `images`
- [Log metadata](https://github.com/kiminobouken/demo-pkl/blob/main/images/presensi-log.jsonl): `images/presensi-log.jsonl`

### Other components

- **Siswa**

## Connections

- Siswa → Halaman demo: membuka (evidence: `README.md`)
- Halaman demo → Navigasi tampilan: menyediakan tampilan
- Navigasi tampilan → Dashboard siswa: beralih ke (evidence: `app.js`)
- Navigasi tampilan → Rekap presensi: beralih ke (evidence: `app.js`)
- Navigasi tampilan → Profil penempatan: beralih ke
- Navigasi tampilan → Toggle notifikasi: beralih ke (evidence: `app.js`)
- Siswa → Foto dan lokasi: memulai presensi
- Foto dan lokasi → Kamera browser: meminta kamera (evidence: `app.js`)
- Foto dan lokasi → Geolocation API: meminta lokasi (evidence: `app.js`)
- Foto dan lokasi → Endpoint foto: mengirim foto (evidence: `app.js`)
- Server lokal → Endpoint foto: menangani permintaan (evidence: `server.js`)
- Endpoint foto → Foto presensi: menulis foto (evidence: `server.js`)
- Endpoint foto → Log metadata: menambahkan metadata (evidence: `server.js`)
- Server lokal → Halaman demo: menyajikan berkas (evidence: `server.js`)
