# codiearyan/indent architecture

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

- Interactive diagram: https://gitdiagram.com/codiearyan/indent
- Repository: https://github.com/codiearyan/indent

## Overview

Indent is a local-first desktop coding-learning app. Learners browse story-based repositories, open an issue workspace, read a lesson, edit and run code, then submit checks that report results and update local progress. The map also includes the documented AI tutor, browser preview, algorithm-pattern lessons, catalog/roadmaps, and activity tracking. Some service internals and renderer-to-main wiring were not sampled; those relationships are shown only where the README or indexed source references support them.

Main entry points: [`apps/desktop/src/renderer/src/features/workspace/WorkspacePage.tsx`](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/workspace/WorkspacePage.tsx) (Issue workspace), [`apps/desktop/src/renderer/src/App.tsx`](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/App.tsx) (Desktop routes), [`apps/desktop/src/main/services/checks.ts`](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/checks.ts) (Check runner), [`apps/desktop/src/main/services/progress.ts`](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/progress.ts) (Progress records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_app["Desktop routes<br/>[App.tsx]"]
  node_catalog["Repo catalog"]
  node_content["Lessons and repos"]
  node_patterns["Pattern lessons<br/>[registry.ts]"]
  node_pattern_player["Step player<br/>[usePlayer.ts]"]
end

subgraph group_workspace["Issue workspace"]
  node_workspace["Issue workspace<br/>[WorkspacePage.tsx]"]
  node_tasks["Tasks and hints<br/>[TaskItem.tsx]"]
  node_editor["Code editor<br/>[CodeEditor.tsx]"]
  node_terminal["Real terminal<br/>[TerminalPane.tsx]"]
  node_tutor["AI tutor<br/>[ChatPanel.tsx]"]
  node_preview["Browser preview<br/>[preview.ts]"]
end

subgraph group_runtime["Local execution"]
  node_ipc["Preload IPC<br/>[index.ts]"]
  node_checks["Check runner<br/>[checks.ts]"]
  node_grader["Hidden graders<br/>[run-check.mjs]"]
  node_workspace_files[("Learner files<br/>[workspaceFiles.ts]")]
  node_ai_services["AI providers<br/>[ai.ts]"]
end

subgraph group_support["Progress and support"]
  node_progress[("Progress records<br/>[progress.ts]")]
  node_activity["Activity and levels"]
  node_completion["Issue completion<br/>[CompletionPage.tsx]"]
  node_settings["Setup and settings<br/>[settings.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_workspace
node_catalog -.->|"browses"| node_content
node_workspace -->|"teaches from"| node_content
node_workspace -->|"shows"| node_tasks
node_workspace -->|"edits in"| node_editor
node_workspace -->|"runs code in"| node_terminal
node_workspace -->|"offers"| node_tutor
node_workspace -.->|"previews"| node_preview
node_app -->|"routes to"| node_patterns
node_patterns -.->|"steps through"| node_pattern_player
node_tasks -.->|"requests checks"| node_ipc
node_ipc -->|"dispatches"| node_checks
node_checks -->|"loads chapter"| node_content
node_checks -.->|"runs checks"| node_grader
node_checks -->|"checks files"| node_workspace_files
node_checks -->|"records results"| node_progress
node_tutor -.->|"asks"| node_ai_services
node_progress -.->|"summarizes"| node_activity
node_progress -.->|"informs"| node_completion
node_app -->|"checks setup"| node_settings

click node_app "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/App.tsx"
click node_catalog "https://github.com/codiearyan/indent/tree/main/apps/desktop/src/renderer/src/features/catalog"
click node_content "https://github.com/codiearyan/indent/tree/main/packages/content"
click node_workspace "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/workspace/WorkspacePage.tsx"
click node_tasks "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/workspace/TaskItem.tsx"
click node_editor "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/editor/CodeEditor.tsx"
click node_terminal "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/terminal/TerminalPane.tsx"
click node_tutor "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/ai/ChatPanel.tsx"
click node_preview "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/preview.ts"
click node_patterns "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/dsa/registry.ts"
click node_pattern_player "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/dsa/usePlayer.ts"
click node_ipc "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/preload/index.ts"
click node_checks "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/checks.ts"
click node_grader "https://github.com/codiearyan/indent/blob/main/packages/content/kit/run-check.mjs"
click node_workspace_files "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/workspaceFiles.ts"
click node_ai_services "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/ai.ts"
click node_progress "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/progress.ts"
click node_activity "https://github.com/codiearyan/indent/tree/main/apps/desktop/src/renderer/src/features/progress"
click node_completion "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/completion/CompletionPage.tsx"
click node_settings "https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/stores/settings.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_catalog,node_content,node_patterns,node_pattern_player toneBlue
class node_workspace,node_tasks,node_editor,node_terminal,node_tutor,node_preview toneAmber
class node_ipc,node_checks,node_grader,node_workspace_files,node_ai_services toneMint
class node_progress,node_activity,node_completion,node_settings toneRose
class node_learner toneIndigo
```

## Components

### Learning experience

- [Desktop routes](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/App.tsx): `apps/desktop/src/renderer/src/App.tsx`
- [Repo catalog](https://github.com/codiearyan/indent/tree/main/apps/desktop/src/renderer/src/features/catalog): `apps/desktop/src/renderer/src/features/catalog`
- [Lessons and repos](https://github.com/codiearyan/indent/tree/main/packages/content): `packages/content`
- [Pattern lessons](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/dsa/registry.ts): `apps/desktop/src/renderer/src/features/dsa/registry.ts`
- [Step player](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/dsa/usePlayer.ts): `apps/desktop/src/renderer/src/features/dsa/usePlayer.ts`

### Issue workspace

- [Issue workspace](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/workspace/WorkspacePage.tsx): `apps/desktop/src/renderer/src/features/workspace/WorkspacePage.tsx`
- [Tasks and hints](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/workspace/TaskItem.tsx): `apps/desktop/src/renderer/src/features/workspace/TaskItem.tsx`
- [Code editor](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/editor/CodeEditor.tsx): `apps/desktop/src/renderer/src/features/editor/CodeEditor.tsx`
- [Real terminal](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/terminal/TerminalPane.tsx): `apps/desktop/src/renderer/src/features/terminal/TerminalPane.tsx`
- [AI tutor](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/ai/ChatPanel.tsx): `apps/desktop/src/renderer/src/features/ai/ChatPanel.tsx`
- [Browser preview](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/preview.ts): `apps/desktop/src/main/services/preview.ts`

### Local execution

- [Preload IPC](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/preload/index.ts): `apps/desktop/src/preload/index.ts`
- [Check runner](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/checks.ts): `apps/desktop/src/main/services/checks.ts`
- [Hidden graders](https://github.com/codiearyan/indent/blob/main/packages/content/kit/run-check.mjs): `packages/content/kit/run-check.mjs`
- [Learner files](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/workspaceFiles.ts): `apps/desktop/src/main/services/workspaceFiles.ts`
- [AI providers](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/ai.ts): `apps/desktop/src/main/services/ai.ts`

### Progress and support

- [Progress records](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/main/services/progress.ts): `apps/desktop/src/main/services/progress.ts`
- [Activity and levels](https://github.com/codiearyan/indent/tree/main/apps/desktop/src/renderer/src/features/progress): `apps/desktop/src/renderer/src/features/progress`
- [Issue completion](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/features/completion/CompletionPage.tsx): `apps/desktop/src/renderer/src/features/completion/CompletionPage.tsx`
- [Setup and settings](https://github.com/codiearyan/indent/blob/main/apps/desktop/src/renderer/src/stores/settings.ts): `apps/desktop/src/renderer/src/stores/settings.ts`

### Other components

- **Learner**

## Connections

- Learner → Desktop routes: uses
- Desktop routes → Repo catalog: routes to (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Desktop routes → Issue workspace: routes to (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Repo catalog → Lessons and repos: browses
- Issue workspace → Lessons and repos: teaches from
- Issue workspace → Tasks and hints: shows
- Issue workspace → Code editor: edits in
- Issue workspace → Real terminal: runs code in
- Issue workspace → AI tutor: offers
- Issue workspace → Browser preview: previews
- Desktop routes → Pattern lessons: routes to (evidence: `apps/desktop/src/renderer/src/App.tsx`)
- Pattern lessons → Step player: steps through
- Tasks and hints → Preload IPC: requests checks
- Preload IPC → Check runner: dispatches (evidence: `apps/desktop/src/main/services/checks.ts`)
- Check runner → Lessons and repos: loads chapter (evidence: `apps/desktop/src/main/services/checks.ts`)
- Check runner → Hidden graders: runs checks
- Check runner → Learner files: checks files (evidence: `apps/desktop/src/main/services/checks.ts`)
- Check runner → Progress records: records results (evidence: `apps/desktop/src/main/services/checks.ts`)
- AI tutor → AI providers: asks
- Progress records → Activity and levels: summarizes
- Progress records → Issue completion: informs
- Desktop routes → Setup and settings: checks setup (evidence: `apps/desktop/src/renderer/src/App.tsx`)
