# ebandev/thermotrack architecture

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

- Interactive diagram: https://gitdiagram.com/ebandev/thermotrack
- Repository: https://github.com/ebandev/thermotrack

## Overview

ThermoTrack is a contraception-tracking PWA for users of heat-based devices. The main workflow records wearing sessions, computes daily wearing time and goal progress, and presents the current status alongside a grouped session history and wearing score. Session grouping and day-boundary handling form the core internal logic; preferences support user configuration, while results, analysis dialogs, chat, and PWA notifications represent additional product areas. Several of these are included from the tree and product description, but their wiring is not shown in the sampled source.

Main entry points: [`pages/index.vue`](https://github.com/ebandev/thermotrack/blob/main/pages/index.vue) (Tracking home), [`components/TopBar.vue`](https://github.com/ebandev/thermotrack/blob/main/components/TopBar.vue) (Top bar), [`composables/useTime.ts`](https://github.com/ebandev/thermotrack/blob/main/composables/useTime.ts) (Day boundaries), [`composables/useSessionGroups.ts`](https://github.com/ebandev/thermotrack/blob/main/composables/useSessionGroups.ts) (Session grouping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["Nuxt app shell<br/>[app.vue]"]
  node_home["Tracking home<br/>[index.vue]"]
  node_info["Info page<br/>[info.vue]"]
  node_progress["Progress circle<br/>[ProgressCircle.vue]"]
  node_timecircle["Time circle<br/>[TimeCircle.vue]"]
  node_tabbar["Tab navigation<br/>[TabBar.vue]"]
  node_topbar["Top bar<br/>[TopBar.vue]"]
end

subgraph group_tracking["Session tracking"]
  node_session["Session controls<br/>[useSession.ts]"]
  node_groups["Session grouping"]
  node_time["Day boundaries<br/>[useTime.ts]"]
  node_startdialog["Start-time dialog<br/>[StartSessionAt.vue]"]
  node_stopdialog["Stop-time dialog<br/>[StopSessionAt.vue]"]
  node_editdialog["Edit sessions<br/>[editSessions.vue]"]
end

subgraph group_insights["History and insights"]
  node_results["Results page<br/>[results.vue]"]
  node_wearingscore["Wearing score<br/>[useWearingScore.ts]"]
  node_scoreview["Score dialog<br/>[WearingScore.vue]"]
  node_analysisadd["Add analysis<br/>[addAnalysis.vue]"]
  node_analysisedit["Edit analysis<br/>[editAnalysis.vue]"]
end

subgraph group_preferences["Preferences and support"]
  node_prefs["User preferences<br/>[userPrefs.ts]"]
  node_settings["Settings dialog<br/>[settings.vue]"]
  node_chat["Chat assistant<br/>[ChatAssistant.vue]"]
  node_notifications["PWA notifications"]
end

node_user(("User"))
node_assistantservice{{"Assistant service"}}

node_user -->|"uses"| node_home
node_app -->|"renders page"| node_home
node_home -->|"reads preferences"| node_prefs
node_home -->|"controls sessions"| node_session
node_home -->|"groups history"| node_groups
node_home -->|"calculates score"| node_wearingscore
node_home -->|"renders progress"| node_progress
node_home -->|"renders timeline"| node_timecircle
node_home -->|"opens dialog"| node_startdialog
node_home -->|"opens dialog"| node_stopdialog
node_home -->|"opens editor"| node_editdialog
node_home -->|"opens score"| node_scoreview
node_session -->|"gets daily total"| node_groups
node_session -->|"uses day boundaries"| node_time
node_groups -->|"gets day boundary"| node_time
node_timecircle -->|"groups sessions"| node_groups
node_timecircle -->|"gets session day"| node_time
node_home -->|"passes grouped data"| node_wearingscore
node_topbar -->|"reads preferences"| node_prefs
node_topbar -->|"computes streak"| node_groups
node_topbar -->|"gets session day"| node_time
node_topbar -->|"opens dialog"| node_settings
node_topbar -->|"opens assistant"| node_chat
node_startdialog -->|"gets start time"| node_time
node_stopdialog -->|"gets start time"| node_time
node_chat -.->|"may call"| node_assistantservice

click node_app "https://github.com/ebandev/thermotrack/blob/main/app.vue"
click node_home "https://github.com/ebandev/thermotrack/blob/main/pages/index.vue"
click node_info "https://github.com/ebandev/thermotrack/blob/main/pages/info.vue"
click node_results "https://github.com/ebandev/thermotrack/blob/main/pages/results.vue"
click node_progress "https://github.com/ebandev/thermotrack/blob/main/components/ProgressCircle.vue"
click node_timecircle "https://github.com/ebandev/thermotrack/blob/main/components/TimeCircle.vue"
click node_tabbar "https://github.com/ebandev/thermotrack/blob/main/components/TabBar.vue"
click node_topbar "https://github.com/ebandev/thermotrack/blob/main/components/TopBar.vue"
click node_session "https://github.com/ebandev/thermotrack/blob/main/composables/useSession.ts"
click node_groups "https://github.com/ebandev/thermotrack/blob/main/composables/useSessionGroups.ts"
click node_time "https://github.com/ebandev/thermotrack/blob/main/composables/useTime.ts"
click node_startdialog "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/StartSessionAt.vue"
click node_stopdialog "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/StopSessionAt.vue"
click node_editdialog "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/editSessions.vue"
click node_wearingscore "https://github.com/ebandev/thermotrack/blob/main/composables/useWearingScore.ts"
click node_scoreview "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/WearingScore.vue"
click node_analysisadd "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/addAnalysis.vue"
click node_analysisedit "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/editAnalysis.vue"
click node_prefs "https://github.com/ebandev/thermotrack/blob/main/stores/userPrefs.ts"
click node_settings "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/settings.vue"
click node_chat "https://github.com/ebandev/thermotrack/blob/main/components/dialogs/ChatAssistant.vue"
click node_notifications "https://github.com/ebandev/thermotrack/blob/main/components/PwaNotifications.vue"

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_home,node_info,node_progress,node_timecircle,node_tabbar,node_topbar,node_user toneBlue
class node_session,node_groups,node_time,node_startdialog,node_stopdialog,node_editdialog toneAmber
class node_results,node_wearingscore,node_scoreview,node_analysisadd,node_analysisedit toneMint
class node_prefs,node_settings,node_chat,node_notifications toneRose
class node_assistantservice toneIndigo
```

## Components

### App experience

- [Nuxt app shell](https://github.com/ebandev/thermotrack/blob/main/app.vue): `app.vue`
- [Tracking home](https://github.com/ebandev/thermotrack/blob/main/pages/index.vue): `pages/index.vue`
- [Info page](https://github.com/ebandev/thermotrack/blob/main/pages/info.vue): `pages/info.vue`
- [Progress circle](https://github.com/ebandev/thermotrack/blob/main/components/ProgressCircle.vue): `components/ProgressCircle.vue`
- [Time circle](https://github.com/ebandev/thermotrack/blob/main/components/TimeCircle.vue): `components/TimeCircle.vue`
- [Tab navigation](https://github.com/ebandev/thermotrack/blob/main/components/TabBar.vue): `components/TabBar.vue`
- [Top bar](https://github.com/ebandev/thermotrack/blob/main/components/TopBar.vue): `components/TopBar.vue`

### Session tracking

- [Session controls](https://github.com/ebandev/thermotrack/blob/main/composables/useSession.ts): `composables/useSession.ts`
- [Session grouping](https://github.com/ebandev/thermotrack/blob/main/composables/useSessionGroups.ts): `composables/useSessionGroups.ts`
- [Day boundaries](https://github.com/ebandev/thermotrack/blob/main/composables/useTime.ts): `composables/useTime.ts`
- [Start-time dialog](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/StartSessionAt.vue): `components/dialogs/StartSessionAt.vue`
- [Stop-time dialog](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/StopSessionAt.vue): `components/dialogs/StopSessionAt.vue`
- [Edit sessions](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/editSessions.vue): `components/dialogs/editSessions.vue`

### History and insights

- [Results page](https://github.com/ebandev/thermotrack/blob/main/pages/results.vue): `pages/results.vue`
- [Wearing score](https://github.com/ebandev/thermotrack/blob/main/composables/useWearingScore.ts): `composables/useWearingScore.ts`
- [Score dialog](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/WearingScore.vue): `components/dialogs/WearingScore.vue`
- [Add analysis](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/addAnalysis.vue): `components/dialogs/addAnalysis.vue`
- [Edit analysis](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/editAnalysis.vue): `components/dialogs/editAnalysis.vue`

### Preferences and support

- [User preferences](https://github.com/ebandev/thermotrack/blob/main/stores/userPrefs.ts): `stores/userPrefs.ts`
- [Settings dialog](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/settings.vue): `components/dialogs/settings.vue`
- [Chat assistant](https://github.com/ebandev/thermotrack/blob/main/components/dialogs/ChatAssistant.vue): `components/dialogs/ChatAssistant.vue`
- [PWA notifications](https://github.com/ebandev/thermotrack/blob/main/components/PwaNotifications.vue): `components/PwaNotifications.vue`

### Other components

- **User**
- **Assistant service**

## Connections

- User → Tracking home: uses (evidence: `README.md`)
- Nuxt app shell → Tracking home: renders page (evidence: `app.vue`)
- Tracking home → User preferences: reads preferences (evidence: `pages/index.vue`)
- Tracking home → Session controls: controls sessions (evidence: `pages/index.vue`)
- Tracking home → Session grouping: groups history (evidence: `pages/index.vue`)
- Tracking home → Wearing score: calculates score (evidence: `pages/index.vue`)
- Tracking home → Progress circle: renders progress (evidence: `pages/index.vue`)
- Tracking home → Time circle: renders timeline (evidence: `pages/index.vue`)
- Tracking home → Start-time dialog: opens dialog (evidence: `pages/index.vue`)
- Tracking home → Stop-time dialog: opens dialog (evidence: `pages/index.vue`)
- Tracking home → Edit sessions: opens editor (evidence: `pages/index.vue`)
- Tracking home → Score dialog: opens score (evidence: `pages/index.vue`)
- Session controls → Session grouping: gets daily total (evidence: `composables/useSession.ts`)
- Session controls → Day boundaries: uses day boundaries (evidence: `composables/useSession.ts`)
- Session grouping → Day boundaries: gets day boundary (evidence: `composables/useSessionGroups.ts`)
- Time circle → Session grouping: groups sessions (evidence: `components/TimeCircle.vue`)
- Time circle → Day boundaries: gets session day (evidence: `components/TimeCircle.vue`)
- Tracking home → Wearing score: passes grouped data (evidence: `pages/index.vue`)
- Top bar → User preferences: reads preferences (evidence: `components/TopBar.vue`)
- Top bar → Session grouping: computes streak (evidence: `components/TopBar.vue`)
- Top bar → Day boundaries: gets session day (evidence: `components/TopBar.vue`)
- Top bar → Settings dialog: opens dialog (evidence: `components/TopBar.vue`)
- Top bar → Chat assistant: opens assistant (evidence: `components/TopBar.vue`)
- Start-time dialog → Day boundaries: gets start time (evidence: `components/dialogs/StartSessionAt.vue`)
- Stop-time dialog → Day boundaries: gets start time (evidence: `components/dialogs/StopSessionAt.vue`)
- Chat assistant → Assistant service: may call
