# sparky1911/vocap architecture

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

- Interactive diagram: https://gitdiagram.com/sparky1911/vocap
- Repository: https://github.com/sparky1911/vocap

## Overview

Essence is an offline-first GRE vocabulary trainer organized around three drills: polarity snap, bucket sort, and odd one out. Learners choose a drill on Home; App creates a spaced-repetition queue, Drill builds and grades questions, and progress is saved locally before the learner reviews a session summary or browses the zone library. The graph reflects explicit imports and calls in the excerpts and README; styling primitives and the word-list data are included as supporting layers, while deployment machinery is excluded.

Main entry points: [`src/App.jsx`](https://github.com/sparky1911/vocap/blob/main/src/App.jsx) (App state and routing), [`src/views/Home.jsx`](https://github.com/sparky1911/vocap/blob/main/src/views/Home.jsx) (Home and mode selection), [`src/views/Drill.jsx`](https://github.com/sparky1911/vocap/blob/main/src/views/Drill.jsx) (Drill session), [`src/views/Library.jsx`](https://github.com/sparky1911/vocap/blob/main/src/views/Library.jsx) (Zone library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Study experience"]
  node_app["App state and routing<br/>[App.jsx]"]
  node_home["Home and mode selection<br/>[Home.jsx]"]
  node_drill["Drill session<br/>[Drill.jsx]"]
  node_summary["Session summary<br/>[Summary.jsx]"]
  node_library["Zone library<br/>[Library.jsx]"]
end

subgraph group_learning["Learning engine"]
  node_modes["Drill configuration<br/>[modes.js]"]
  node_scheduler["Queue and grading<br/>[engine.js]"]
  node_storage[("Progress persistence<br/>[storage.js]")]
end

subgraph group_content["Vocabulary content"]
  node_worddata["Word parsing and zones<br/>[data.js]"]
  node_wordlist["Built-in vocabulary<br/>[words.txt]"]
end

subgraph group_presentation["Presentation"]
  node_ui["Shared UI primitives<br/>[ui.jsx]"]
  node_tokens["Design tokens<br/>[tokens.css]"]
  node_styles["Component styles<br/>[components.css]"]
end

node_learner(("Learner"))

node_learner -->|"chooses drill"| node_home
node_learner -->|"answers questions"| node_drill
node_app -->|"renders"| node_home
node_app -->|"renders"| node_drill
node_app -->|"renders"| node_summary
node_app -->|"renders"| node_library
node_home -->|"starts and navigates"| node_app
node_app -->|"reads configuration"| node_modes
node_app -->|"builds queue"| node_scheduler
node_app -->|"uses words and zones"| node_worddata
node_worddata -.->|"parses"| node_wordlist
node_app -->|"loads and saves progress"| node_storage
node_drill -->|"builds options and grades"| node_scheduler
node_drill -->|"reads drill settings"| node_modes
node_drill -->|"reports answers and completion"| node_app
node_summary -->|"requests another round or home"| node_app
node_library -->|"reads review cards"| node_scheduler
node_library -->|"returns home"| node_app
node_home -->|"checks storage availability"| node_storage
node_home -->|"lists drill modes"| node_modes
node_drill -->|"composes controls"| node_ui
node_home -->|"composes controls"| node_ui
node_summary -->|"composes controls"| node_ui
node_library -->|"composes controls"| node_ui
node_tokens -.->|"supplies design values"| node_styles

click node_app "https://github.com/sparky1911/vocap/blob/main/src/App.jsx"
click node_home "https://github.com/sparky1911/vocap/blob/main/src/views/Home.jsx"
click node_drill "https://github.com/sparky1911/vocap/blob/main/src/views/Drill.jsx"
click node_summary "https://github.com/sparky1911/vocap/blob/main/src/views/Summary.jsx"
click node_library "https://github.com/sparky1911/vocap/blob/main/src/views/Library.jsx"
click node_modes "https://github.com/sparky1911/vocap/blob/main/src/modes.js"
click node_scheduler "https://github.com/sparky1911/vocap/blob/main/src/engine.js"
click node_storage "https://github.com/sparky1911/vocap/blob/main/src/storage.js"
click node_worddata "https://github.com/sparky1911/vocap/blob/main/src/data.js"
click node_wordlist "https://github.com/sparky1911/vocap/blob/main/src/words.txt"
click node_ui "https://github.com/sparky1911/vocap/blob/main/src/design/ui.jsx"
click node_tokens "https://github.com/sparky1911/vocap/blob/main/src/design/tokens.css"
click node_styles "https://github.com/sparky1911/vocap/blob/main/src/design/components.css"

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_drill,node_summary,node_library toneBlue
class node_modes,node_scheduler,node_storage toneAmber
class node_worddata,node_wordlist toneMint
class node_ui,node_tokens,node_styles toneRose
class node_learner toneIndigo
```

## Components

### Study experience

- [App state and routing](https://github.com/sparky1911/vocap/blob/main/src/App.jsx): `src/App.jsx`
- [Home and mode selection](https://github.com/sparky1911/vocap/blob/main/src/views/Home.jsx): `src/views/Home.jsx`
- [Drill session](https://github.com/sparky1911/vocap/blob/main/src/views/Drill.jsx): `src/views/Drill.jsx`
- [Session summary](https://github.com/sparky1911/vocap/blob/main/src/views/Summary.jsx): `src/views/Summary.jsx`
- [Zone library](https://github.com/sparky1911/vocap/blob/main/src/views/Library.jsx): `src/views/Library.jsx`

### Learning engine

- [Drill configuration](https://github.com/sparky1911/vocap/blob/main/src/modes.js): `src/modes.js`
- [Queue and grading](https://github.com/sparky1911/vocap/blob/main/src/engine.js): `src/engine.js`
- [Progress persistence](https://github.com/sparky1911/vocap/blob/main/src/storage.js): `src/storage.js`

### Vocabulary content

- [Word parsing and zones](https://github.com/sparky1911/vocap/blob/main/src/data.js): `src/data.js`
- [Built-in vocabulary](https://github.com/sparky1911/vocap/blob/main/src/words.txt): `src/words.txt`

### Presentation

- [Shared UI primitives](https://github.com/sparky1911/vocap/blob/main/src/design/ui.jsx): `src/design/ui.jsx`
- [Design tokens](https://github.com/sparky1911/vocap/blob/main/src/design/tokens.css): `src/design/tokens.css`
- [Component styles](https://github.com/sparky1911/vocap/blob/main/src/design/components.css): `src/design/components.css`

### Other components

- **Learner**

## Connections

- Learner → Home and mode selection: chooses drill (evidence: `src/views/Home.jsx`)
- Learner → Drill session: answers questions (evidence: `src/views/Drill.jsx`)
- App state and routing → Home and mode selection: renders (evidence: `src/App.jsx`)
- App state and routing → Drill session: renders (evidence: `src/App.jsx`)
- App state and routing → Session summary: renders (evidence: `src/App.jsx`)
- App state and routing → Zone library: renders (evidence: `src/App.jsx`)
- Home and mode selection → App state and routing: starts and navigates (evidence: `src/App.jsx`)
- App state and routing → Drill configuration: reads configuration (evidence: `src/App.jsx`)
- App state and routing → Queue and grading: builds queue (evidence: `src/App.jsx`)
- App state and routing → Word parsing and zones: uses words and zones (evidence: `src/App.jsx`)
- Word parsing and zones → Built-in vocabulary: parses
- App state and routing → Progress persistence: loads and saves progress (evidence: `src/App.jsx`)
- Drill session → Queue and grading: builds options and grades (evidence: `src/views/Drill.jsx`)
- Drill session → Drill configuration: reads drill settings (evidence: `src/views/Drill.jsx`)
- Drill session → App state and routing: reports answers and completion (evidence: `src/App.jsx`)
- Session summary → App state and routing: requests another round or home (evidence: `src/App.jsx`)
- Zone library → Queue and grading: reads review cards (evidence: `src/views/Library.jsx`)
- Zone library → App state and routing: returns home (evidence: `src/App.jsx`)
- Home and mode selection → Progress persistence: checks storage availability (evidence: `src/views/Home.jsx`)
- Home and mode selection → Drill configuration: lists drill modes (evidence: `src/views/Home.jsx`)
- Drill session → Shared UI primitives: composes controls (evidence: `src/views/Drill.jsx`)
- Home and mode selection → Shared UI primitives: composes controls (evidence: `src/views/Home.jsx`)
- Session summary → Shared UI primitives: composes controls (evidence: `src/views/Summary.jsx`)
- Zone library → Shared UI primitives: composes controls (evidence: `src/views/Library.jsx`)
- Design tokens → Component styles: supplies design values
