# dinakargowdan585/productive architecture

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

## Overview

DHARIN is an offline-first personal productivity web app. Users move through the SPA to plan and complete tasks, review progress and streaks, schedule time, keep Cornell notes and encrypted secrets, or use StandBy focus tools. The shared store fronts IndexedDB-backed local state; optional cloud authentication and synchronization provide multi-device backup. Core feature capabilities are retained from the README, while connections among unsampled modules are omitted or marked unverified rather than inferred. The excerpts show storage and selected feature calls; README statements support the broader cloud and product capabilities.

Main entry points: [`js/app.js`](https://github.com/dinakargowdan585/productive/blob/main/js/app.js) (SPA router), [`js/store.js`](https://github.com/dinakargowdan585/productive/blob/main/js/store.js) (App state service), [`js/planner.js`](https://github.com/dinakargowdan585/productive/blob/main/js/planner.js) (Planner and focus), [`storage/sync/syncEngine.js`](https://github.com/dinakargowdan585/productive/blob/main/storage/sync/syncEngine.js) (Cloud sync engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["SPA router<br/>[app.js]"]
  node_standby["StandBy display<br/>[standby.js]"]
  node_fx["Effects and feedback<br/>[fx.js]"]
end

subgraph group_work["Planning and tracking"]
  node_dashboard["Dashboard and streaks<br/>[dashboard.js]"]
  node_rollover["Streak rollover<br/>[dayRollover.js]"]
  node_planner["Planner and focus<br/>[planner.js]"]
  node_calendar["Calendar blocking<br/>[calendar.js]"]
end

subgraph group_knowledge["Knowledge tools"]
  node_notes["Cornell notes<br/>[notes.js]"]
  node_vault["Encrypted vault<br/>[vault.js]"]
end

subgraph group_platform["Persistence and sync"]
  node_store["App state service<br/>[store.js]"]
  node_database[("IndexedDB<br/>[database.js]")]
  node_repositories["Entity repositories<br/>[baseRepository.js]"]
  node_sync["Cloud sync engine<br/>[syncEngine.js]"]
  node_supabase["Supabase auth and cloud<br/>[supabase.js]"]
end

node_user(("User"))
node_cloud[("Supabase service")]

node_user -->|"opens and navigates"| node_app
node_app -.->|"selects dashboard"| node_dashboard
node_app -.->|"selects planner"| node_planner
node_app -.->|"selects calendar"| node_calendar
node_app -.->|"selects notes"| node_notes
node_app -.->|"selects vault"| node_vault
node_app -.->|"opens StandBy"| node_standby
node_app -->|"initializes storage"| node_store
node_planner -->|"saves tasks"| node_store
node_calendar -->|"saves tasks"| node_store
node_notes -->|"saves notes"| node_store
node_vault -.->|"persists vault data"| node_store
node_dashboard -->|"reads progress"| node_store
node_rollover -.->|"updates streak state"| node_store
node_standby -.->|"runs focus timer"| node_planner
node_planner -->|"plays completion effects"| node_fx
node_store -.->|"loads and saves entities"| node_repositories
node_repositories -->|"reads and writes"| node_database
node_store -->|"schedules sync"| node_sync
node_sync -->|"reads and saves records"| node_repositories
node_sync -->|"reconciles remote data"| node_cloud
node_app -->|"auth actions"| node_supabase
node_supabase -.->|"authenticates and syncs"| node_cloud

click node_app "https://github.com/dinakargowdan585/productive/blob/main/js/app.js"
click node_dashboard "https://github.com/dinakargowdan585/productive/blob/main/js/dashboard.js"
click node_rollover "https://github.com/dinakargowdan585/productive/blob/main/js/dayRollover.js"
click node_planner "https://github.com/dinakargowdan585/productive/blob/main/js/planner.js"
click node_calendar "https://github.com/dinakargowdan585/productive/blob/main/js/calendar.js"
click node_standby "https://github.com/dinakargowdan585/productive/blob/main/js/standby.js"
click node_notes "https://github.com/dinakargowdan585/productive/blob/main/js/notes.js"
click node_vault "https://github.com/dinakargowdan585/productive/blob/main/js/vault.js"
click node_fx "https://github.com/dinakargowdan585/productive/blob/main/js/fx.js"
click node_store "https://github.com/dinakargowdan585/productive/blob/main/js/store.js"
click node_database "https://github.com/dinakargowdan585/productive/blob/main/storage/database.js"
click node_repositories "https://github.com/dinakargowdan585/productive/blob/main/storage/repositories/baseRepository.js"
click node_sync "https://github.com/dinakargowdan585/productive/blob/main/storage/sync/syncEngine.js"
click node_supabase "https://github.com/dinakargowdan585/productive/blob/main/js/supabase.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_standby,node_fx,node_user toneBlue
class node_dashboard,node_rollover,node_planner,node_calendar,node_cloud toneAmber
class node_notes,node_vault toneMint
class node_store,node_database,node_repositories,node_sync,node_supabase toneRose
```

## Components

### App experience

- [SPA router](https://github.com/dinakargowdan585/productive/blob/main/js/app.js): `js/app.js`
- [StandBy display](https://github.com/dinakargowdan585/productive/blob/main/js/standby.js): `js/standby.js`
- [Effects and feedback](https://github.com/dinakargowdan585/productive/blob/main/js/fx.js): `js/fx.js`

### Planning and tracking

- [Dashboard and streaks](https://github.com/dinakargowdan585/productive/blob/main/js/dashboard.js): `js/dashboard.js`
- [Streak rollover](https://github.com/dinakargowdan585/productive/blob/main/js/dayRollover.js): `js/dayRollover.js`
- [Planner and focus](https://github.com/dinakargowdan585/productive/blob/main/js/planner.js): `js/planner.js`
- [Calendar blocking](https://github.com/dinakargowdan585/productive/blob/main/js/calendar.js): `js/calendar.js`

### Knowledge tools

- [Cornell notes](https://github.com/dinakargowdan585/productive/blob/main/js/notes.js): `js/notes.js`
- [Encrypted vault](https://github.com/dinakargowdan585/productive/blob/main/js/vault.js): `js/vault.js`

### Persistence and sync

- [App state service](https://github.com/dinakargowdan585/productive/blob/main/js/store.js): `js/store.js`
- [IndexedDB](https://github.com/dinakargowdan585/productive/blob/main/storage/database.js): `storage/database.js`
- [Entity repositories](https://github.com/dinakargowdan585/productive/blob/main/storage/repositories/baseRepository.js): `storage/repositories/baseRepository.js`
- [Cloud sync engine](https://github.com/dinakargowdan585/productive/blob/main/storage/sync/syncEngine.js): `storage/sync/syncEngine.js`
- [Supabase auth and cloud](https://github.com/dinakargowdan585/productive/blob/main/js/supabase.js): `js/supabase.js`

### Other components

- **User**
- **Supabase service**

## Connections

- User → SPA router: opens and navigates (evidence: `README.md`)
- SPA router → Dashboard and streaks: selects dashboard
- SPA router → Planner and focus: selects planner
- SPA router → Calendar blocking: selects calendar
- SPA router → Cornell notes: selects notes
- SPA router → Encrypted vault: selects vault
- SPA router → StandBy display: opens StandBy
- SPA router → App state service: initializes storage (evidence: `js/app.js`)
- Planner and focus → App state service: saves tasks (evidence: `js/planner.js`)
- Calendar blocking → App state service: saves tasks (evidence: `js/calendar.js`)
- Cornell notes → App state service: saves notes (evidence: `js/notes.js`)
- Encrypted vault → App state service: persists vault data
- Dashboard and streaks → App state service: reads progress (evidence: `js/dashboard.js`)
- Streak rollover → App state service: updates streak state
- StandBy display → Planner and focus: runs focus timer
- Planner and focus → Effects and feedback: plays completion effects (evidence: `js/planner.js`)
- App state service → Entity repositories: loads and saves entities
- Entity repositories → IndexedDB: reads and writes (evidence: `storage/repositories/baseRepository.js`)
- App state service → Cloud sync engine: schedules sync (evidence: `js/store.js`)
- Cloud sync engine → Entity repositories: reads and saves records (evidence: `storage/sync/syncEngine.js`)
- Cloud sync engine → Supabase service: reconciles remote data (evidence: `storage/sync/syncEngine.js`)
- SPA router → Supabase auth and cloud: auth actions (evidence: `js/app.js`)
- Supabase auth and cloud → Supabase service: authenticates and syncs
