# da-boss-is-here/lexforge architecture

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

- Interactive diagram: https://gitdiagram.com/da-boss-is-here/lexforge
- Repository: https://github.com/da-boss-is-here/lexforge

## Overview

LexForge is a browser-only vocabulary trainer. Its main user journey is teach words, retrieve and produce them in practice, self-check and diagnose mistakes, then schedule reviews and apply vocabulary in writing. The README also documents analytics, timed exams, bulk import, and local backup. The tree exposes the single-page app as index.html; its internals were not sampled, so those capabilities are represented at that file without guessing internal callers. The scheduler wrapper and due queue are sampled; their links to the unsampled app are documented only where supported.

Main entry points: [`index.html`](https://github.com/da-boss-is-here/lexforge/blob/main/index.html) (LexForge app), [`lib/fsrs-scheduler.js`](https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs-scheduler.js) (FSRS wrapper), [`lib/due-queue.js`](https://github.com/da-boss-is-here/lexforge/blob/main/lib/due-queue.js) (Due-item queue), [`lib/fsrs.umd.js`](https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs.umd.js) (FSRS engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Learning workflow"]
  node_app["LexForge app<br/>[index.html]"]
  node_teach["Word teaching<br/>[index.html]"]
  node_practiceflow["Practice session<br/>[index.html]"]
  node_diagnosis["Mistake diagnosis<br/>[index.html]"]
end

subgraph group_schedule["Review scheduling"]
  node_queue["Due-item queue<br/>[due-queue.js]"]
  node_scheduler["FSRS wrapper<br/>[fsrs-scheduler.js]"]
  node_fsrs["FSRS engine<br/>[fsrs.umd.js]"]
  node_legacy["Legacy ladder<br/>[index.html]"]
end

subgraph group_insights["Application and insights"]
  node_audit["Writing Audit<br/>[index.html]"]
  node_timed["Timed Exam<br/>[index.html]"]
  node_analytics["Analytics<br/>[index.html]"]
  node_charts["Chart.js<br/>[chart.umd.js]"]
end

subgraph group_local["Local data"]
  node_storage[("Browser storage<br/>[index.html]")]
  node_backup["Import and export<br/>[index.html]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"teaches"| node_teach
node_app -->|"starts practice"| node_practiceflow
node_practiceflow -->|"diagnoses errors"| node_diagnosis
node_practiceflow -.->|"selects due items"| node_queue
node_practiceflow -.->|"grades cards"| node_scheduler
node_scheduler -->|"delegates scheduling"| node_fsrs
node_queue -.->|"returns due items"| node_practiceflow
node_practiceflow -.->|"uses ladder"| node_legacy
node_diagnosis -.->|"informs reviews"| node_scheduler
node_app -->|"offers audit"| node_audit
node_app -->|"offers exam"| node_timed
node_audit -.->|"feeds matched errors"| node_scheduler
node_app -->|"shows progress"| node_analytics
node_analytics -.->|"visualizes metrics"| node_charts
node_app -->|"persists locally"| node_storage
node_app -->|"supports backup"| node_backup
node_backup -.->|"imports or exports"| node_storage

click node_app "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_teach "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_practiceflow "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_diagnosis "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_audit "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_timed "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_analytics "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_storage "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_backup "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_queue "https://github.com/da-boss-is-here/lexforge/blob/main/lib/due-queue.js"
click node_scheduler "https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs-scheduler.js"
click node_fsrs "https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs.umd.js"
click node_legacy "https://github.com/da-boss-is-here/lexforge/blob/main/index.html"
click node_charts "https://github.com/da-boss-is-here/lexforge/blob/main/lib/chart.umd.js"

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_teach,node_practiceflow,node_diagnosis toneBlue
class node_queue,node_scheduler,node_fsrs,node_legacy toneAmber
class node_audit,node_timed,node_analytics,node_charts toneMint
class node_storage,node_backup toneRose
class node_learner toneIndigo
```

## Components

### Learning workflow

- [LexForge app](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Word teaching](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Practice session](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Mistake diagnosis](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`

### Review scheduling

- [Due-item queue](https://github.com/da-boss-is-here/lexforge/blob/main/lib/due-queue.js): `lib/due-queue.js`
- [FSRS wrapper](https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs-scheduler.js): `lib/fsrs-scheduler.js`
- [FSRS engine](https://github.com/da-boss-is-here/lexforge/blob/main/lib/fsrs.umd.js): `lib/fsrs.umd.js`
- [Legacy ladder](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`

### Application and insights

- [Writing Audit](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Timed Exam](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Analytics](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Chart.js](https://github.com/da-boss-is-here/lexforge/blob/main/lib/chart.umd.js): `lib/chart.umd.js`

### Local data

- [Browser storage](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`
- [Import and export](https://github.com/da-boss-is-here/lexforge/blob/main/index.html): `index.html`

### Other components

- **Learner**

## Connections

- Learner → LexForge app: uses (evidence: `README.md`)
- LexForge app → Word teaching: teaches (evidence: `README.md`)
- LexForge app → Practice session: starts practice (evidence: `README.md`)
- Practice session → Mistake diagnosis: diagnoses errors (evidence: `README.md`)
- Practice session → Due-item queue: selects due items
- Practice session → FSRS wrapper: grades cards
- FSRS wrapper → FSRS engine: delegates scheduling (evidence: `lib/fsrs-scheduler.js`)
- Due-item queue → Practice session: returns due items
- Practice session → Legacy ladder: uses ladder
- Mistake diagnosis → FSRS wrapper: informs reviews
- LexForge app → Writing Audit: offers audit (evidence: `README.md`)
- LexForge app → Timed Exam: offers exam (evidence: `README.md`)
- Writing Audit → FSRS wrapper: feeds matched errors
- LexForge app → Analytics: shows progress (evidence: `README.md`)
- Analytics → Chart.js: visualizes metrics
- LexForge app → Browser storage: persists locally (evidence: `README.md`)
- LexForge app → Import and export: supports backup (evidence: `README.md`)
- Import and export → Browser storage: imports or exports
