# aquarius2301/pomint architecture

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

- Interactive diagram: https://gitdiagram.com/aquarius2301/pomint
- Repository: https://github.com/aquarius2301/pomint

## Overview

Pomint is a React/Tauri desktop Pomodoro timer. Users configure focus and break durations, session intervals, notifications, timer appearance, and window behavior; they then run, pause, or skip cycling focus and break sessions. The app also presents theme controls, system-tray behavior, About information, and release notes. The main component wiring and layout are excerpted; timer, settings, tray, and Rust implementation details are only partly sampled, so uncertain connections are marked dashed or omitted.

Main entry points: [`src/App.tsx`](https://github.com/aquarius2301/pomint/blob/main/src/App.tsx) (App routing), [`src/layouts/AppLayout.tsx`](https://github.com/aquarius2301/pomint/blob/main/src/layouts/AppLayout.tsx) (Navigation layout), [`src/lib/tauriBridge.ts`](https://github.com/aquarius2301/pomint/blob/main/src/lib/tauriBridge.ts) (Tauri bridge), [`src/main.tsx`](https://github.com/aquarius2301/pomint/blob/main/src/main.tsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["App routing<br/>[App.tsx]"]
  node_layout["Navigation layout<br/>[AppLayout.tsx]"]
  node_appstate["App metadata state<br/>[useAppStore.ts]"]
  node_layoutstate["Layout state<br/>[useLayoutStore.ts]"]
end

subgraph group_timer["Pomodoro timer"]
  node_timerpage["Timer page<br/>[index.tsx]"]
  node_timerstate["Pomodoro state<br/>[useTimerStore.ts]"]
  node_timerstyles["Timer styles<br/>[index.tsx]"]
end

subgraph group_preferences["Preferences"]
  node_settingspage["Settings page<br/>[index.tsx]"]
  node_settingsui["Settings controls<br/>[TimingSection.tsx]"]
  node_settingsstate["Settings state"]
  node_themestate["Theme state<br/>[useThemeStore.ts]"]
end

subgraph group_desktop["Desktop integration"]
  node_sound["Notification sound<br/>[sound.ts]"]
  node_trayhooks["Tray behavior<br/>[useTraySync.ts]"]
  node_closebehavior["Close behavior"]
  node_bridge["Tauri bridge<br/>[tauriBridge.ts]"]
  node_rust["Tauri backend<br/>[lib.rs]"]
end

subgraph group_information["App information"]
  node_about["About page<br/>[index.tsx]"]
  node_changelog["Changelog page<br/>[index.tsx]"]
  node_releases["Release notes<br/>[releases.ts]"]
end

node_user(("Desktop user"))

node_user -->|"opens app"| node_entry
node_entry -->|"installs bridge"| node_bridge
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_timerpage
node_app -->|"routes to"| node_settingspage
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_changelog
node_app -->|"reads theme"| node_themestate
node_app -->|"starts sync"| node_trayhooks
node_app -->|"starts sync"| node_closebehavior
node_layout -->|"reads and updates"| node_appstate
node_layout -->|"reads visibility"| node_layoutstate
node_layout -->|"reads highlights"| node_releases
node_changelog -->|"renders notes"| node_releases
node_about -->|"reads metadata"| node_appstate
node_timerpage -.->|"uses timer state"| node_timerstate
node_timerpage -.->|"selects appearance"| node_timerstyles
node_settingspage -.->|"renders controls"| node_settingsui
node_settingsui -.->|"updates preferences"| node_settingsstate
node_timerstate -.->|"plays on transition"| node_sound
node_trayhooks -.->|"uses desktop API"| node_bridge
node_closebehavior -.->|"uses desktop API"| node_bridge
node_bridge -.->|"communicates with"| node_rust

click node_entry "https://github.com/aquarius2301/pomint/blob/main/src/main.tsx"
click node_app "https://github.com/aquarius2301/pomint/blob/main/src/App.tsx"
click node_layout "https://github.com/aquarius2301/pomint/blob/main/src/layouts/AppLayout.tsx"
click node_timerpage "https://github.com/aquarius2301/pomint/blob/main/src/pages/Timer/index.tsx"
click node_timerstate "https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/usePomodoroStore/useTimerStore.ts"
click node_timerstyles "https://github.com/aquarius2301/pomint/blob/main/src/pages/Timer/components/DefaultTimer/index.tsx"
click node_settingspage "https://github.com/aquarius2301/pomint/blob/main/src/pages/Settings/index.tsx"
click node_settingsui "https://github.com/aquarius2301/pomint/blob/main/src/pages/Settings/components/GeneralSettingTab/TimingSection.tsx"
click node_settingsstate "https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useSettingsStore/useSettingsStore.ts"
click node_themestate "https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useThemeStore/useThemeStore.ts"
click node_sound "https://github.com/aquarius2301/pomint/blob/main/src/lib/sound.ts"
click node_trayhooks "https://github.com/aquarius2301/pomint/blob/main/src/hooks/custom/useTraySync.ts"
click node_closebehavior "https://github.com/aquarius2301/pomint/blob/main/src/hooks/custom/useCloseBehaviorSync.ts"
click node_bridge "https://github.com/aquarius2301/pomint/blob/main/src/lib/tauriBridge.ts"
click node_rust "https://github.com/aquarius2301/pomint/blob/main/src-tauri/src/lib.rs"
click node_about "https://github.com/aquarius2301/pomint/blob/main/src/pages/About/index.tsx"
click node_changelog "https://github.com/aquarius2301/pomint/blob/main/src/pages/Changelog/index.tsx"
click node_releases "https://github.com/aquarius2301/pomint/blob/main/src/data/releases.ts"
click node_appstate "https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useAppStore/useAppStore.ts"
click node_layoutstate "https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useLayoutStore/useLayoutStore.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_entry,node_app,node_layout,node_appstate,node_layoutstate,node_user toneBlue
class node_timerpage,node_timerstate,node_timerstyles toneAmber
class node_settingspage,node_settingsui,node_settingsstate,node_themestate toneMint
class node_sound,node_trayhooks,node_closebehavior,node_bridge,node_rust toneRose
class node_about,node_changelog,node_releases toneIndigo
```

## Components

### App shell

- [React entry](https://github.com/aquarius2301/pomint/blob/main/src/main.tsx): `src/main.tsx`
- [App routing](https://github.com/aquarius2301/pomint/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation layout](https://github.com/aquarius2301/pomint/blob/main/src/layouts/AppLayout.tsx): `src/layouts/AppLayout.tsx`
- [App metadata state](https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useAppStore/useAppStore.ts): `src/hooks/stores/useAppStore/useAppStore.ts`
- [Layout state](https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useLayoutStore/useLayoutStore.ts): `src/hooks/stores/useLayoutStore/useLayoutStore.ts`

### Pomodoro timer

- [Timer page](https://github.com/aquarius2301/pomint/blob/main/src/pages/Timer/index.tsx): `src/pages/Timer/index.tsx`
- [Pomodoro state](https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/usePomodoroStore/useTimerStore.ts): `src/hooks/stores/usePomodoroStore/useTimerStore.ts`
- [Timer styles](https://github.com/aquarius2301/pomint/blob/main/src/pages/Timer/components/DefaultTimer/index.tsx): `src/pages/Timer/components/DefaultTimer/index.tsx`

### Preferences

- [Settings page](https://github.com/aquarius2301/pomint/blob/main/src/pages/Settings/index.tsx): `src/pages/Settings/index.tsx`
- [Settings controls](https://github.com/aquarius2301/pomint/blob/main/src/pages/Settings/components/GeneralSettingTab/TimingSection.tsx): `src/pages/Settings/components/GeneralSettingTab/TimingSection.tsx`
- [Settings state](https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useSettingsStore/useSettingsStore.ts): `src/hooks/stores/useSettingsStore/useSettingsStore.ts`
- [Theme state](https://github.com/aquarius2301/pomint/blob/main/src/hooks/stores/useThemeStore/useThemeStore.ts): `src/hooks/stores/useThemeStore/useThemeStore.ts`

### Desktop integration

- [Notification sound](https://github.com/aquarius2301/pomint/blob/main/src/lib/sound.ts): `src/lib/sound.ts`
- [Tray behavior](https://github.com/aquarius2301/pomint/blob/main/src/hooks/custom/useTraySync.ts): `src/hooks/custom/useTraySync.ts`
- [Close behavior](https://github.com/aquarius2301/pomint/blob/main/src/hooks/custom/useCloseBehaviorSync.ts): `src/hooks/custom/useCloseBehaviorSync.ts`
- [Tauri bridge](https://github.com/aquarius2301/pomint/blob/main/src/lib/tauriBridge.ts): `src/lib/tauriBridge.ts`
- [Tauri backend](https://github.com/aquarius2301/pomint/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### App information

- [About page](https://github.com/aquarius2301/pomint/blob/main/src/pages/About/index.tsx): `src/pages/About/index.tsx`
- [Changelog page](https://github.com/aquarius2301/pomint/blob/main/src/pages/Changelog/index.tsx): `src/pages/Changelog/index.tsx`
- [Release notes](https://github.com/aquarius2301/pomint/blob/main/src/data/releases.ts): `src/data/releases.ts`

### Other components

- **Desktop user**

## Connections

- Desktop user → React entry: opens app (evidence: `README.md`)
- React entry → Tauri bridge: installs bridge (evidence: `src/main.tsx`)
- React entry → App routing: renders (evidence: `src/main.tsx`)
- App routing → Navigation layout: renders (evidence: `src/App.tsx`)
- App routing → Timer page: routes to (evidence: `src/App.tsx`)
- App routing → Settings page: routes to (evidence: `src/App.tsx`)
- App routing → About page: routes to (evidence: `src/App.tsx`)
- App routing → Changelog page: routes to (evidence: `src/App.tsx`)
- App routing → Theme state: reads theme (evidence: `src/App.tsx`)
- App routing → Tray behavior: starts sync (evidence: `src/App.tsx`)
- App routing → Close behavior: starts sync (evidence: `src/App.tsx`)
- Navigation layout → App metadata state: reads and updates (evidence: `src/layouts/AppLayout.tsx`)
- Navigation layout → Layout state: reads visibility (evidence: `src/layouts/AppLayout.tsx`)
- Navigation layout → Release notes: reads highlights (evidence: `src/layouts/AppLayout.tsx`)
- Changelog page → Release notes: renders notes (evidence: `src/pages/Changelog/index.tsx`)
- About page → App metadata state: reads metadata (evidence: `src/pages/About/index.tsx`)
- Timer page → Pomodoro state: uses timer state
- Timer page → Timer styles: selects appearance
- Settings page → Settings controls: renders controls
- Settings controls → Settings state: updates preferences
- Pomodoro state → Notification sound: plays on transition
- Tray behavior → Tauri bridge: uses desktop API
- Close behavior → Tauri bridge: uses desktop API
- Tauri bridge → Tauri backend: communicates with
