# bootdotdev/bootdev architecture

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

- Interactive diagram: https://gitdiagram.com/bootdotdev/bootdev
- Repository: https://github.com/bootdotdev/bootdev

## Overview

Boot.dev CLI lets learners authenticate, discover or specify a lesson, run its checks locally, inspect results, and submit completion. The documented check types include CLI commands and HTTP requests; the tree also identifies jq and TMDL check support. Authentication and lesson/submission API behavior are visible in client source, while several command and runner implementations were not sampled, so their internal wiring is shown only where supported by the documented workflow. Configuration and terminal rendering support these runtime flows.

Main entry points: [`checks/runner.go`](https://github.com/bootdotdev/bootdev/blob/main/checks/runner.go) (Check runner), [`cmd`](https://github.com/bootdotdev/bootdev/tree/main/cmd) (Command handlers), [`client/lessons.go`](https://github.com/bootdotdev/bootdev/blob/main/client/lessons.go) (Lesson client), [`main.go`](https://github.com/bootdotdev/bootdev/blob/main/main.go) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["CLI Commands"]
  node_entry["CLI entry<br/>[main.go]"]
  node_commands["Command handlers"]
end

subgraph group_lesson["Lesson Checks"]
  node_runner["Check runner<br/>[runner.go]"]
  node_local_checks["Local assertions<br/>[local.go]"]
  node_http_checks["HTTP checks<br/>[http.go]"]
  node_cli_checks["CLI checks<br/>[cli.go]"]
  node_jq_checks["jq checks<br/>[jq.go]"]
  node_tmdl_checks["TMDL checks<br/>[tmdl.go]"]
end

subgraph group_services["Accounts and API"]
  node_auth_client["Authentication client<br/>[auth.go]"]
  node_lesson_client["Lesson client<br/>[lessons.go]"]
end

subgraph group_presentation["Configuration and Output"]
  node_config[("CLI configuration<br/>[root.go]")]
  node_renderer["Terminal renderer<br/>[render.go]"]
  node_view["Result view<br/>[view.go]"]
end

node_learner(("Learner"))
node_local_project["Lesson project"]
node_boot_api["Boot.dev API"]

node_learner -->|"invokes"| node_entry
node_entry -->|"dispatches"| node_commands
node_commands -->|"reads and writes"| node_config
node_commands -->|"authenticates"| node_auth_client
node_auth_client -->|"requests tokens"| node_boot_api
node_commands -->|"fetches lesson"| node_lesson_client
node_lesson_client -->|"requests lesson data"| node_boot_api
node_commands -->|"runs checks"| node_runner
node_local_project -->|"provides lesson inputs"| node_runner
node_runner -->|"evaluates results"| node_local_checks
node_runner -->|"executes requests"| node_http_checks
node_runner -->|"evaluates commands"| node_cli_checks
node_cli_checks -->|"runs queries"| node_jq_checks
node_runner -->|"checks TMDL"| node_tmdl_checks
node_commands -->|"submits completion"| node_lesson_client
node_lesson_client -->|"submits result"| node_boot_api
node_runner -->|"returns check results"| node_renderer
node_renderer -->|"formats output"| node_view
node_view -->|"displays results"| node_learner

click node_entry "https://github.com/bootdotdev/bootdev/blob/main/main.go"
click node_commands "https://github.com/bootdotdev/bootdev/tree/main/cmd"
click node_runner "https://github.com/bootdotdev/bootdev/blob/main/checks/runner.go"
click node_local_checks "https://github.com/bootdotdev/bootdev/blob/main/checks/local.go"
click node_http_checks "https://github.com/bootdotdev/bootdev/blob/main/checks/http.go"
click node_cli_checks "https://github.com/bootdotdev/bootdev/blob/main/checks/cli.go"
click node_jq_checks "https://github.com/bootdotdev/bootdev/blob/main/checks/jq.go"
click node_tmdl_checks "https://github.com/bootdotdev/bootdev/blob/main/checks/tmdl.go"
click node_auth_client "https://github.com/bootdotdev/bootdev/blob/main/client/auth.go"
click node_lesson_client "https://github.com/bootdotdev/bootdev/blob/main/client/lessons.go"
click node_config "https://github.com/bootdotdev/bootdev/blob/main/cmd/root.go"
click node_renderer "https://github.com/bootdotdev/bootdev/blob/main/render/render.go"
click node_view "https://github.com/bootdotdev/bootdev/blob/main/render/view.go"

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_entry,node_commands toneBlue
class node_runner,node_local_checks,node_http_checks,node_cli_checks,node_jq_checks,node_tmdl_checks toneAmber
class node_auth_client,node_lesson_client,node_boot_api toneMint
class node_config,node_renderer,node_view toneRose
class node_learner,node_local_project toneIndigo
```

## Components

### CLI Commands

- [CLI entry](https://github.com/bootdotdev/bootdev/blob/main/main.go): `main.go`
- [Command handlers](https://github.com/bootdotdev/bootdev/tree/main/cmd): `cmd`

### Lesson Checks

- [Check runner](https://github.com/bootdotdev/bootdev/blob/main/checks/runner.go): `checks/runner.go`
- [Local assertions](https://github.com/bootdotdev/bootdev/blob/main/checks/local.go): `checks/local.go`
- [HTTP checks](https://github.com/bootdotdev/bootdev/blob/main/checks/http.go): `checks/http.go`
- [CLI checks](https://github.com/bootdotdev/bootdev/blob/main/checks/cli.go): `checks/cli.go`
- [jq checks](https://github.com/bootdotdev/bootdev/blob/main/checks/jq.go): `checks/jq.go`
- [TMDL checks](https://github.com/bootdotdev/bootdev/blob/main/checks/tmdl.go): `checks/tmdl.go`

### Accounts and API

- [Authentication client](https://github.com/bootdotdev/bootdev/blob/main/client/auth.go): `client/auth.go`
- [Lesson client](https://github.com/bootdotdev/bootdev/blob/main/client/lessons.go): `client/lessons.go`

### Configuration and Output

- [CLI configuration](https://github.com/bootdotdev/bootdev/blob/main/cmd/root.go): `cmd/root.go`
- [Terminal renderer](https://github.com/bootdotdev/bootdev/blob/main/render/render.go): `render/render.go`
- [Result view](https://github.com/bootdotdev/bootdev/blob/main/render/view.go): `render/view.go`

### Other components

- **Learner**
- **Lesson project**
- **Boot.dev API**

## Connections

- Learner → CLI entry: invokes
- CLI entry → Command handlers: dispatches
- Command handlers → CLI configuration: reads and writes
- Command handlers → Authentication client: authenticates
- Authentication client → Boot.dev API: requests tokens
- Command handlers → Lesson client: fetches lesson
- Lesson client → Boot.dev API: requests lesson data
- Command handlers → Check runner: runs checks
- Lesson project → Check runner: provides lesson inputs
- Check runner → Local assertions: evaluates results
- Check runner → HTTP checks: executes requests
- Check runner → CLI checks: evaluates commands
- CLI checks → jq checks: runs queries
- Check runner → TMDL checks: checks TMDL
- Command handlers → Lesson client: submits completion
- Lesson client → Boot.dev API: submits result
- Check runner → Terminal renderer: returns check results
- Terminal renderer → Result view: formats output
- Result view → Learner: displays results
