# navinkrishna48/focusflow architecture

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

- Interactive diagram: https://gitdiagram.com/navinkrishna48/focusflow
- Repository: https://github.com/navinkrishna48/focusflow

## Overview

Focusflow is a personal daily-workflow and credit-card-bill tracker. Users work through a browser interface to manage scheduled tasks and completions, then review card spending and EMI totals by billing cycle; reminders, notes, search, and backup are also indicated in the app source. The central runtime is a single JavaScript file that owns these features and updates the page. A service worker caches the app shell for offline fallback. Source excerpts are partial, so internal connections are shown only where visible; the implementation details of notes, search, and backup are not sampled.

Main entry points: [`script.js`](https://github.com/navinkrishna48/focusflow/blob/main/script.js) (Task planner), [`index.html`](https://github.com/navinkrishna48/focusflow/blob/main/index.html) (App interface), [`sw.js`](https://github.com/navinkrishna48/focusflow/blob/main/sw.js) (Service worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Daily workflow"]
  node_interface["App interface<br/>[index.html]"]
  node_task_planner["Task planner<br/>[script.js]"]
  node_calendar["Calendar views<br/>[script.js]"]
  node_reminders["Reminders<br/>[script.js]"]
  node_notes_tools["Notes, search, backup<br/>[script.js]"]
  node_task_state[("Task and completion state<br/>[script.js]")]
end

subgraph group_finance["Card bills"]
  node_bill_tracker["Card bill tracker<br/>[script.js]"]
  node_cycle_summary["Cycle totals<br/>[script.js]"]
  node_bill_sharing["Bill sharing<br/>[script.js]"]
end

subgraph group_platform["App platform"]
  node_service_worker["Service worker<br/>[sw.js]"]
  node_app_cache[("App shell cache<br/>[sw.js]")]
end

node_user(("User"))
node_browser_share{{"Browser share and clipboard"}}
node_cache_api{{"Browser Cache API"}}

node_user -->|"uses"| node_interface
node_task_planner -->|"renders tasks"| node_interface
node_calendar -->|"gets scheduled tasks"| node_task_planner
node_task_planner -->|"saves completions"| node_task_state
node_reminders -->|"renders reminders"| node_interface
node_reminders -->|"exports calendar file"| node_browser_share
node_bill_tracker -->|"calculates totals"| node_cycle_summary
node_bill_sharing -->|"shares bill"| node_browser_share
node_service_worker -->|"caches app assets"| node_app_cache
node_service_worker -->|"uses cache"| node_cache_api

click node_interface "https://github.com/navinkrishna48/focusflow/blob/main/index.html"
click node_task_planner "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_calendar "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_reminders "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_notes_tools "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_task_state "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_bill_tracker "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_cycle_summary "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_bill_sharing "https://github.com/navinkrishna48/focusflow/blob/main/script.js"
click node_service_worker "https://github.com/navinkrishna48/focusflow/blob/main/sw.js"
click node_app_cache "https://github.com/navinkrishna48/focusflow/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_interface,node_task_planner,node_calendar,node_reminders,node_notes_tools,node_task_state,node_user,node_browser_share toneBlue
class node_bill_tracker,node_cycle_summary,node_bill_sharing,node_cache_api toneAmber
class node_service_worker,node_app_cache toneMint
```

## Components

### Daily workflow

- [App interface](https://github.com/navinkrishna48/focusflow/blob/main/index.html): `index.html`
- [Task planner](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Calendar views](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Reminders](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Notes, search, backup](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Task and completion state](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`

### Card bills

- [Card bill tracker](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Cycle totals](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`
- [Bill sharing](https://github.com/navinkrishna48/focusflow/blob/main/script.js): `script.js`

### App platform

- [Service worker](https://github.com/navinkrishna48/focusflow/blob/main/sw.js): `sw.js`
- [App shell cache](https://github.com/navinkrishna48/focusflow/blob/main/sw.js): `sw.js`

### Other components

- **User**
- **Browser share and clipboard**
- **Browser Cache API**

## Connections

- User → App interface: uses
- Task planner → App interface: renders tasks (evidence: `script.js`)
- Calendar views → Task planner: gets scheduled tasks (evidence: `script.js`)
- Task planner → Task and completion state: saves completions (evidence: `script.js`)
- Reminders → App interface: renders reminders (evidence: `script.js`)
- Reminders → Browser share and clipboard: exports calendar file (evidence: `script.js`)
- Card bill tracker → Cycle totals: calculates totals (evidence: `script.js`)
- Bill sharing → Browser share and clipboard: shares bill (evidence: `script.js`)
- Service worker → App shell cache: caches app assets (evidence: `sw.js`)
- Service worker → Browser Cache API: uses cache (evidence: `sw.js`)
