# adhi7dawg/kas-kegiatan architecture

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

- Interactive diagram: https://gitdiagram.com/adhi7dawg/kas-kegiatan
- Repository: https://github.com/adhi7dawg/kas-kegiatan

## Overview

This is a browser-based event cashbook for recording and reviewing income and expenses by activity. The main flow initializes the app and checks the treasurer’s session, loads activities and their transactions, then filters and summarizes the selected activity for display. Treasurers can manage activities and transactions, including expense item details and receipt evidence; users can view charts and export filtered reports. Source excerpts show these responsibilities and several Supabase interactions; unsampled setup details and some receipt-storage operations are not mapped.

Main entry points: [`js/app.js`](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/app.js) (App coordinator), [`js/transactions.js`](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js) (Transaction records), [`js/supabase.js`](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/supabase.js) (Supabase client), [`js/utils.js`](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/utils.js) (Formatting and totals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_app["App coordinator<br/>[app.js]"]
  node_utils["Formatting and totals<br/>[utils.js]"]
end

subgraph group_cashbook["Cashbook Domain"]
  node_auth["Treasurer access<br/>[auth.js]"]
  node_events["Activity management<br/>[events.js]"]
  node_tx["Transaction records<br/>[transactions.js]"]
  node_income["Income entry<br/>[transactions.js]"]
  node_expense["Expense entry<br/>[transactions.js]"]
  node_receipts["Receipt evidence<br/>[transactions.js]"]
  node_audit["Audit history<br/>[transactions.js]"]
end

subgraph group_insights["Views and Reports"]
  node_charts["Cashflow chart<br/>[charts.js]"]
  node_reports["PDF and Excel<br/>[reports.js]"]
end

subgraph group_platform["Platform and Data"]
  node_config["Supabase configuration<br/>[config.js]"]
  node_client["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase service")]
end

node_user(("Cashbook user"))

node_user -->|"uses"| node_app
node_app -->|"checks setup"| node_config
node_app -->|"checks session"| node_auth
node_app -->|"loads activities"| node_events
node_app -->|"loads transactions"| node_tx
node_app -->|"renders chart"| node_charts
node_app -->|"exports report"| node_reports
node_app -->|"summarizes data"| node_utils
node_auth -->|"uses client"| node_client
node_events -->|"reads and updates"| node_client
node_tx -->|"handles"| node_income
node_tx -->|"handles"| node_expense
node_tx -->|"fetches and renders"| node_audit
node_tx -->|"manages evidence"| node_receipts
node_tx -->|"queries records"| node_client
node_charts -->|"formats values"| node_utils
node_reports -->|"formats and totals"| node_utils
node_client -->|"reads credentials"| node_config
node_client -->|"connects to"| node_supabase

click node_app "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/app.js"
click node_auth "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/auth.js"
click node_events "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/events.js"
click node_tx "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js"
click node_income "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js"
click node_expense "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js"
click node_receipts "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js"
click node_audit "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js"
click node_charts "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/charts.js"
click node_reports "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/reports.js"
click node_utils "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/utils.js"
click node_config "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/config.js"
click node_client "https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/supabase.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_utils,node_user toneBlue
class node_auth,node_events,node_tx,node_income,node_expense,node_receipts,node_audit toneAmber
class node_charts,node_reports toneMint
class node_config,node_client,node_supabase toneRose
```

## Components

### Application

- [App coordinator](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/app.js): `js/app.js`
- [Formatting and totals](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/utils.js): `js/utils.js`

### Cashbook Domain

- [Treasurer access](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/auth.js): `js/auth.js`
- [Activity management](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/events.js): `js/events.js`
- [Transaction records](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js): `js/transactions.js`
- [Income entry](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js): `js/transactions.js`
- [Expense entry](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js): `js/transactions.js`
- [Receipt evidence](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js): `js/transactions.js`
- [Audit history](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/transactions.js): `js/transactions.js`

### Views and Reports

- [Cashflow chart](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/charts.js): `js/charts.js`
- [PDF and Excel](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/reports.js): `js/reports.js`

### Platform and Data

- [Supabase configuration](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/config.js): `js/config.js`
- [Supabase client](https://github.com/adhi7dawg/kas-kegiatan/blob/main/js/supabase.js): `js/supabase.js`
- **Supabase service**

### Other components

- **Cashbook user**

## Connections

- Cashbook user → App coordinator: uses (evidence: `js/app.js`)
- App coordinator → Supabase configuration: checks setup (evidence: `js/app.js`)
- App coordinator → Treasurer access: checks session (evidence: `js/app.js`)
- App coordinator → Activity management: loads activities (evidence: `js/app.js`)
- App coordinator → Transaction records: loads transactions (evidence: `js/app.js`)
- App coordinator → Cashflow chart: renders chart (evidence: `js/app.js`)
- App coordinator → PDF and Excel: exports report (evidence: `js/app.js`)
- App coordinator → Formatting and totals: summarizes data (evidence: `js/app.js`)
- Treasurer access → Supabase client: uses client (evidence: `js/auth.js`)
- Activity management → Supabase client: reads and updates (evidence: `js/events.js`)
- Transaction records → Income entry: handles (evidence: `js/transactions.js`)
- Transaction records → Expense entry: handles (evidence: `js/transactions.js`)
- Transaction records → Audit history: fetches and renders (evidence: `js/transactions.js`)
- Transaction records → Receipt evidence: manages evidence (evidence: `js/transactions.js`)
- Transaction records → Supabase client: queries records (evidence: `js/transactions.js`)
- Cashflow chart → Formatting and totals: formats values (evidence: `js/charts.js`)
- PDF and Excel → Formatting and totals: formats and totals (evidence: `js/reports.js`)
- Supabase client → Supabase configuration: reads credentials (evidence: `js/supabase.js`)
- Supabase client → Supabase service: connects to (evidence: `js/supabase.js`)
