# manoj-bots/konaha_checklists architecture

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

- Interactive diagram: https://gitdiagram.com/manoj-bots/konaha_checklists
- Repository: https://github.com/manoj-bots/konaha_checklists

## Overview

This is a mobile daily checklist web app. Users manage daily, today, and weekly tasks, track completion, and save notes; the app stores state locally and syncs tasks and notes with Google Sheets through an Apps Script web app. It can also create a daily history snapshot and caches app assets for offline use. The excerpts show the mobile client, but not the Apps Script implementation, HTML structure, or the laptop app, so backend internals and cross-device details are limited to documented behavior.

Main entry points: [`script.js`](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js) (Task and note actions), [`service-worker.js`](https://github.com/manoj-bots/konaha_checklists/blob/main/service-worker.js) (Service worker cache), [`index.html`](https://github.com/manoj-bots/konaha_checklists/blob/main/index.html) (Checklist interface), [`Code.gs`](https://github.com/manoj-bots/konaha_checklists/blob/main/Code.gs) (Apps Script web app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile client"]
  node_interface["Checklist interface<br/>[index.html]"]
  node_interactions["Task and note actions<br/>[script.js]"]
  node_progress["Progress and reports<br/>[script.js]"]
end

subgraph group_state["Task state"]
  node_localstate["Local task state<br/>[script.js]"]
  node_browserstorage[("Browser local storage")]
end

subgraph group_sync["Cloud sync"]
  node_syncclient["Sync client<br/>[script.js]"]
  node_appsbackend["Apps Script web app<br/>[Code.gs]"]
  node_sheets[("Google Sheets")]
  node_history["Daily history snapshot<br/>[script.js]"]
end

subgraph group_offline["Offline support"]
  node_worker["Service worker cache<br/>[service-worker.js]"]
  node_assetcache[("Cached app assets")]
end

node_user(("Mobile user"))

node_user -->|"uses"| node_interface
node_interactions -->|"updates"| node_interface
node_interactions -->|"changes"| node_localstate
node_localstate -->|"persists"| node_browserstorage
node_interactions -->|"renders"| node_progress
node_progress -->|"builds report"| node_history
node_history -->|"submits snapshot"| node_syncclient
node_interactions -->|"queues task and note changes"| node_syncclient
node_syncclient -->|"posts changes; polls state"| node_appsbackend
node_appsbackend -.->|"syncs state"| node_sheets
node_syncclient -->|"merges remote state"| node_localstate
node_worker -->|"caches assets"| node_assetcache
node_worker -.->|"serves cached app"| node_interface
node_interactions -->|"registers worker"| node_worker

click node_interface "https://github.com/manoj-bots/konaha_checklists/blob/main/index.html"
click node_interactions "https://github.com/manoj-bots/konaha_checklists/blob/main/script.js"
click node_progress "https://github.com/manoj-bots/konaha_checklists/blob/main/script.js"
click node_localstate "https://github.com/manoj-bots/konaha_checklists/blob/main/script.js"
click node_syncclient "https://github.com/manoj-bots/konaha_checklists/blob/main/script.js"
click node_appsbackend "https://github.com/manoj-bots/konaha_checklists/blob/main/Code.gs"
click node_history "https://github.com/manoj-bots/konaha_checklists/blob/main/script.js"
click node_worker "https://github.com/manoj-bots/konaha_checklists/blob/main/service-worker.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_interface,node_interactions,node_progress,node_user toneBlue
class node_localstate,node_browserstorage toneAmber
class node_syncclient,node_appsbackend,node_sheets,node_history toneMint
class node_worker,node_assetcache toneRose
```

## Components

### Mobile client

- [Checklist interface](https://github.com/manoj-bots/konaha_checklists/blob/main/index.html): `index.html`
- [Task and note actions](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js): `script.js`
- [Progress and reports](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js): `script.js`

### Task state

- [Local task state](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js): `script.js`
- **Browser local storage**

### Cloud sync

- [Sync client](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js): `script.js`
- [Apps Script web app](https://github.com/manoj-bots/konaha_checklists/blob/main/Code.gs): `Code.gs`
- **Google Sheets**
- [Daily history snapshot](https://github.com/manoj-bots/konaha_checklists/blob/main/script.js): `script.js`

### Offline support

- [Service worker cache](https://github.com/manoj-bots/konaha_checklists/blob/main/service-worker.js): `service-worker.js`
- **Cached app assets**

### Other components

- **Mobile user**

## Connections

- Mobile user → Checklist interface: uses
- Task and note actions → Checklist interface: updates (evidence: `script.js`)
- Task and note actions → Local task state: changes (evidence: `script.js`)
- Local task state → Browser local storage: persists (evidence: `script.js`)
- Task and note actions → Progress and reports: renders (evidence: `script.js`)
- Progress and reports → Daily history snapshot: builds report (evidence: `script.js`)
- Daily history snapshot → Sync client: submits snapshot (evidence: `script.js`)
- Task and note actions → Sync client: queues task and note changes (evidence: `script.js`)
- Sync client → Apps Script web app: posts changes; polls state (evidence: `script.js`)
- Apps Script web app → Google Sheets: syncs state (evidence: `README.txt`)
- Sync client → Local task state: merges remote state (evidence: `script.js`)
- Service worker cache → Cached app assets: caches assets (evidence: `service-worker.js`)
- Service worker cache → Checklist interface: serves cached app
- Task and note actions → Service worker cache: registers worker (evidence: `script.js`)
