# anuragdotdev/caly architecture

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

- Interactive diagram: https://gitdiagram.com/anuragdotdev/caly
- Repository: https://github.com/anuragdotdev/caly

## Overview

Caly is an offline Chrome new-tab planning dashboard. The user opens the dashboard, reviews a three-month calendar, upcoming events and todos, then edits events, tasks or settings; changes persist locally and completed tasks are cleared on the daily cycle. The graph separates dashboard orchestration, planning views, settings, and state services. README documents capabilities whose internal wiring was not sampled; those are represented without guessed implementation edges.

Main entry points: [`src/pages/NewTab.tsx`](https://github.com/anuragdotdev/caly/blob/main/src/pages/NewTab.tsx) (Dashboard orchestration), [`src/services/storage.ts`](https://github.com/anuragdotdev/caly/blob/main/src/services/storage.ts) (Persistent storage), [`src/components/Header/Header.tsx`](https://github.com/anuragdotdev/caly/blob/main/src/components/Header/Header.tsx) (Countdown header), [`src/components/Celebration/Celebration.tsx`](https://github.com/anuragdotdev/caly/blob/main/src/components/Celebration/Celebration.tsx) (Deadline celebration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_newtab["Dashboard orchestration<br/>[NewTab.tsx]"]
  node_header["Countdown header<br/>[Header.tsx]"]
  node_celebration["Deadline celebration<br/>[Celebration.tsx]"]
end

subgraph group_planning["Planning Views"]
  node_calendar["Month calendar<br/>[YearlyCalendar.tsx]"]
  node_monthgrid["Month grid<br/>[MonthGrid.tsx]"]
  node_datecell["Date cells<br/>[DateCell.tsx]"]
  node_popover["Date event popover<br/>[DatePopover.tsx]"]
  node_upcoming["Upcoming events<br/>[UpcomingEvents.tsx]"]
  node_eventmodal["Event editor<br/>[EventModal.tsx]"]
  node_todo["Todo list<br/>[TodoList.tsx]"]
  node_taskmodal["Task editor<br/>[TaskModal.tsx]"]
end

subgraph group_settings["Settings"]
  node_settingsmodal["Settings and data transfer<br/>[SettingsModal.tsx]"]
end

subgraph group_state["State Services"]
  node_appdata["App data hook<br/>[useAppData.ts]"]
  node_dailyreset["Daily task reset"]
  node_storage[("Persistent storage<br/>[storage.ts]")]
  node_migration["Data migration<br/>[migrate.ts]"]
  node_taskrules["Task ordering and reset rules<br/>[tasks.ts]"]
end

subgraph group_shared["Shared Logic"]
  node_calendarservice["Event and day rules<br/>[calendar.ts]"]
  node_countdown["Countdown logic<br/>[countdown.ts]"]
  node_dates["Local date utilities<br/>[dates.ts]"]
  node_transfer["JSON import/export<br/>[transfer.ts]"]
end

node_user(("New-tab user"))
node_chrome[("Chrome local storage")]

node_user -->|"opens dashboard"| node_newtab
node_newtab -->|"renders"| node_header
node_newtab -->|"renders"| node_calendar
node_newtab -->|"renders"| node_upcoming
node_newtab -->|"renders"| node_todo
node_newtab -->|"renders"| node_popover
node_newtab -->|"renders"| node_eventmodal
node_newtab -->|"renders"| node_taskmodal
node_newtab -->|"renders"| node_settingsmodal
node_newtab -->|"renders"| node_celebration
node_calendar -->|"renders"| node_monthgrid
node_monthgrid -->|"renders"| node_datecell
node_newtab -->|"gets upcoming events"| node_calendarservice
node_newtab -->|"loads and updates"| node_appdata
node_newtab -->|"schedules reset"| node_dailyreset
node_appdata -->|"loads and mutates"| node_storage
node_storage -->|"reads and writes"| node_chrome
node_storage -->|"normalizes data"| node_migration
node_storage -->|"clears stale tasks"| node_taskrules
node_dailyreset -->|"gets reset boundary"| node_taskrules
node_header -->|"uses countdown"| node_countdown
node_celebration -->|"uses countdown"| node_countdown
node_calendarservice -.->|"uses date utilities"| node_dates
node_settingsmodal -->|"imports and exports"| node_transfer
node_transfer -->|"validates imported data"| node_migration
node_newtab -.->|"uses local dates"| node_dates

click node_newtab "https://github.com/anuragdotdev/caly/blob/main/src/pages/NewTab.tsx"
click node_header "https://github.com/anuragdotdev/caly/blob/main/src/components/Header/Header.tsx"
click node_celebration "https://github.com/anuragdotdev/caly/blob/main/src/components/Celebration/Celebration.tsx"
click node_calendar "https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/YearlyCalendar.tsx"
click node_monthgrid "https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/MonthGrid.tsx"
click node_datecell "https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/DateCell.tsx"
click node_popover "https://github.com/anuragdotdev/caly/blob/main/src/components/DatePopover/DatePopover.tsx"
click node_upcoming "https://github.com/anuragdotdev/caly/blob/main/src/components/UpcomingEvents/UpcomingEvents.tsx"
click node_eventmodal "https://github.com/anuragdotdev/caly/blob/main/src/components/EventModal/EventModal.tsx"
click node_todo "https://github.com/anuragdotdev/caly/blob/main/src/components/Todo/TodoList.tsx"
click node_taskmodal "https://github.com/anuragdotdev/caly/blob/main/src/components/Todo/TaskModal.tsx"
click node_settingsmodal "https://github.com/anuragdotdev/caly/blob/main/src/components/Settings/SettingsModal.tsx"
click node_appdata "https://github.com/anuragdotdev/caly/blob/main/src/hooks/useAppData.ts"
click node_dailyreset "https://github.com/anuragdotdev/caly/blob/main/src/hooks/useDailyTaskReset.ts"
click node_storage "https://github.com/anuragdotdev/caly/blob/main/src/services/storage.ts"
click node_migration "https://github.com/anuragdotdev/caly/blob/main/src/services/migrate.ts"
click node_taskrules "https://github.com/anuragdotdev/caly/blob/main/src/services/tasks.ts"
click node_calendarservice "https://github.com/anuragdotdev/caly/blob/main/src/services/calendar.ts"
click node_countdown "https://github.com/anuragdotdev/caly/blob/main/src/services/countdown.ts"
click node_dates "https://github.com/anuragdotdev/caly/blob/main/src/utils/dates.ts"
click node_transfer "https://github.com/anuragdotdev/caly/blob/main/src/utils/transfer.ts"

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_newtab,node_header,node_celebration,node_user toneBlue
class node_calendar,node_monthgrid,node_datecell,node_popover,node_upcoming,node_eventmodal,node_todo,node_taskmodal,node_chrome toneAmber
class node_settingsmodal toneMint
class node_appdata,node_dailyreset,node_storage,node_migration,node_taskrules toneRose
class node_calendarservice,node_countdown,node_dates,node_transfer toneIndigo
```

## Components

### Dashboard

- [Dashboard orchestration](https://github.com/anuragdotdev/caly/blob/main/src/pages/NewTab.tsx): `src/pages/NewTab.tsx`
- [Countdown header](https://github.com/anuragdotdev/caly/blob/main/src/components/Header/Header.tsx): `src/components/Header/Header.tsx`
- [Deadline celebration](https://github.com/anuragdotdev/caly/blob/main/src/components/Celebration/Celebration.tsx): `src/components/Celebration/Celebration.tsx`

### Planning Views

- [Month calendar](https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/YearlyCalendar.tsx): `src/components/Calendar/YearlyCalendar.tsx`
- [Month grid](https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/MonthGrid.tsx): `src/components/Calendar/MonthGrid.tsx`
- [Date cells](https://github.com/anuragdotdev/caly/blob/main/src/components/Calendar/DateCell.tsx): `src/components/Calendar/DateCell.tsx`
- [Date event popover](https://github.com/anuragdotdev/caly/blob/main/src/components/DatePopover/DatePopover.tsx): `src/components/DatePopover/DatePopover.tsx`
- [Upcoming events](https://github.com/anuragdotdev/caly/blob/main/src/components/UpcomingEvents/UpcomingEvents.tsx): `src/components/UpcomingEvents/UpcomingEvents.tsx`
- [Event editor](https://github.com/anuragdotdev/caly/blob/main/src/components/EventModal/EventModal.tsx): `src/components/EventModal/EventModal.tsx`
- [Todo list](https://github.com/anuragdotdev/caly/blob/main/src/components/Todo/TodoList.tsx): `src/components/Todo/TodoList.tsx`
- [Task editor](https://github.com/anuragdotdev/caly/blob/main/src/components/Todo/TaskModal.tsx): `src/components/Todo/TaskModal.tsx`

### Settings

- [Settings and data transfer](https://github.com/anuragdotdev/caly/blob/main/src/components/Settings/SettingsModal.tsx): `src/components/Settings/SettingsModal.tsx`

### State Services

- [App data hook](https://github.com/anuragdotdev/caly/blob/main/src/hooks/useAppData.ts): `src/hooks/useAppData.ts`
- [Daily task reset](https://github.com/anuragdotdev/caly/blob/main/src/hooks/useDailyTaskReset.ts): `src/hooks/useDailyTaskReset.ts`
- [Persistent storage](https://github.com/anuragdotdev/caly/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [Data migration](https://github.com/anuragdotdev/caly/blob/main/src/services/migrate.ts): `src/services/migrate.ts`
- [Task ordering and reset rules](https://github.com/anuragdotdev/caly/blob/main/src/services/tasks.ts): `src/services/tasks.ts`

### Shared Logic

- [Event and day rules](https://github.com/anuragdotdev/caly/blob/main/src/services/calendar.ts): `src/services/calendar.ts`
- [Countdown logic](https://github.com/anuragdotdev/caly/blob/main/src/services/countdown.ts): `src/services/countdown.ts`
- [Local date utilities](https://github.com/anuragdotdev/caly/blob/main/src/utils/dates.ts): `src/utils/dates.ts`
- [JSON import/export](https://github.com/anuragdotdev/caly/blob/main/src/utils/transfer.ts): `src/utils/transfer.ts`

### Other components

- **New-tab user**
- **Chrome local storage**

## Connections

- New-tab user → Dashboard orchestration: opens dashboard (evidence: `README.md`)
- Dashboard orchestration → Countdown header: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Month calendar: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Upcoming events: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Todo list: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Date event popover: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Event editor: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Task editor: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Settings and data transfer: renders (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Deadline celebration: renders (evidence: `src/pages/NewTab.tsx`)
- Month calendar → Month grid: renders (evidence: `src/components/Calendar/YearlyCalendar.tsx`)
- Month grid → Date cells: renders (evidence: `src/components/Calendar/MonthGrid.tsx`)
- Dashboard orchestration → Event and day rules: gets upcoming events (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → App data hook: loads and updates (evidence: `src/pages/NewTab.tsx`)
- Dashboard orchestration → Daily task reset: schedules reset (evidence: `src/pages/NewTab.tsx`)
- App data hook → Persistent storage: loads and mutates (evidence: `src/hooks/useAppData.ts`)
- Persistent storage → Chrome local storage: reads and writes (evidence: `src/services/storage.ts`)
- Persistent storage → Data migration: normalizes data (evidence: `src/services/storage.ts`)
- Persistent storage → Task ordering and reset rules: clears stale tasks (evidence: `src/services/storage.ts`)
- Daily task reset → Task ordering and reset rules: gets reset boundary (evidence: `src/hooks/useDailyTaskReset.ts`)
- Countdown header → Countdown logic: uses countdown (evidence: `src/components/Header/Header.tsx`)
- Deadline celebration → Countdown logic: uses countdown (evidence: `src/components/Celebration/Celebration.tsx`)
- Event and day rules → Local date utilities: uses date utilities
- Settings and data transfer → JSON import/export: imports and exports (evidence: `src/components/Settings/SettingsModal.tsx`)
- JSON import/export → Data migration: validates imported data (evidence: `src/utils/transfer.ts`)
- Dashboard orchestration → Local date utilities: uses local dates (evidence: `src/pages/NewTab.tsx`)
