# abhaydeonath/kawaii-finance architecture

> Architecture diagram of the GitHub repository abhaydeonath/kawaii-finance, 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/abhaydeonath/kawaii-finance
- Repository: https://github.com/abhaydeonath/kawaii-finance

## Overview

Kawaii Finance is a browser-based personal finance tracker. Users can enter and edit income or expenses, review and filter transactions, and inspect analytics; the app also supports CSV export, JSON backup import, and resetting transaction history. The main application behavior is concentrated in script.js, while service-worker.js provides an offline cache. The excerpts establish these capabilities and cache behavior, but do not show the full HTML wiring or the implementation of transaction persistence, so those connections are not asserted.

Main entry points: [`index.html`](https://github.com/abhaydeonath/kawaii-finance/blob/main/index.html) (Application page), [`service-worker.js`](https://github.com/abhaydeonath/kawaii-finance/blob/main/service-worker.js) (Service worker), [`script.js`](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js) (Transaction entry and editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Finance application"]
  node_page["Application page<br/>[index.html]"]
  node_transactions["Transaction entry and editing<br/>[script.js]"]
  node_transaction_view["Transaction list and filters<br/>[script.js]"]
  node_data["Transaction data and migration<br/>[script.js]"]
  node_reset["History reset<br/>[script.js]"]
end

subgraph group_insights["Review and analytics"]
  node_analytics["Financial analytics<br/>[script.js]"]
  node_exports["CSV export and JSON import<br/>[script.js]"]
end

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

node_user(("Finance user"))

node_user -.->|"uses"| node_page
node_page -.->|"provides controls"| node_transactions
node_transactions -.->|"updates"| node_data
node_data -.->|"supplies records"| node_transaction_view
node_transaction_view -.->|"reviews spending"| node_analytics
node_user -.->|"requests import/export"| node_exports
node_user -.->|"requests reset"| node_reset
node_worker -->|"caches app files"| node_cache
node_worker -->|"serves offline"| node_page

click node_page "https://github.com/abhaydeonath/kawaii-finance/blob/main/index.html"
click node_transactions "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_transaction_view "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_data "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_analytics "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_exports "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_reset "https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js"
click node_worker "https://github.com/abhaydeonath/kawaii-finance/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_page,node_transactions,node_transaction_view,node_data,node_reset,node_user toneBlue
class node_analytics,node_exports toneAmber
class node_worker,node_cache toneMint
```

## Components

### Finance application

- [Application page](https://github.com/abhaydeonath/kawaii-finance/blob/main/index.html): `index.html`
- [Transaction entry and editing](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`
- [Transaction list and filters](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`
- [Transaction data and migration](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`
- [History reset](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`

### Review and analytics

- [Financial analytics](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`
- [CSV export and JSON import](https://github.com/abhaydeonath/kawaii-finance/blob/main/script.js): `script.js`

### Offline support

- [Service worker](https://github.com/abhaydeonath/kawaii-finance/blob/main/service-worker.js): `service-worker.js`
- **Browser cache**

### Other components

- **Finance user**

## Connections

- Finance user → Application page: uses
- Application page → Transaction entry and editing: provides controls
- Transaction entry and editing → Transaction data and migration: updates (evidence: `script.js`)
- Transaction data and migration → Transaction list and filters: supplies records (evidence: `script.js`)
- Transaction list and filters → Financial analytics: reviews spending (evidence: `script.js`)
- Finance user → CSV export and JSON import: requests import/export
- Finance user → History reset: requests reset
- Service worker → Browser cache: caches app files (evidence: `service-worker.js`)
- Service worker → Application page: serves offline (evidence: `service-worker.js`)
