# panjaritehseen-ship-it/tiffintap architecture

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

- Interactive diagram: https://gitdiagram.com/panjaritehseen-ship-it/tiffintap
- Repository: https://github.com/panjaritehseen-ship-it/tiffintap

## Overview

TiffinTap is an Android-first, offline-first tiffin and spending ledger. Users record mess meals or direct spending, review history and reports, manage payments, and optionally sync or use reminders and a home-screen widget. The graph reflects README-documented capabilities and the sampled Android widget implementation; Flutter business-layer files are listed in the tree but their source was not sampled, so internal call relationships there are not asserted.

Main entry points: [`lib/main.dart`](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart) (Ledger interface), [`android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt`](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt) (Quick-add widget), [`windows/runner/flutter_window.cpp`](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/flutter_window.cpp) (Windows Flutter window), [`lib/data/cloud_sync.dart`](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/cloud_sync.dart) (Cloud sync and outbox)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Ledger app"]
  node_app["Ledger interface<br/>[main.dart]"]
  node_models["Ledger models<br/>[models.dart]"]
  node_meal["Meal entries<br/>[main.dart]"]
  node_direct["Direct spending<br/>[main.dart]"]
  node_mess["Mess management<br/>[main.dart]"]
  node_history["History and calendar<br/>[main.dart]"]
  node_payments["Payments<br/>[main.dart]"]
  node_reports["Monthly reports<br/>[main.dart]"]
  node_export["Export and backup<br/>[main.dart]"]
  node_settings["Tracker settings<br/>[main.dart]"]
end

subgraph group_local["Local data"]
  node_localstore[("SQLite store<br/>[local_store.dart]")]
end

subgraph group_cloud["Cloud sync"]
  node_sync["Cloud sync and outbox<br/>[cloud_sync.dart]"]
  node_supabase[("Supabase service<br/>[001_tiffintap.sql]")]
end

subgraph group_platform["Platform features"]
  node_reminders["Reminder service"]
  node_widget["Quick-add widget"]
  node_android["Android Flutter host<br/>[MainActivity.kt]"]
  node_winmain["Windows entry point<br/>[main.cpp]"]
  node_winwindow["Windows Flutter window<br/>[flutter_window.cpp]"]
  node_winbase["Win32 window<br/>[win32_window.cpp]"]
  node_winplugins["Windows plugins"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"records meals"| node_meal
node_app -->|"records spending"| node_direct
node_app -->|"manages messes"| node_mess
node_app -->|"reviews history"| node_history
node_app -->|"tracks payments"| node_payments
node_app -->|"views reports"| node_reports
node_app -->|"exports data"| node_export
node_app -->|"customizes tracking"| node_settings
node_app -->|"stores locally"| node_localstore
node_app -.->|"uses models"| node_models
node_app -.->|"requests sync"| node_sync
node_sync -->|"syncs records"| node_supabase
node_app -.->|"configures reminders"| node_reminders
node_user -->|"quick-adds"| node_widget
node_widget -->|"opens app"| node_android
node_widget -.->|"queues entry"| node_localstore
node_winmain -->|"creates window"| node_winwindow
node_winwindow -->|"inherits window"| node_winbase
node_winwindow -->|"registers plugins"| node_winplugins

click node_app "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_models "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/models.dart"
click node_meal "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_direct "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_mess "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_history "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_payments "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_reports "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_export "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_settings "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart"
click node_localstore "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/local_store.dart"
click node_sync "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/cloud_sync.dart"
click node_supabase "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/supabase/migrations/001_tiffintap.sql"
click node_reminders "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/reminder_service.dart"
click node_widget "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt"
click node_android "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/android/app/src/main/kotlin/com/tiffintap/tiffintap/MainActivity.kt"
click node_winmain "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/main.cpp"
click node_winwindow "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/flutter_window.cpp"
click node_winbase "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/win32_window.cpp"
click node_winplugins "https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/flutter/generated_plugin_registrant.h"

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_models,node_meal,node_direct,node_mess,node_history,node_payments,node_reports,node_export,node_settings,node_user toneBlue
class node_localstore toneAmber
class node_sync,node_supabase toneMint
class node_reminders,node_widget,node_android,node_winmain,node_winwindow,node_winbase,node_winplugins toneRose
```

## Components

### Ledger app

- [Ledger interface](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Ledger models](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/models.dart): `lib/models.dart`
- [Meal entries](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Direct spending](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Mess management](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [History and calendar](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Payments](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Monthly reports](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Export and backup](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`
- [Tracker settings](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/main.dart): `lib/main.dart`

### Local data

- [SQLite store](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/local_store.dart): `lib/data/local_store.dart`

### Cloud sync

- [Cloud sync and outbox](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/cloud_sync.dart): `lib/data/cloud_sync.dart`
- [Supabase service](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/supabase/migrations/001_tiffintap.sql): `supabase/migrations/001_tiffintap.sql`

### Platform features

- [Reminder service](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/lib/data/reminder_service.dart): `lib/data/reminder_service.dart`
- [Quick-add widget](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt): `android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt`
- [Android Flutter host](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/android/app/src/main/kotlin/com/tiffintap/tiffintap/MainActivity.kt): `android/app/src/main/kotlin/com/tiffintap/tiffintap/MainActivity.kt`
- [Windows entry point](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Windows Flutter window](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Windows plugins](https://github.com/panjaritehseen-ship-it/tiffintap/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **User**

## Connections

- User → Ledger interface: uses (evidence: `README.md`)
- Ledger interface → Meal entries: records meals (evidence: `README.md`)
- Ledger interface → Direct spending: records spending (evidence: `README.md`)
- Ledger interface → Mess management: manages messes (evidence: `README.md`)
- Ledger interface → History and calendar: reviews history (evidence: `README.md`)
- Ledger interface → Payments: tracks payments (evidence: `README.md`)
- Ledger interface → Monthly reports: views reports (evidence: `README.md`)
- Ledger interface → Export and backup: exports data (evidence: `README.md`)
- Ledger interface → Tracker settings: customizes tracking (evidence: `README.md`)
- Ledger interface → SQLite store: stores locally (evidence: `README.md`)
- Ledger interface → Ledger models: uses models
- Ledger interface → Cloud sync and outbox: requests sync
- Cloud sync and outbox → Supabase service: syncs records (evidence: `README.md`)
- Ledger interface → Reminder service: configures reminders
- User → Quick-add widget: quick-adds (evidence: `README.md`)
- Quick-add widget → Android Flutter host: opens app (evidence: `android/app/src/main/kotlin/com/tiffintap/tiffintap/QuickAddWidgetProvider.kt`)
- Quick-add widget → SQLite store: queues entry
- Windows entry point → Windows Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Windows Flutter window → Win32 window: inherits window (evidence: `windows/runner/flutter_window.cpp`)
- Windows Flutter window → Windows plugins: registers plugins (evidence: `windows/runner/flutter_window.cpp`)
