# nixhantb/grind-well architecture

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

- Interactive diagram: https://gitdiagram.com/nixhantb/grind-well
- Repository: https://github.com/nixhantb/grind-well

## Overview

GrindWell is a local-first trainer for learning algorithm implementations through spaced repetition. Learners browse a fixed pattern/problem curriculum, practice typing solutions from memory, log the quality of each attempt, and return when the scheduler says a repetition is due. Separate screens present protocol guidance and retention data, while progress and accepted solutions persist locally and can be exported or imported. The graph reflects documented capabilities and indexed imports; source excerpts were partial, so uncertain implementation links are omitted.

Main entry points: [`src/router/index.ts`](https://github.com/nixhantb/grind-well/blob/main/src/router/index.ts) (Screen routing), [`src/stores/progress.ts`](https://github.com/nixhantb/grind-well/blob/main/src/stores/progress.ts) (Progress store), [`src/views/DataView.vue`](https://github.com/nixhantb/grind-well/blob/main/src/views/DataView.vue) (Data management), [`src/views/TrainerView.vue`](https://github.com/nixhantb/grind-well/blob/main/src/views/TrainerView.vue) (Trainer screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learning experience"]
  node_shell["App shell<br/>[App.vue]"]
  node_router["Screen routing<br/>[index.ts]"]
  node_dashboard["Dashboard<br/>[DashboardView.vue]"]
end

subgraph group_curriculum["Curriculum and protocols"]
  node_patterns["Pattern browser<br/>[PatternsView.vue]"]
  node_pattern_detail["Pattern detail"]
  node_problem_detail["Problem detail"]
  node_catalog["Curriculum content<br/>[index.ts]"]
  node_protocols["Practice protocols<br/>[ProtocolsView.vue]"]
  node_protocol_content["Protocol content<br/>[protocols.ts]"]
end

subgraph group_practice["Practice and scheduling"]
  node_queue["Due queue<br/>[QueueView.vue]"]
  node_trainer_route["Trainer screen<br/>[TrainerView.vue]"]
  node_trainer["Typing and rep flow<br/>[MotorTrainer.vue]"]
  node_editor["Code editor<br/>[CodeEditor.vue]"]
  node_scheduler["Rep scheduler<br/>[scheduler.ts]"]
  node_date["Date utilities<br/>[date.ts]"]
end

subgraph group_data["Progress and data"]
  node_progress["Progress store<br/>[progress.ts]"]
  node_storage[("Local persistence<br/>[storage.ts]")]
  node_data_view["Data management<br/>[DataView.vue]"]
  node_backup["Backup store<br/>[backup.ts]"]
  node_export_import["JSON backup<br/>[exportImport.ts]"]
  node_stuck_lines["Stuck-line tracking<br/>[stuckLines.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_shell
node_shell -->|"renders routes"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_patterns
node_router -->|"routes to"| node_pattern_detail
node_router -->|"routes to"| node_problem_detail
node_router -->|"routes to"| node_trainer_route
node_router -->|"routes to"| node_queue
node_router -->|"routes to"| node_protocols
node_router -->|"routes to"| node_data_view
node_dashboard -->|"reads progress"| node_progress
node_dashboard -->|"computes streaks"| node_scheduler
node_patterns -->|"reads curriculum"| node_catalog
node_patterns -->|"reads completion"| node_progress
node_pattern_detail -->|"reads curriculum"| node_catalog
node_problem_detail -->|"reads curriculum"| node_catalog
node_problem_detail -->|"uses progress"| node_progress
node_protocols -->|"renders guidance"| node_protocol_content
node_trainer_route -->|"loads problem"| node_catalog
node_trainer_route -->|"logs reps"| node_progress
node_trainer_route -->|"uses schedule"| node_scheduler
node_trainer_route -->|"renders trainer"| node_trainer
node_trainer -->|"accepts typing"| node_editor
node_progress -->|"computes due dates"| node_scheduler
node_progress -->|"gets current date"| node_date
node_progress -->|"reads and writes"| node_storage
node_data_view -->|"manages progress"| node_progress
node_data_view -->|"uses backup state"| node_backup
node_data_view -->|"exports and imports"| node_export_import
node_data_view -->|"reads stuck lines"| node_stuck_lines
node_data_view -.->|"manages local data"| node_storage

click node_shell "https://github.com/nixhantb/grind-well/blob/main/src/App.vue"
click node_router "https://github.com/nixhantb/grind-well/blob/main/src/router/index.ts"
click node_dashboard "https://github.com/nixhantb/grind-well/blob/main/src/views/DashboardView.vue"
click node_patterns "https://github.com/nixhantb/grind-well/blob/main/src/views/PatternsView.vue"
click node_pattern_detail "https://github.com/nixhantb/grind-well/blob/main/src/views/PatternDetailView.vue"
click node_problem_detail "https://github.com/nixhantb/grind-well/blob/main/src/views/ProblemDetailView.vue"
click node_catalog "https://github.com/nixhantb/grind-well/blob/main/src/content/index.ts"
click node_protocols "https://github.com/nixhantb/grind-well/blob/main/src/views/ProtocolsView.vue"
click node_protocol_content "https://github.com/nixhantb/grind-well/blob/main/src/content/protocols.ts"
click node_queue "https://github.com/nixhantb/grind-well/blob/main/src/views/QueueView.vue"
click node_trainer_route "https://github.com/nixhantb/grind-well/blob/main/src/views/TrainerView.vue"
click node_trainer "https://github.com/nixhantb/grind-well/blob/main/src/components/MotorTrainer.vue"
click node_editor "https://github.com/nixhantb/grind-well/blob/main/src/components/CodeEditor.vue"
click node_progress "https://github.com/nixhantb/grind-well/blob/main/src/stores/progress.ts"
click node_scheduler "https://github.com/nixhantb/grind-well/blob/main/src/lib/scheduler.ts"
click node_date "https://github.com/nixhantb/grind-well/blob/main/src/lib/date.ts"
click node_storage "https://github.com/nixhantb/grind-well/blob/main/src/lib/storage.ts"
click node_data_view "https://github.com/nixhantb/grind-well/blob/main/src/views/DataView.vue"
click node_backup "https://github.com/nixhantb/grind-well/blob/main/src/stores/backup.ts"
click node_export_import "https://github.com/nixhantb/grind-well/blob/main/src/lib/exportImport.ts"
click node_stuck_lines "https://github.com/nixhantb/grind-well/blob/main/src/lib/stuckLines.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_shell,node_router,node_dashboard toneBlue
class node_patterns,node_pattern_detail,node_problem_detail,node_catalog,node_protocols,node_protocol_content toneAmber
class node_queue,node_trainer_route,node_trainer,node_editor,node_scheduler,node_date toneMint
class node_progress,node_storage,node_data_view,node_backup,node_export_import,node_stuck_lines toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [App shell](https://github.com/nixhantb/grind-well/blob/main/src/App.vue): `src/App.vue`
- [Screen routing](https://github.com/nixhantb/grind-well/blob/main/src/router/index.ts): `src/router/index.ts`
- [Dashboard](https://github.com/nixhantb/grind-well/blob/main/src/views/DashboardView.vue): `src/views/DashboardView.vue`

### Curriculum and protocols

- [Pattern browser](https://github.com/nixhantb/grind-well/blob/main/src/views/PatternsView.vue): `src/views/PatternsView.vue`
- [Pattern detail](https://github.com/nixhantb/grind-well/blob/main/src/views/PatternDetailView.vue): `src/views/PatternDetailView.vue`
- [Problem detail](https://github.com/nixhantb/grind-well/blob/main/src/views/ProblemDetailView.vue): `src/views/ProblemDetailView.vue`
- [Curriculum content](https://github.com/nixhantb/grind-well/blob/main/src/content/index.ts): `src/content/index.ts`
- [Practice protocols](https://github.com/nixhantb/grind-well/blob/main/src/views/ProtocolsView.vue): `src/views/ProtocolsView.vue`
- [Protocol content](https://github.com/nixhantb/grind-well/blob/main/src/content/protocols.ts): `src/content/protocols.ts`

### Practice and scheduling

- [Due queue](https://github.com/nixhantb/grind-well/blob/main/src/views/QueueView.vue): `src/views/QueueView.vue`
- [Trainer screen](https://github.com/nixhantb/grind-well/blob/main/src/views/TrainerView.vue): `src/views/TrainerView.vue`
- [Typing and rep flow](https://github.com/nixhantb/grind-well/blob/main/src/components/MotorTrainer.vue): `src/components/MotorTrainer.vue`
- [Code editor](https://github.com/nixhantb/grind-well/blob/main/src/components/CodeEditor.vue): `src/components/CodeEditor.vue`
- [Rep scheduler](https://github.com/nixhantb/grind-well/blob/main/src/lib/scheduler.ts): `src/lib/scheduler.ts`
- [Date utilities](https://github.com/nixhantb/grind-well/blob/main/src/lib/date.ts): `src/lib/date.ts`

### Progress and data

- [Progress store](https://github.com/nixhantb/grind-well/blob/main/src/stores/progress.ts): `src/stores/progress.ts`
- [Local persistence](https://github.com/nixhantb/grind-well/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Data management](https://github.com/nixhantb/grind-well/blob/main/src/views/DataView.vue): `src/views/DataView.vue`
- [Backup store](https://github.com/nixhantb/grind-well/blob/main/src/stores/backup.ts): `src/stores/backup.ts`
- [JSON backup](https://github.com/nixhantb/grind-well/blob/main/src/lib/exportImport.ts): `src/lib/exportImport.ts`
- [Stuck-line tracking](https://github.com/nixhantb/grind-well/blob/main/src/lib/stuckLines.ts): `src/lib/stuckLines.ts`

### Other components

- **Learner**

## Connections

- Learner → App shell: uses (evidence: `README.md`)
- App shell → Screen routing: renders routes (evidence: `src/App.vue`)
- Screen routing → Dashboard: routes to (evidence: `src/router/index.ts`)
- Screen routing → Pattern browser: routes to (evidence: `src/router/index.ts`)
- Screen routing → Pattern detail: routes to (evidence: `src/router/index.ts`)
- Screen routing → Problem detail: routes to (evidence: `src/router/index.ts`)
- Screen routing → Trainer screen: routes to (evidence: `src/router/index.ts`)
- Screen routing → Due queue: routes to (evidence: `src/router/index.ts`)
- Screen routing → Practice protocols: routes to (evidence: `src/router/index.ts`)
- Screen routing → Data management: routes to (evidence: `src/router/index.ts`)
- Dashboard → Progress store: reads progress (evidence: `src/views/DashboardView.vue`)
- Dashboard → Rep scheduler: computes streaks (evidence: `src/views/DashboardView.vue`)
- Pattern browser → Curriculum content: reads curriculum (evidence: `src/views/PatternsView.vue`)
- Pattern browser → Progress store: reads completion (evidence: `src/views/PatternsView.vue`)
- Pattern detail → Curriculum content: reads curriculum (evidence: `src/views/PatternDetailView.vue`)
- Problem detail → Curriculum content: reads curriculum (evidence: `src/views/ProblemDetailView.vue`)
- Problem detail → Progress store: uses progress (evidence: `src/views/ProblemDetailView.vue`)
- Practice protocols → Protocol content: renders guidance (evidence: `src/views/ProtocolsView.vue`)
- Trainer screen → Curriculum content: loads problem (evidence: `src/views/TrainerView.vue`)
- Trainer screen → Progress store: logs reps (evidence: `src/views/TrainerView.vue`)
- Trainer screen → Rep scheduler: uses schedule (evidence: `src/views/TrainerView.vue`)
- Trainer screen → Typing and rep flow: renders trainer (evidence: `src/views/TrainerView.vue`)
- Typing and rep flow → Code editor: accepts typing (evidence: `src/components/MotorTrainer.vue`)
- Progress store → Rep scheduler: computes due dates (evidence: `src/stores/progress.ts`)
- Progress store → Date utilities: gets current date (evidence: `src/stores/progress.ts`)
- Progress store → Local persistence: reads and writes (evidence: `src/stores/progress.ts`)
- Data management → Progress store: manages progress (evidence: `src/views/DataView.vue`)
- Data management → Backup store: uses backup state (evidence: `src/views/DataView.vue`)
- Data management → JSON backup: exports and imports (evidence: `src/views/DataView.vue`)
- Data management → Stuck-line tracking: reads stuck lines (evidence: `src/views/DataView.vue`)
- Data management → Local persistence: manages local data
