# kusandriadi/cs architecture

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

- Interactive diagram: https://gitdiagram.com/kusandriadi/cs
- Repository: https://github.com/kusandriadi/cs

## Overview

This repository is a static learning-resources website: readers choose a handbook module, the browser fetches its Markdown from GitHub, and the app renders it. The five handbooks are separate learning branches, not stages in one curriculum. The service worker adds network-first caching for offline use. Source excerpts confirm the fetch, rendering, theme storage, and cache behavior; the page markup and handbook internals were not sampled, so their wiring is shown only where documented.

Main entry points: [`js/app.js`](https://github.com/kusandriadi/cs/blob/main/js/app.js) (Browser app), [`sw.js`](https://github.com/kusandriadi/cs/blob/main/sw.js) (Service worker), [`index.html`](https://github.com/kusandriadi/cs/blob/main/index.html) (Resources site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Website experience"]
  node_website["Resources site<br/>[index.html]"]
  node_app["Browser app<br/>[app.js]"]
  node_theme[("Theme preference")]
end

subgraph group_curricula["Structured curriculum"]
  node_ai["AI syllabus"]
  node_thinking["Computational thinking"]
end

subgraph group_references["Technical handbooks"]
  node_algorithms["Algorithms handbook"]
  node_llm["LLM handbook"]
  node_gan["GAN handbook"]
end

subgraph group_offline["Offline support"]
  node_serviceworker["Service worker<br/>[sw.js]"]
  node_cache[("Browser cache")]
end

node_reader(("Reader"))
node_github["GitHub content host"]

node_reader -->|"opens"| node_website
node_website -->|"loads"| node_app
node_reader -->|"selects module"| node_app
node_app -->|"fetches Markdown"| node_github
node_github -->|"returns Markdown"| node_app
node_app -->|"reads/writes theme"| node_theme
node_app -->|"registers"| node_serviceworker
node_serviceworker -->|"caches responses"| node_cache
node_serviceworker -->|"offline fallback"| node_cache

click node_website "https://github.com/kusandriadi/cs/blob/main/index.html"
click node_app "https://github.com/kusandriadi/cs/blob/main/js/app.js"
click node_ai "https://github.com/kusandriadi/cs/tree/main/ai-engineering-syllabus"
click node_thinking "https://github.com/kusandriadi/cs/tree/main/computational-thinking-handbook"
click node_algorithms "https://github.com/kusandriadi/cs/tree/main/algorithms-handbook"
click node_llm "https://github.com/kusandriadi/cs/tree/main/llm-handbook"
click node_gan "https://github.com/kusandriadi/cs/tree/main/gan-handbook"
click node_serviceworker "https://github.com/kusandriadi/cs/blob/main/sw.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_website,node_app,node_theme toneBlue
class node_ai,node_thinking toneAmber
class node_algorithms,node_llm,node_gan toneMint
class node_serviceworker,node_cache toneRose
class node_reader,node_github toneIndigo
```

## Components

### Website experience

- [Resources site](https://github.com/kusandriadi/cs/blob/main/index.html): `index.html`
- [Browser app](https://github.com/kusandriadi/cs/blob/main/js/app.js): `js/app.js`
- **Theme preference**

### Structured curriculum

- [AI syllabus](https://github.com/kusandriadi/cs/tree/main/ai-engineering-syllabus): `ai-engineering-syllabus`
- [Computational thinking](https://github.com/kusandriadi/cs/tree/main/computational-thinking-handbook): `computational-thinking-handbook`

### Technical handbooks

- [Algorithms handbook](https://github.com/kusandriadi/cs/tree/main/algorithms-handbook): `algorithms-handbook`
- [LLM handbook](https://github.com/kusandriadi/cs/tree/main/llm-handbook): `llm-handbook`
- [GAN handbook](https://github.com/kusandriadi/cs/tree/main/gan-handbook): `gan-handbook`

### Offline support

- [Service worker](https://github.com/kusandriadi/cs/blob/main/sw.js): `sw.js`
- **Browser cache**

### Other components

- **Reader**
- **GitHub content host**

## Connections

- Reader → Resources site: opens
- Resources site → Browser app: loads
- Reader → Browser app: selects module
- Browser app → GitHub content host: fetches Markdown
- GitHub content host → Browser app: returns Markdown
- Browser app → Theme preference: reads/writes theme
- Browser app → Service worker: registers
- Service worker → Browser cache: caches responses
- Service worker → Browser cache: offline fallback
