# gorkemguler/mimlesek architecture

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

- Interactive diagram: https://gitdiagram.com/gorkemguler/mimlesek
- Repository: https://github.com/gorkemguler/mimlesek

## Overview

Mimlesek is a private, offline-capable personal incident ledger: a user records people and what they did, rates each incident, then tracks whether a case remains active, is forgiven, or is closed. The main application coordinates editing, search, undo, briefings, backups, and settings; the model calculates scores, alarms, and briefing data, which views and charts present. Data can be stored locally, optionally in a password-encrypted vault, or in the documented Artifact environment. The README also describes web, desktop, and Android use. Several UI handlers and route details were not sampled, so the graph omits uncertain internal links.

Main entry points: [`src/main.js`](https://github.com/gorkemguler/mimlesek/blob/main/src/main.js) (App coordinator), [`src/store.js`](https://github.com/gorkemguler/mimlesek/blob/main/src/store.js) (Store selection and API), [`src/kasa.js`](https://github.com/gorkemguler/mimlesek/blob/main/src/kasa.js) (Encrypted vault), [`src/views.js`](https://github.com/gorkemguler/mimlesek/blob/main/src/views.js) (Ledger and case views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application workflow"]
  node_app["App coordinator<br/>[main.js]"]
  node_backup["Backup import and merge<br/>[model.js]"]
  node_demo["Demo ledger<br/>[demo.js]"]
end

subgraph group_domain["Ledger and analysis"]
  node_ledger["People and incidents<br/>[model.js]"]
  node_briefing["Scores and briefing<br/>[model.js]"]
  node_utilities["Text and date helpers<br/>[util.js]"]
end

subgraph group_storage["Persistence and privacy"]
  node_store["Store selection and API<br/>[store.js]"]
  node_local[("Local browser storage<br/>[store.js]")]
  node_cloud[("Artifact private storage<br/>[store.js]")]
  node_vault[("Encrypted vault<br/>[kasa.js]")]
  node_file["Backup file access<br/>[store.js]"]
end

subgraph group_experience["Presentation and platforms"]
  node_views["Ledger and case views<br/>[views.js]"]
  node_charts["Briefing charts<br/>[charts.js]"]
  node_native["Tauri shell<br/>[lib.rs]"]
  node_offline[("Offline application cache<br/>[sw.js]")]
end

node_user(("Ledger user"))
node_artifact{{"Artifact host"}}

node_user -->|"uses"| node_app
node_app -->|"validates and updates"| node_ledger
node_app -->|"requests calculations"| node_briefing
node_app -->|"parses and merges"| node_backup
node_app -->|"loads demo"| node_demo
node_app -->|"renders"| node_views
node_views -->|"reads case data"| node_ledger
node_views -->|"uses chart helpers"| node_charts
node_charts -->|"formats labels"| node_utilities
node_ledger -->|"uses date and text helpers"| node_utilities
node_app -->|"selects and syncs"| node_store
node_store -->|"reads and writes"| node_local
node_store -->|"connects and syncs"| node_cloud
node_store -->|"uses host APIs"| node_artifact
node_app -->|"opens and configures"| node_vault
node_vault -->|"stores encrypted data"| node_local
node_vault -->|"uses storage key"| node_store
node_app -->|"exports backup"| node_file
node_file -->|"uses save dialog"| node_native
node_offline -->|"precaches application"| node_app
node_user -->|"runs on desktop or Android"| node_native

click node_app "https://github.com/gorkemguler/mimlesek/blob/main/src/main.js"
click node_ledger "https://github.com/gorkemguler/mimlesek/blob/main/src/model.js"
click node_briefing "https://github.com/gorkemguler/mimlesek/blob/main/src/model.js"
click node_backup "https://github.com/gorkemguler/mimlesek/blob/main/src/model.js"
click node_demo "https://github.com/gorkemguler/mimlesek/blob/main/src/demo.js"
click node_views "https://github.com/gorkemguler/mimlesek/blob/main/src/views.js"
click node_charts "https://github.com/gorkemguler/mimlesek/blob/main/src/charts.js"
click node_utilities "https://github.com/gorkemguler/mimlesek/blob/main/src/util.js"
click node_store "https://github.com/gorkemguler/mimlesek/blob/main/src/store.js"
click node_local "https://github.com/gorkemguler/mimlesek/blob/main/src/store.js"
click node_cloud "https://github.com/gorkemguler/mimlesek/blob/main/src/store.js"
click node_vault "https://github.com/gorkemguler/mimlesek/blob/main/src/kasa.js"
click node_file "https://github.com/gorkemguler/mimlesek/blob/main/src/store.js"
click node_native "https://github.com/gorkemguler/mimlesek/blob/main/src-tauri/src/lib.rs"
click node_offline "https://github.com/gorkemguler/mimlesek/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_app,node_backup,node_demo,node_user toneBlue
class node_ledger,node_briefing,node_utilities toneAmber
class node_store,node_local,node_cloud,node_vault,node_file toneMint
class node_views,node_charts,node_native,node_offline toneRose
class node_artifact toneIndigo
```

## Components

### Application workflow

- [App coordinator](https://github.com/gorkemguler/mimlesek/blob/main/src/main.js): `src/main.js`
- [Backup import and merge](https://github.com/gorkemguler/mimlesek/blob/main/src/model.js): `src/model.js`
- [Demo ledger](https://github.com/gorkemguler/mimlesek/blob/main/src/demo.js): `src/demo.js`

### Ledger and analysis

- [People and incidents](https://github.com/gorkemguler/mimlesek/blob/main/src/model.js): `src/model.js`
- [Scores and briefing](https://github.com/gorkemguler/mimlesek/blob/main/src/model.js): `src/model.js`
- [Text and date helpers](https://github.com/gorkemguler/mimlesek/blob/main/src/util.js): `src/util.js`

### Persistence and privacy

- [Store selection and API](https://github.com/gorkemguler/mimlesek/blob/main/src/store.js): `src/store.js`
- [Local browser storage](https://github.com/gorkemguler/mimlesek/blob/main/src/store.js): `src/store.js`
- [Artifact private storage](https://github.com/gorkemguler/mimlesek/blob/main/src/store.js): `src/store.js`
- [Encrypted vault](https://github.com/gorkemguler/mimlesek/blob/main/src/kasa.js): `src/kasa.js`
- [Backup file access](https://github.com/gorkemguler/mimlesek/blob/main/src/store.js): `src/store.js`

### Presentation and platforms

- [Ledger and case views](https://github.com/gorkemguler/mimlesek/blob/main/src/views.js): `src/views.js`
- [Briefing charts](https://github.com/gorkemguler/mimlesek/blob/main/src/charts.js): `src/charts.js`
- [Tauri shell](https://github.com/gorkemguler/mimlesek/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Offline application cache](https://github.com/gorkemguler/mimlesek/blob/main/sw.js): `sw.js`

### Other components

- **Ledger user**
- **Artifact host**

## Connections

- Ledger user → App coordinator: uses (evidence: `README.md`)
- App coordinator → People and incidents: validates and updates (evidence: `src/main.js`)
- App coordinator → Scores and briefing: requests calculations (evidence: `src/main.js`)
- App coordinator → Backup import and merge: parses and merges (evidence: `src/main.js`)
- App coordinator → Demo ledger: loads demo (evidence: `src/main.js`)
- App coordinator → Ledger and case views: renders (evidence: `src/main.js`)
- Ledger and case views → People and incidents: reads case data (evidence: `src/views.js`)
- Ledger and case views → Briefing charts: uses chart helpers (evidence: `src/views.js`)
- Briefing charts → Text and date helpers: formats labels (evidence: `src/charts.js`)
- People and incidents → Text and date helpers: uses date and text helpers (evidence: `src/model.js`)
- App coordinator → Store selection and API: selects and syncs (evidence: `src/main.js`)
- Store selection and API → Local browser storage: reads and writes (evidence: `src/store.js`)
- Store selection and API → Artifact private storage: connects and syncs (evidence: `src/store.js`)
- Store selection and API → Artifact host: uses host APIs (evidence: `src/store.js`)
- App coordinator → Encrypted vault: opens and configures (evidence: `src/main.js`)
- Encrypted vault → Local browser storage: stores encrypted data (evidence: `src/kasa.js`)
- Encrypted vault → Store selection and API: uses storage key (evidence: `src/kasa.js`)
- App coordinator → Backup file access: exports backup (evidence: `src/main.js`)
- Backup file access → Tauri shell: uses save dialog (evidence: `src/store.js`)
- Offline application cache → App coordinator: precaches application (evidence: `sw.js`)
- Ledger user → Tauri shell: runs on desktop or Android (evidence: `README.md`)
