# lestermanota/kolekta architecture

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

- Interactive diagram: https://gitdiagram.com/lestermanota/kolekta
- Repository: https://github.com/lestermanota/kolekta

## Overview

KOLEKTA is an offline-capable class-fund web app: treasurers record and manage payments and expenses, while students check balances and submit payments for approval. The static app and its embedded Apps Script backend are both described as living in `index.html`; the backend uses Sheets and Drive for records and proof images, and email for notifications. The README documents these capabilities, but `index.html` was not available to inspect, so internal call paths are not shown. The service-worker relationships are supported by its excerpt.

Main entry points: [`index.html`](https://github.com/lestermanota/kolekta/blob/main/index.html) (Treasurer screens), [`sw.js`](https://github.com/lestermanota/kolekta/blob/main/sw.js) (Service worker), [`manifest.json`](https://github.com/lestermanota/kolekta/blob/main/manifest.json) (Install manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_treasurer["Treasurer app"]
  node_treasurer["Treasurer screens<br/>[index.html]"]
  node_payment_ops["Payments and expenses<br/>[index.html]"]
  node_reports["Reports and receipts<br/>[index.html]"]
  node_admin["Admin controls<br/>[index.html]"]
end

subgraph group_portal["Student portal"]
  node_student_portal["Student portal<br/>[index.html]"]
  node_student_payments["Payment submissions<br/>[index.html]"]
end

subgraph group_backend["Backend and records"]
  node_app_backend["Apps Script backend<br/>[index.html]"]
  node_sheet[("Google Sheet")]
  node_drive[("Proofs folder")]
  node_mail["Email service"]
end

subgraph group_delivery["Offline and install"]
  node_service_worker["Service worker<br/>[sw.js]"]
  node_cache[("Offline cache<br/>[sw.js]")]
  node_manifest["Install manifest<br/>[manifest.json]"]
end

node_treasurer_user(("Treasurer or admin"))
node_student_user(("Student"))
node_cdn_libs["QR libraries CDN"]

node_treasurer_user -->|"uses"| node_treasurer
node_treasurer -->|"records"| node_payment_ops
node_treasurer -->|"views"| node_reports
node_treasurer -->|"manages"| node_admin
node_student_user -->|"opens"| node_student_portal
node_student_portal -->|"submits"| node_student_payments
node_treasurer -->|"syncs with"| node_app_backend
node_student_portal -->|"uses"| node_app_backend
node_app_backend -->|"reads and writes"| node_sheet
node_app_backend -->|"stores photos"| node_drive
node_app_backend -->|"sends email"| node_mail
node_service_worker -->|"caches assets"| node_cache
node_service_worker -->|"caches libraries"| node_cdn_libs
node_student_portal -->|"works offline"| node_service_worker
node_manifest -->|"enables install"| node_student_portal

click node_treasurer "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_payment_ops "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_reports "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_admin "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_student_portal "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_student_payments "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_app_backend "https://github.com/lestermanota/kolekta/blob/main/index.html"
click node_service_worker "https://github.com/lestermanota/kolekta/blob/main/sw.js"
click node_cache "https://github.com/lestermanota/kolekta/blob/main/sw.js"
click node_manifest "https://github.com/lestermanota/kolekta/blob/main/manifest.json"

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_treasurer,node_payment_ops,node_reports,node_admin toneBlue
class node_student_portal,node_student_payments toneAmber
class node_app_backend,node_sheet,node_drive,node_mail toneMint
class node_service_worker,node_cache,node_manifest toneRose
class node_treasurer_user,node_student_user,node_cdn_libs toneIndigo
```

## Components

### Treasurer app

- [Treasurer screens](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`
- [Payments and expenses](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`
- [Reports and receipts](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`
- [Admin controls](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`

### Student portal

- [Student portal](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`
- [Payment submissions](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`

### Backend and records

- [Apps Script backend](https://github.com/lestermanota/kolekta/blob/main/index.html): `index.html`
- **Google Sheet**
- **Proofs folder**
- **Email service**

### Offline and install

- [Service worker](https://github.com/lestermanota/kolekta/blob/main/sw.js): `sw.js`
- [Offline cache](https://github.com/lestermanota/kolekta/blob/main/sw.js): `sw.js`
- [Install manifest](https://github.com/lestermanota/kolekta/blob/main/manifest.json): `manifest.json`

### Other components

- **Treasurer or admin**
- **Student**
- **QR libraries CDN**

## Connections

- Treasurer or admin → Treasurer screens: uses (evidence: `README.md`)
- Treasurer screens → Payments and expenses: records (evidence: `README.md`)
- Treasurer screens → Reports and receipts: views (evidence: `README.md`)
- Treasurer screens → Admin controls: manages (evidence: `README.md`)
- Student → Student portal: opens (evidence: `README.md`)
- Student portal → Payment submissions: submits (evidence: `README.md`)
- Treasurer screens → Apps Script backend: syncs with (evidence: `README.md`)
- Student portal → Apps Script backend: uses (evidence: `README.md`)
- Apps Script backend → Google Sheet: reads and writes (evidence: `README.md`)
- Apps Script backend → Proofs folder: stores photos (evidence: `README.md`)
- Apps Script backend → Email service: sends email (evidence: `README.md`)
- Service worker → Offline cache: caches assets (evidence: `sw.js`)
- Service worker → QR libraries CDN: caches libraries (evidence: `sw.js`)
- Student portal → Service worker: works offline (evidence: `README.md`)
- Install manifest → Student portal: enables install (evidence: `README.md`)
