# pvkarthikk/illam-app architecture

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

- Interactive diagram: https://gitdiagram.com/pvkarthikk/illam-app
- Repository: https://github.com/pvkarthikk/illam-app

## Overview

Illam is a local-first household management app. The documented user workflow is to manage chores, shopping, spending, meals, and staff records in a local household copy, then synchronize changes with paired devices or protect them with encrypted backups. The provided tree and excerpts expose Android platform bridges, OCR/PDF support, and home-screen widgets, but not the Flutter/Dart application or its database, sync, and backup implementations. Those documented subsystems are shown without invented source paths; their internal call relationships cannot be verified here.

Main entry points: [`android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt`](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt) (Widget bridge), [`android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt`](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt) (Android Flutter activity), [`android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt`](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt) (Todo and staff views), [`android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt`](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt) (Widget action receiver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Household workflows"]
  node_flutter["Illam app"]
  node_todos["Shared todos"]
  node_shopping["Shopping lists"]
  node_expenses["Expenses and budgets"]
  node_meals["Meal planning"]
  node_staff["Staff and payroll"]
end

subgraph group_data["Local data and protection"]
  node_localdb[("Encrypted local database")]
  node_backups["Encrypted backups"]
end

subgraph group_connect["Device connectivity"]
  node_sync["Peer Wi-Fi sync"]
end

subgraph group_android["Android integration"]
  node_activity["Android Flutter activity<br/>[MainActivity.kt]"]
  node_widgetbridge["Widget bridge<br/>[WidgetBridge.kt]"]
  node_widgetstore[("Widget snapshot store<br/>[WidgetStore.kt]")]
  node_widgetactions["Widget action receiver"]
  node_widgetviews["Todo and staff views"]
  node_moneywidget["Spending widget"]
  node_receipt["Receipt OCR"]
  node_preprocess["Receipt preprocessing"]
  node_pdf["PDF text channel<br/>[PdfTextChannel.kt]"]
end

node_resident(("Household member"))
node_peer(("Paired household device"))
node_backupdest["User-chosen storage"]

node_resident -->|"uses"| node_flutter
node_flutter -->|"manages"| node_todos
node_flutter -->|"manages"| node_shopping
node_flutter -->|"manages"| node_expenses
node_flutter -->|"manages"| node_meals
node_flutter -->|"manages"| node_staff
node_flutter -->|"stores locally"| node_localdb
node_sync -->|"reconciles edits"| node_localdb
node_sync -->|"synchronizes with"| node_peer
node_flutter -->|"pairs and syncs"| node_sync
node_flutter -->|"creates snapshots"| node_backups
node_backups -->|"stores backup"| node_backupdest
node_activity -->|"attaches channel"| node_widgetbridge
node_activity -->|"attaches channel"| node_receipt
node_activity -->|"attaches channel"| node_pdf
node_receipt -->|"uses"| node_preprocess
node_widgetbridge -->|"saves and reads"| node_widgetstore
node_widgetactions -->|"dispatches action"| node_widgetbridge
node_widgetviews -->|"reads snapshots"| node_widgetstore
node_widgetviews -->|"creates action intents"| node_widgetactions
node_widgetbridge -->|"refreshes"| node_moneywidget

click node_activity "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt"
click node_widgetbridge "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt"
click node_widgetstore "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetStore.kt"
click node_widgetactions "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt"
click node_widgetviews "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt"
click node_moneywidget "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/MoneySpendWidgetProvider.kt"
click node_receipt "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptOcrChannel.kt"
click node_preprocess "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptPreprocessor.kt"
click node_pdf "https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/PdfTextChannel.kt"

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_flutter,node_todos,node_shopping,node_expenses,node_meals,node_staff toneBlue
class node_localdb,node_backups,node_backupdest toneAmber
class node_sync toneMint
class node_activity,node_widgetbridge,node_widgetstore,node_widgetactions,node_widgetviews,node_moneywidget,node_receipt,node_preprocess,node_pdf toneRose
class node_resident,node_peer toneIndigo
```

## Components

### Household workflows

- **Illam app**
- **Shared todos**
- **Shopping lists**
- **Expenses and budgets**
- **Meal planning**
- **Staff and payroll**

### Local data and protection

- **Encrypted local database**
- **Encrypted backups**

### Device connectivity

- **Peer Wi-Fi sync**

### Android integration

- [Android Flutter activity](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt`
- [Widget bridge](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt`
- [Widget snapshot store](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetStore.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetStore.kt`
- [Widget action receiver](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt`
- [Todo and staff views](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt`
- [Spending widget](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/MoneySpendWidgetProvider.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/MoneySpendWidgetProvider.kt`
- [Receipt OCR](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptOcrChannel.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptOcrChannel.kt`
- [Receipt preprocessing](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptPreprocessor.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptPreprocessor.kt`
- [PDF text channel](https://github.com/pvkarthikk/illam-app/blob/main/android/app/src/main/kotlin/io/github/pvkarthikk/illam/PdfTextChannel.kt): `android/app/src/main/kotlin/io/github/pvkarthikk/illam/PdfTextChannel.kt`

### Other components

- **Household member**
- **Paired household device**
- **User-chosen storage**

## Connections

- Household member → Illam app: uses (evidence: `README.md`)
- Illam app → Shared todos: manages (evidence: `README.md`)
- Illam app → Shopping lists: manages (evidence: `README.md`)
- Illam app → Expenses and budgets: manages (evidence: `README.md`)
- Illam app → Meal planning: manages (evidence: `README.md`)
- Illam app → Staff and payroll: manages (evidence: `README.md`)
- Illam app → Encrypted local database: stores locally (evidence: `README.md`)
- Peer Wi-Fi sync → Encrypted local database: reconciles edits (evidence: `README.md`)
- Peer Wi-Fi sync → Paired household device: synchronizes with (evidence: `README.md`)
- Illam app → Peer Wi-Fi sync: pairs and syncs (evidence: `README.md`)
- Illam app → Encrypted backups: creates snapshots (evidence: `README.md`)
- Encrypted backups → User-chosen storage: stores backup (evidence: `README.md`)
- Android Flutter activity → Widget bridge: attaches channel (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt`)
- Android Flutter activity → Receipt OCR: attaches channel (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt`)
- Android Flutter activity → PDF text channel: attaches channel (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/MainActivity.kt`)
- Receipt OCR → Receipt preprocessing: uses (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/receipt/ReceiptOcrChannel.kt`)
- Widget bridge → Widget snapshot store: saves and reads (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt`)
- Widget action receiver → Widget bridge: dispatches action (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetActionReceiver.kt`)
- Todo and staff views → Widget snapshot store: reads snapshots (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt`)
- Todo and staff views → Widget action receiver: creates action intents (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/TodayTodoWidgetService.kt`)
- Widget bridge → Spending widget: refreshes (evidence: `android/app/src/main/kotlin/io/github/pvkarthikk/illam/widget/WidgetBridge.kt`)
