# kiwil-rizqi/safina architecture

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

- Interactive diagram: https://gitdiagram.com/kiwil-rizqi/safina
- Repository: https://github.com/kiwil-rizqi/safina

## Overview

Misi: Uang Pintar is a browser-based financial-literacy storybook with interactive lessons and activities. The main learner workflow is to navigate the flipbook, engage with money-management activities, and build rewards and progress. The sampled code also shows custom SVG artwork, browser-local progress storage, and synthesized sound effects. The entry page and some wiring were not excerpted, so the initiating interaction is shown as unverified; edges otherwise reflect calls or browser API use visible in the excerpts.

Main entry points: [`js/sound.js`](https://github.com/kiwil-rizqi/safina/blob/main/js/sound.js) (Sound Effects), [`js/flipbook.js`](https://github.com/kiwil-rizqi/safina/blob/main/js/flipbook.js) (Flipbook Engine), [`js/games.js`](https://github.com/kiwil-rizqi/safina/blob/main/js/games.js) (Interactive Lessons), [`js/illustrations.js`](https://github.com/kiwil-rizqi/safina/blob/main/js/illustrations.js) (SVG Illustrations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_book["Storybook"]
  node_flipbook["Flipbook Engine<br/>[flipbook.js]"]
  node_illustrations["SVG Illustrations<br/>[illustrations.js]"]
end

subgraph group_activities["Learning Activities"]
  node_interactive_lessons["Interactive Lessons<br/>[games.js]"]
  node_money_games["Money Games<br/>[games.js]"]
  node_quiz_missions["Quiz and Missions<br/>[games.js]"]
end

subgraph group_feedback["Feedback and State"]
  node_progress_rewards["Progress and Rewards<br/>[games.js]"]
  node_local_storage[("Browser Storage")]
  node_sound_fx["Sound Effects<br/>[sound.js]"]
end

node_learner(("Learner"))
node_web_audio["Web Audio API"]

node_learner -.->|"navigates"| node_flipbook
node_flipbook -->|"renders"| node_illustrations
node_interactive_lessons -->|"plays effects"| node_sound_fx
node_money_games -->|"plays effects"| node_sound_fx
node_quiz_missions -->|"plays effects"| node_sound_fx
node_progress_rewards -->|"reads and writes"| node_local_storage
node_sound_fx -->|"synthesizes audio"| node_web_audio

click node_flipbook "https://github.com/kiwil-rizqi/safina/blob/main/js/flipbook.js"
click node_illustrations "https://github.com/kiwil-rizqi/safina/blob/main/js/illustrations.js"
click node_interactive_lessons "https://github.com/kiwil-rizqi/safina/blob/main/js/games.js"
click node_money_games "https://github.com/kiwil-rizqi/safina/blob/main/js/games.js"
click node_quiz_missions "https://github.com/kiwil-rizqi/safina/blob/main/js/games.js"
click node_progress_rewards "https://github.com/kiwil-rizqi/safina/blob/main/js/games.js"
click node_sound_fx "https://github.com/kiwil-rizqi/safina/blob/main/js/sound.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_flipbook,node_illustrations toneBlue
class node_interactive_lessons,node_money_games,node_quiz_missions toneAmber
class node_progress_rewards,node_local_storage,node_sound_fx,node_web_audio toneMint
class node_learner toneIndigo
```

## Components

### Storybook

- [Flipbook Engine](https://github.com/kiwil-rizqi/safina/blob/main/js/flipbook.js): `js/flipbook.js`
- [SVG Illustrations](https://github.com/kiwil-rizqi/safina/blob/main/js/illustrations.js): `js/illustrations.js`

### Learning Activities

- [Interactive Lessons](https://github.com/kiwil-rizqi/safina/blob/main/js/games.js): `js/games.js`
- [Money Games](https://github.com/kiwil-rizqi/safina/blob/main/js/games.js): `js/games.js`
- [Quiz and Missions](https://github.com/kiwil-rizqi/safina/blob/main/js/games.js): `js/games.js`

### Feedback and State

- [Progress and Rewards](https://github.com/kiwil-rizqi/safina/blob/main/js/games.js): `js/games.js`
- **Browser Storage**
- [Sound Effects](https://github.com/kiwil-rizqi/safina/blob/main/js/sound.js): `js/sound.js`

### Other components

- **Learner**
- **Web Audio API**

## Connections

- Learner → Flipbook Engine: navigates
- Flipbook Engine → SVG Illustrations: renders (evidence: `js/flipbook.js`)
- Interactive Lessons → Sound Effects: plays effects (evidence: `js/games.js`)
- Money Games → Sound Effects: plays effects (evidence: `js/games.js`)
- Quiz and Missions → Sound Effects: plays effects (evidence: `js/games.js`)
- Progress and Rewards → Browser Storage: reads and writes (evidence: `js/games.js`)
- Sound Effects → Web Audio API: synthesizes audio (evidence: `js/sound.js`)
