# jeremyduncan/waypoint-health-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/jeremyduncan/waypoint-health-tracker
- Repository: https://github.com/jeremyduncan/waypoint-health-tracker

## Overview

Waypoint Health is a private, self-hosted health journal. The main workflow is a signed-in user recording weight, injections, or notes, then reviewing those records in charts, the calendar, and summaries. Separate branches cover goals, reports, settings, and data import/export. The map includes major README capabilities, but several controller and service implementations were not excerpted; their links are shown only where routes or documented behavior support them, or omitted where uncertain.

Main entry points: [`config/routes.rb`](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/config/routes.rb) (Application routes), [`app/controllers/entries_controller.rb`](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/entries_controller.rb) (Entry logging), [`app/controllers/imports_controller.rb`](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/imports_controller.rb) (Import workflow), [`app/controllers/dashboard_controller.rb`](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/dashboard_controller.rb) (Overview charts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and journal"]
  node_routes["Application routes<br/>[routes.rb]"]
  node_authentication["Authentication<br/>[authentication.rb]"]
  node_entries["Entry logging"]
  node_journal["Day journal"]
  node_preferences["Chart preferences"]
end

subgraph group_health["Health views"]
  node_dashboard["Overview charts"]
  node_calendar["Month calendar"]
  node_injectionview["Injection insights"]
  node_insightservice["Injection analysis"]
  node_review["Weekly review"]
  node_weeklyservice["Weekly summaries<br/>[weekly_review.rb]"]
  node_timeline["Timeline data<br/>[timeline.rb]"]
  node_weightplot["Weight plot<br/>[weight_plot.rb]"]
end

subgraph group_data["Records and goals"]
  node_goals["Weight goals"]
  node_goalprogress["Goal progress<br/>[goal_progress.rb]"]
  node_records["Health records<br/>[weight.rb]"]
  node_injections["Injection records<br/>[injection.rb]"]
  node_notes["Daily notes<br/>[day_note.rb]"]
  node_store[("SQLite database<br/>[schema.rb]")]
end

subgraph group_exchange["Data exchange"]
  node_imports["Import workflow"]
  node_personalimport["Personal import<br/>[personal_import.rb]"]
  node_renpho["Renpho CSV<br/>[renpho_csv.rb]"]
  node_settings["Settings and export"]
  node_report["Appointment report<br/>[appointment_pdf.rb]"]
end

subgraph group_browser["Browser interactions"]
  node_chartjs["Timeline chart UI"]
  node_injectionui["Injection chart UI"]
  node_saveui["Save interaction<br/>[save_controller.js]"]
end

node_user(("Signed-in user"))

node_user -->|"requests pages"| node_routes
node_routes -->|"routes entries"| node_entries
node_routes -->|"routes journal"| node_journal
node_routes -->|"routes root"| node_dashboard
node_routes -->|"routes calendar"| node_calendar
node_routes -->|"routes injections"| node_injectionview
node_routes -->|"routes review"| node_review
node_routes -->|"routes goals"| node_goals
node_routes -->|"routes imports"| node_imports
node_routes -->|"routes settings"| node_settings
node_routes -->|"routes preferences"| node_preferences
node_entries -->|"creates or edits"| node_records
node_entries -->|"creates or edits"| node_injections
node_entries -.->|"persists records"| node_store
node_records -.->|"stored in"| node_store
node_injections -.->|"stored in"| node_store
node_notes -.->|"stored in"| node_store
node_review -->|"builds review"| node_weeklyservice
node_weeklyservice -->|"builds periods"| node_timeline
node_weeklyservice -->|"builds plot"| node_weightplot
node_injectionview -.->|"prepares insights"| node_insightservice
node_dashboard -.->|"uses timeline data"| node_timeline
node_dashboard -.->|"plots weight"| node_weightplot
node_chartjs -.->|"renders overview"| node_dashboard
node_injectionui -.->|"renders insights"| node_injectionview
node_imports -->|"parses and commits"| node_personalimport
node_imports -->|"parses Renpho"| node_renpho
node_imports -.->|"imports readings"| node_records
node_settings -.->|"exports or clears"| node_records
node_report -.->|"provides PDF"| node_user
node_saveui -->|"submits form"| node_entries
node_user -.->|"reviews trends"| node_dashboard
node_user -.->|"reviews month"| node_calendar
node_user -.->|"compares shots"| node_injectionview
node_user -.->|"reviews week"| node_review
node_user -.->|"sets target"| node_goals
node_user -.->|"imports data"| node_imports
node_user -.->|"exports or clears"| node_settings

click node_routes "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/config/routes.rb"
click node_authentication "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/concerns/authentication.rb"
click node_entries "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/entries_controller.rb"
click node_journal "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/journal_controller.rb"
click node_dashboard "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/dashboard_controller.rb"
click node_calendar "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/calendars_controller.rb"
click node_injectionview "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/injections_controller.rb"
click node_insightservice "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/injection_insights.rb"
click node_review "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/reviews_controller.rb"
click node_weeklyservice "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/weekly_review.rb"
click node_timeline "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/timeline.rb"
click node_weightplot "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/weight_plot.rb"
click node_goals "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/goals_controller.rb"
click node_goalprogress "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/goal_progress.rb"
click node_records "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/weight.rb"
click node_injections "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/injection.rb"
click node_notes "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/day_note.rb"
click node_store "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/db/schema.rb"
click node_imports "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/imports_controller.rb"
click node_personalimport "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/personal_import.rb"
click node_renpho "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/renpho_csv.rb"
click node_settings "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/settings_controller.rb"
click node_report "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/appointment_pdf.rb"
click node_chartjs "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/timeline_controller.js"
click node_injectionui "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/injection_insights_controller.js"
click node_saveui "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/save_controller.js"
click node_preferences "https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/chart_preferences_controller.rb"

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_routes,node_authentication,node_entries,node_journal,node_preferences,node_user toneBlue
class node_dashboard,node_calendar,node_injectionview,node_insightservice,node_review,node_weeklyservice,node_timeline,node_weightplot toneAmber
class node_goals,node_goalprogress,node_records,node_injections,node_notes,node_store toneMint
class node_imports,node_personalimport,node_renpho,node_settings,node_report toneRose
class node_chartjs,node_injectionui,node_saveui toneIndigo
```

## Components

### Web and journal

- [Application routes](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/config/routes.rb): `config/routes.rb`
- [Authentication](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/concerns/authentication.rb): `app/controllers/concerns/authentication.rb`
- [Entry logging](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/entries_controller.rb): `app/controllers/entries_controller.rb`
- [Day journal](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/journal_controller.rb): `app/controllers/journal_controller.rb`
- [Chart preferences](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/chart_preferences_controller.rb): `app/controllers/chart_preferences_controller.rb`

### Health views

- [Overview charts](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/dashboard_controller.rb): `app/controllers/dashboard_controller.rb`
- [Month calendar](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/calendars_controller.rb): `app/controllers/calendars_controller.rb`
- [Injection insights](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/injections_controller.rb): `app/controllers/injections_controller.rb`
- [Injection analysis](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/injection_insights.rb): `app/services/injection_insights.rb`
- [Weekly review](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/reviews_controller.rb): `app/controllers/reviews_controller.rb`
- [Weekly summaries](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/weekly_review.rb): `app/services/weekly_review.rb`
- [Timeline data](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/timeline.rb): `app/services/timeline.rb`
- [Weight plot](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/weight_plot.rb): `app/services/weight_plot.rb`

### Records and goals

- [Weight goals](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/goals_controller.rb): `app/controllers/goals_controller.rb`
- [Goal progress](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/goal_progress.rb): `app/services/goal_progress.rb`
- [Health records](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/weight.rb): `app/models/weight.rb`
- [Injection records](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/injection.rb): `app/models/injection.rb`
- [Daily notes](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/models/day_note.rb): `app/models/day_note.rb`
- [SQLite database](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/db/schema.rb): `db/schema.rb`

### Data exchange

- [Import workflow](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/imports_controller.rb): `app/controllers/imports_controller.rb`
- [Personal import](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/personal_import.rb): `app/services/personal_import.rb`
- [Renpho CSV](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/renpho_csv.rb): `app/services/renpho_csv.rb`
- [Settings and export](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/controllers/settings_controller.rb): `app/controllers/settings_controller.rb`
- [Appointment report](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/services/appointment_pdf.rb): `app/services/appointment_pdf.rb`

### Browser interactions

- [Timeline chart UI](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/timeline_controller.js): `app/javascript/controllers/timeline_controller.js`
- [Injection chart UI](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/injection_insights_controller.js): `app/javascript/controllers/injection_insights_controller.js`
- [Save interaction](https://github.com/jeremyduncan/waypoint-health-tracker/blob/main/app/javascript/controllers/save_controller.js): `app/javascript/controllers/save_controller.js`

### Other components

- **Signed-in user**

## Connections

- Signed-in user → Application routes: requests pages (evidence: `config/routes.rb`)
- Application routes → Entry logging: routes entries (evidence: `config/routes.rb`)
- Application routes → Day journal: routes journal (evidence: `config/routes.rb`)
- Application routes → Overview charts: routes root (evidence: `config/routes.rb`)
- Application routes → Month calendar: routes calendar (evidence: `config/routes.rb`)
- Application routes → Injection insights: routes injections (evidence: `config/routes.rb`)
- Application routes → Weekly review: routes review (evidence: `config/routes.rb`)
- Application routes → Weight goals: routes goals (evidence: `config/routes.rb`)
- Application routes → Import workflow: routes imports (evidence: `config/routes.rb`)
- Application routes → Settings and export: routes settings (evidence: `config/routes.rb`)
- Application routes → Chart preferences: routes preferences (evidence: `config/routes.rb`)
- Entry logging → Health records: creates or edits (evidence: `app/controllers/entries_controller.rb`)
- Entry logging → Injection records: creates or edits (evidence: `app/controllers/entries_controller.rb`)
- Entry logging → SQLite database: persists records
- Health records → SQLite database: stored in
- Injection records → SQLite database: stored in
- Daily notes → SQLite database: stored in
- Weekly review → Weekly summaries: builds review (evidence: `app/controllers/reviews_controller.rb`)
- Weekly summaries → Timeline data: builds periods (evidence: `app/services/weekly_review.rb`)
- Weekly summaries → Weight plot: builds plot (evidence: `app/services/weekly_review.rb`)
- Injection insights → Injection analysis: prepares insights
- Overview charts → Timeline data: uses timeline data
- Overview charts → Weight plot: plots weight
- Timeline chart UI → Overview charts: renders overview
- Injection chart UI → Injection insights: renders insights
- Import workflow → Personal import: parses and commits (evidence: `app/controllers/imports_controller.rb`)
- Import workflow → Renpho CSV: parses Renpho (evidence: `app/controllers/imports_controller.rb`)
- Import workflow → Health records: imports readings
- Settings and export → Health records: exports or clears
- Appointment report → Signed-in user: provides PDF
- Save interaction → Entry logging: submits form (evidence: `app/javascript/controllers/save_controller.js`)
- Signed-in user → Overview charts: reviews trends
- Signed-in user → Month calendar: reviews month
- Signed-in user → Injection insights: compares shots
- Signed-in user → Weekly review: reviews week
- Signed-in user → Weight goals: sets target
- Signed-in user → Import workflow: imports data
- Signed-in user → Settings and export: exports or clears
