Interactive learning site for understanding Claude Code through real source analysis rather than generic product copy.
This repository contains a static learning site that explains:
- Claude Code project structure
- core runtime modules
- key execution flows
- notable features and engineering tradeoffs
- recommended source reading paths
- glossary and analysis metadata
The site is designed for developers who want to study how Claude Code is built.
This playbook is intentionally based on two source inputs:
-
A local Claude Code app-source snapshot used for internals such as:
- bootstrap
- REPL
- query runtime
- permissions
- tools
- auth
- MCP
- remote/bridge
-
The public GitHub repo
anthropics/claude-code, which is useful mainly for:- plugin ecosystem context
- examples
- workflows
- marketplace and extension patterns
Important note: the public GitHub repo does not expose the full core CLI source tree. The learning site makes that distinction explicit.
/— Home and execution plan/architecture— system layers and boundaries/modules— interactive module breakdowns/flows— execution chains and runtime walkthroughs/features— notable design choices and tradeoffs/reading-paths— guided source-reading routes/top-files— top 20 source-file guide/glossary— core terms and concepts/about— analysis basis, snapshot metadata, tracked files
- Next.js App Router
- React
- TypeScript
- static export for GitHub Pages
- theme switching: auto / light / dark
- bilingual UI and content: English / Chinese
npm install
npm run devThen open http://localhost:3000.
npm run buildStatic output is generated in out/.
If you have a new local Claude Code source snapshot:
npm run update:metadata -- --source-root=/absolute/path/to/Claude\ Code/srcThis updates content/generated/source-metadata.json with current line counts for key files.
After refreshing metadata, review and update:
content/site.tsapp/architecture/page.tsxapp/modules/page.tsxapp/flows/page.tsxapp/features/page.tsxapp/reading-paths/page.tsxapp/glossary/page.tsxapp/about/page.tsx
Recommended update workflow:
- Diff the new snapshot against the previously studied snapshot
- Re-check core files called out in
content/generated/source-metadata.json - Update any changed architecture, flow, or feature explanations
- Rebuild and verify the site locally
This project is set up for GitHub-driven deployment using GitHub Actions and static export.
- Git push to
main - GitHub Actions builds the static site
- Workflow uploads
out/as a Pages artifact - GitHub Pages serves the built site automatically
.github/workflows/deploy-github-pages.ymlpackage.jsonnext.config.mjs
In GitHub repository settings:
- Open
Settings -> Pages - Set
SourcetoGitHub Actions
No extra deployment secrets are required.
The setup is designed to keep deployment almost fully automatic.
- In
Settings -> Pages, switch the site toGitHub Actions - Push to
mainor trigger the workflow manually
The workflow then:
npm ci
npm run buildand deploys the generated out/ directory to GitHub Pages.
GitHub Pages must be told once to use GitHub Actions as its publishing source. After that, deployments are automatic on every push to main.
- bind a custom domain
- enable an enforcement policy for protected branches if desired
- Keep content in
content/and UI incomponents//app/ - Update metadata before changing narrative content
- Treat
/aboutas the source-of-truth page for analysis basis and version labeling
feat: build interactive Claude Code learning site with GitHub Pages deployment