# zxch3n/pomodorologger architecture

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

- Interactive diagram: https://gitdiagram.com/zxch3n/pomodorologger
- Repository: https://github.com/zxch3n/pomodorologger

## Overview

Pomodoro Logger is a local-first desktop time-management app. A user starts a focus or rest session, associates focus with a Kanban board and its in-progress cards, and the app records desktop activity for later history and efficiency analysis. The renderer also supports board planning, data import/export, settings, and visual reports; Electron main-process code provides desktop services. Relationships are shown only where the README or sampled/indexed files support them; some monitoring, storage, and analysis internals were not excerpted.

Main entry points: [`src/renderer/components/Application.tsx`](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Application.tsx) (Application UI), [`src/renderer/components/Timer/action.ts`](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Timer/action.ts) (Pomodoro timer), [`src/renderer/components/History/History.tsx`](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/History/History.tsx) (Session history), [`src/renderer/monitor/sessionManager.ts`](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/monitor/sessionManager.ts) (Session manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_renderer["Application UI<br/>[Application.tsx]"]
  node_main["Electron main<br/>[main.ts]"]
  node_ipc["Desktop IPC<br/>[ipc.ts]"]
  node_settings["Settings<br/>[Setting.tsx]"]
end

subgraph group_focus["Focus and activity"]
  node_timer["Pomodoro timer<br/>[action.ts]"]
  node_monitor["Activity monitoring"]
  node_session["Session manager<br/>[sessionManager.ts]"]
end

subgraph group_planning["Kanban planning"]
  node_kanban["Kanban board<br/>[Kanban.tsx]"]
  node_board_actions["Board actions<br/>[action.ts]"]
  node_card_actions["Card actions<br/>[action.ts]"]
end

subgraph group_records["History and data"]
  node_history["Session history<br/>[History.tsx]"]
  node_history_actions["History actions<br/>[action.ts]"]
  node_storage[("Local data store<br/>[db.ts]")]
  node_renderer_db["Renderer database access<br/>[dbs.ts]"]
  node_io["Import and export"]
  node_merge["Data merger<br/>[dataMerger.ts]"]
end

subgraph group_insights["Analysis and reports"]
  node_efficiency["Efficiency analysis<br/>[efficiency.ts]"]
  node_visuals["Activity visualizations"]
  node_sankey["Pomodoro Sankey<br/>[PomodoroSankey.tsx]"]
end

node_user(("User"))

node_user -->|"uses"| node_renderer
node_renderer -->|"shows timer"| node_timer
node_renderer -->|"shows board"| node_kanban
node_renderer -->|"shows history"| node_history
node_renderer -->|"shows report"| node_sankey
node_user -->|"starts sessions"| node_timer
node_timer -->|"saves session"| node_session
node_timer -->|"updates board"| node_board_actions
node_monitor -.->|"records activity"| node_session
node_session -.->|"persists records"| node_storage
node_user -->|"organizes tasks"| node_kanban
node_board_actions -->|"updates cards"| node_card_actions
node_history -->|"uses actions"| node_history_actions
node_renderer -->|"loads databases"| node_renderer_db
node_renderer_db -->|"accesses store"| node_storage
node_user -->|"imports or exports"| node_io
node_io -->|"merges imported data"| node_merge
node_main -->|"initializes desktop"| node_ipc
node_user -->|"reviews efficiency"| node_efficiency
node_history -.->|"reviews activity"| node_visuals
node_renderer -.->|"uses analysis"| node_efficiency
node_renderer -.->|"opens settings"| node_settings

click node_renderer "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Application.tsx"
click node_main "https://github.com/zxch3n/pomodorologger/blob/master/src/main/main.ts"
click node_ipc "https://github.com/zxch3n/pomodorologger/blob/master/src/main/ipc/ipc.ts"
click node_settings "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Setting/Setting.tsx"
click node_timer "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Timer/action.ts"
click node_monitor "https://github.com/zxch3n/pomodorologger/tree/master/src/renderer/monitor"
click node_session "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/monitor/sessionManager.ts"
click node_kanban "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Kanban.tsx"
click node_board_actions "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Board/action.ts"
click node_card_actions "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Card/action.ts"
click node_history "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/History/History.tsx"
click node_history_actions "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/History/action.ts"
click node_storage "https://github.com/zxch3n/pomodorologger/blob/master/src/main/db.ts"
click node_renderer_db "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/dbs.ts"
click node_io "https://github.com/zxch3n/pomodorologger/tree/master/src/main/io"
click node_merge "https://github.com/zxch3n/pomodorologger/blob/master/src/shared/dataMerger/dataMerger.ts"
click node_efficiency "https://github.com/zxch3n/pomodorologger/blob/master/src/shared/efficiency/efficiency.ts"
click node_visuals "https://github.com/zxch3n/pomodorologger/tree/master/src/renderer/components/Visualization"
click node_sankey "https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Visualization/PomodoroSankey.tsx"

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_renderer,node_main,node_ipc,node_settings,node_user toneBlue
class node_timer,node_monitor,node_session toneAmber
class node_kanban,node_board_actions,node_card_actions toneMint
class node_history,node_history_actions,node_storage,node_renderer_db,node_io,node_merge toneRose
class node_efficiency,node_visuals,node_sankey toneIndigo
```

## Components

### Desktop shell

- [Application UI](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Application.tsx): `src/renderer/components/Application.tsx`
- [Electron main](https://github.com/zxch3n/pomodorologger/blob/master/src/main/main.ts): `src/main/main.ts`
- [Desktop IPC](https://github.com/zxch3n/pomodorologger/blob/master/src/main/ipc/ipc.ts): `src/main/ipc/ipc.ts`
- [Settings](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Setting/Setting.tsx): `src/renderer/components/Setting/Setting.tsx`

### Focus and activity

- [Pomodoro timer](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Timer/action.ts): `src/renderer/components/Timer/action.ts`
- [Activity monitoring](https://github.com/zxch3n/pomodorologger/tree/master/src/renderer/monitor): `src/renderer/monitor`
- [Session manager](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/monitor/sessionManager.ts): `src/renderer/monitor/sessionManager.ts`

### Kanban planning

- [Kanban board](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Kanban.tsx): `src/renderer/components/Kanban/Kanban.tsx`
- [Board actions](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Board/action.ts): `src/renderer/components/Kanban/Board/action.ts`
- [Card actions](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Kanban/Card/action.ts): `src/renderer/components/Kanban/Card/action.ts`

### History and data

- [Session history](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/History/History.tsx): `src/renderer/components/History/History.tsx`
- [History actions](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/History/action.ts): `src/renderer/components/History/action.ts`
- [Local data store](https://github.com/zxch3n/pomodorologger/blob/master/src/main/db.ts): `src/main/db.ts`
- [Renderer database access](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/dbs.ts): `src/renderer/dbs.ts`
- [Import and export](https://github.com/zxch3n/pomodorologger/tree/master/src/main/io): `src/main/io`
- [Data merger](https://github.com/zxch3n/pomodorologger/blob/master/src/shared/dataMerger/dataMerger.ts): `src/shared/dataMerger/dataMerger.ts`

### Analysis and reports

- [Efficiency analysis](https://github.com/zxch3n/pomodorologger/blob/master/src/shared/efficiency/efficiency.ts): `src/shared/efficiency/efficiency.ts`
- [Activity visualizations](https://github.com/zxch3n/pomodorologger/tree/master/src/renderer/components/Visualization): `src/renderer/components/Visualization`
- [Pomodoro Sankey](https://github.com/zxch3n/pomodorologger/blob/master/src/renderer/components/Visualization/PomodoroSankey.tsx): `src/renderer/components/Visualization/PomodoroSankey.tsx`

### Other components

- **User**

## Connections

- User → Application UI: uses
- Application UI → Pomodoro timer: shows timer (evidence: `src/renderer/components/Application.tsx`)
- Application UI → Kanban board: shows board (evidence: `src/renderer/components/Application.tsx`)
- Application UI → Session history: shows history (evidence: `src/renderer/components/Application.tsx`)
- Application UI → Pomodoro Sankey: shows report (evidence: `src/renderer/components/Application.tsx`)
- User → Pomodoro timer: starts sessions
- Pomodoro timer → Session manager: saves session (evidence: `src/renderer/components/Timer/action.ts`)
- Pomodoro timer → Board actions: updates board (evidence: `src/renderer/components/Timer/action.ts`)
- Activity monitoring → Session manager: records activity
- Session manager → Local data store: persists records
- User → Kanban board: organizes tasks
- Board actions → Card actions: updates cards (evidence: `src/renderer/components/Kanban/Board/action.ts`)
- Session history → History actions: uses actions (evidence: `src/renderer/components/History/index.ts`)
- Application UI → Renderer database access: loads databases (evidence: `src/renderer/components/Application.tsx`)
- Renderer database access → Local data store: accesses store (evidence: `src/renderer/dbs.ts`)
- User → Import and export: imports or exports
- Import and export → Data merger: merges imported data (evidence: `src/main/worker/dataHandlers.ts`)
- Electron main → Desktop IPC: initializes desktop (evidence: `src/main/main.ts`)
- User → Efficiency analysis: reviews efficiency
- Session history → Activity visualizations: reviews activity
- Application UI → Efficiency analysis: uses analysis
- Application UI → Settings: opens settings
