# nikhill969/learning-checklist architecture

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

- Interactive diagram: https://gitdiagram.com/nikhill969/learning-checklist
- Repository: https://github.com/nikhill969/learning-checklist

## Overview

AI-Managed Learning Checklist is a local-first study app: users maintain a persistent topic tree and study context, request AI-generated updates or a time-bounded daily plan, then review proposals before applying changes. The browser UI calls an Express API; the server coordinates checklist operations, planning, settings, and JSON persistence, with an optional OpenAI-compatible provider. The graph includes documented capabilities even where their implementation was not sampled; dashed edges mark relationships not directly established by the excerpts or README.

Main entry points: [`src/App.tsx`](https://github.com/nikhill969/learning-checklist/blob/main/src/App.tsx) (Workspace shell), [`server/app.ts`](https://github.com/nikhill969/learning-checklist/blob/main/server/app.ts) (REST endpoints), [`server/ai.ts`](https://github.com/nikhill969/learning-checklist/blob/main/server/ai.ts) (AI provider client), [`server/store.ts`](https://github.com/nikhill969/learning-checklist/blob/main/server/store.ts) (Checklist operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Study workspace"]
  node_app["Workspace shell<br/>[App.tsx]"]
  node_checklist["Topic checklist<br/>[Checklist.tsx]"]
  node_context_ui["Study context editor<br/>[ContextEditor.tsx]"]
  node_planner_ui["Planner review<br/>[PlannerPanel.tsx]"]
  node_settings_ui["Provider settings"]
  node_browser_api["HTTP client<br/>[api.ts]"]
end

subgraph group_api["Application API"]
  node_routes["REST endpoints<br/>[app.ts]"]
  node_task_ops["Checklist operations<br/>[store.ts]"]
  node_id_helper["Task ID generation<br/>[ids.ts]"]
end

subgraph group_planning["Planning and review"]
  node_operation_validator["Proposal validation<br/>[operations.ts]"]
  node_planner["AI plan parsing<br/>[planner.ts]"]
  node_provider["AI provider client<br/>[ai.ts]"]
end

subgraph group_persistence["Local persistence"]
  node_state_file[("Checklist JSON")]
  node_settings_store[("Provider settings<br/>[settings.ts]")]
end

subgraph group_security["API safeguards"]
  node_rate_limiter["Request limiter<br/>[rate-limit.ts]"]
end

node_learner(("Learner"))
node_provider_service{{"AI-compatible endpoint"}}

node_learner -->|"uses"| node_app
node_app -->|"renders"| node_checklist
node_app -->|"renders"| node_context_ui
node_app -->|"renders"| node_planner_ui
node_app -->|"renders"| node_settings_ui
node_app -->|"calls"| node_browser_api
node_checklist -->|"sends edits"| node_app
node_context_ui -->|"sends context"| node_app
node_planner_ui -.->|"requests plans"| node_app
node_settings_ui -->|"updates settings"| node_browser_api
node_browser_api -->|"HTTP requests"| node_routes
node_routes -->|"reads and writes"| node_task_ops
node_routes -->|"validates proposals"| node_operation_validator
node_routes -->|"builds plans"| node_planner
node_planner -->|"requests completion"| node_provider
node_provider -->|"sends prompt"| node_provider_service
node_routes -.->|"requests completion"| node_provider
node_task_ops -->|"persists state"| node_state_file
node_routes -.->|"updates settings"| node_settings_store
node_provider -.->|"loads configuration"| node_settings_store
node_task_ops -->|"generates IDs"| node_id_helper
node_routes -->|"limits requests"| node_rate_limiter

click node_app "https://github.com/nikhill969/learning-checklist/blob/main/src/App.tsx"
click node_checklist "https://github.com/nikhill969/learning-checklist/blob/main/src/components/Checklist.tsx"
click node_context_ui "https://github.com/nikhill969/learning-checklist/blob/main/src/components/ContextEditor.tsx"
click node_planner_ui "https://github.com/nikhill969/learning-checklist/blob/main/src/components/PlannerPanel.tsx"
click node_settings_ui "https://github.com/nikhill969/learning-checklist/blob/main/src/components/ApiSettingsPanel.tsx"
click node_browser_api "https://github.com/nikhill969/learning-checklist/blob/main/src/api.ts"
click node_routes "https://github.com/nikhill969/learning-checklist/blob/main/server/app.ts"
click node_task_ops "https://github.com/nikhill969/learning-checklist/blob/main/server/store.ts"
click node_operation_validator "https://github.com/nikhill969/learning-checklist/blob/main/server/operations.ts"
click node_planner "https://github.com/nikhill969/learning-checklist/blob/main/server/planner.ts"
click node_provider "https://github.com/nikhill969/learning-checklist/blob/main/server/ai.ts"
click node_settings_store "https://github.com/nikhill969/learning-checklist/blob/main/server/settings.ts"
click node_id_helper "https://github.com/nikhill969/learning-checklist/blob/main/server/ids.ts"
click node_rate_limiter "https://github.com/nikhill969/learning-checklist/blob/main/server/rate-limit.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_app,node_checklist,node_context_ui,node_planner_ui,node_settings_ui,node_browser_api toneBlue
class node_routes,node_task_ops,node_id_helper toneAmber
class node_operation_validator,node_planner,node_provider toneMint
class node_state_file,node_settings_store toneRose
class node_rate_limiter,node_learner,node_provider_service toneIndigo
```

## Components

### Study workspace

- [Workspace shell](https://github.com/nikhill969/learning-checklist/blob/main/src/App.tsx): `src/App.tsx`
- [Topic checklist](https://github.com/nikhill969/learning-checklist/blob/main/src/components/Checklist.tsx): `src/components/Checklist.tsx`
- [Study context editor](https://github.com/nikhill969/learning-checklist/blob/main/src/components/ContextEditor.tsx): `src/components/ContextEditor.tsx`
- [Planner review](https://github.com/nikhill969/learning-checklist/blob/main/src/components/PlannerPanel.tsx): `src/components/PlannerPanel.tsx`
- [Provider settings](https://github.com/nikhill969/learning-checklist/blob/main/src/components/ApiSettingsPanel.tsx): `src/components/ApiSettingsPanel.tsx`
- [HTTP client](https://github.com/nikhill969/learning-checklist/blob/main/src/api.ts): `src/api.ts`

### Application API

- [REST endpoints](https://github.com/nikhill969/learning-checklist/blob/main/server/app.ts): `server/app.ts`
- [Checklist operations](https://github.com/nikhill969/learning-checklist/blob/main/server/store.ts): `server/store.ts`
- [Task ID generation](https://github.com/nikhill969/learning-checklist/blob/main/server/ids.ts): `server/ids.ts`

### Planning and review

- [Proposal validation](https://github.com/nikhill969/learning-checklist/blob/main/server/operations.ts): `server/operations.ts`
- [AI plan parsing](https://github.com/nikhill969/learning-checklist/blob/main/server/planner.ts): `server/planner.ts`
- [AI provider client](https://github.com/nikhill969/learning-checklist/blob/main/server/ai.ts): `server/ai.ts`

### Local persistence

- **Checklist JSON**
- [Provider settings](https://github.com/nikhill969/learning-checklist/blob/main/server/settings.ts): `server/settings.ts`

### API safeguards

- [Request limiter](https://github.com/nikhill969/learning-checklist/blob/main/server/rate-limit.ts): `server/rate-limit.ts`

### Other components

- **Learner**
- **AI-compatible endpoint**

## Connections

- Learner → Workspace shell: uses (evidence: `README.md`)
- Workspace shell → Topic checklist: renders (evidence: `src/App.tsx`)
- Workspace shell → Study context editor: renders (evidence: `src/App.tsx`)
- Workspace shell → Planner review: renders (evidence: `src/App.tsx`)
- Workspace shell → Provider settings: renders (evidence: `src/App.tsx`)
- Workspace shell → HTTP client: calls (evidence: `src/App.tsx`)
- Topic checklist → Workspace shell: sends edits (evidence: `src/App.tsx`)
- Study context editor → Workspace shell: sends context (evidence: `src/App.tsx`)
- Planner review → Workspace shell: requests plans (evidence: `src/App.tsx`)
- Provider settings → HTTP client: updates settings (evidence: `src/components/ApiSettingsPanel.tsx`)
- HTTP client → REST endpoints: HTTP requests (evidence: `src/api.ts`)
- REST endpoints → Checklist operations: reads and writes (evidence: `server/app.ts`)
- REST endpoints → Proposal validation: validates proposals (evidence: `server/app.ts`)
- REST endpoints → AI plan parsing: builds plans (evidence: `server/app.ts`)
- AI plan parsing → AI provider client: requests completion (evidence: `server/planner.ts`)
- AI provider client → AI-compatible endpoint: sends prompt (evidence: `server/ai.ts`)
- REST endpoints → AI provider client: requests completion (evidence: `server/app.ts`)
- Checklist operations → Checklist JSON: persists state (evidence: `README.md`)
- REST endpoints → Provider settings: updates settings (evidence: `server/app.ts`)
- AI provider client → Provider settings: loads configuration (evidence: `server/ai.ts`)
- Checklist operations → Task ID generation: generates IDs (evidence: `server/store.ts`)
- REST endpoints → Request limiter: limits requests (evidence: `server/app.ts`)
