Documentation Architecture¶
Status: Informational
Scope: Documentation under.dev/anddocs/
Last Updated: December 31, 2025 19:29:50
Created: December 12, 2025 16:53:42
This document explains the documentation structure of the NeetCode Practice Framework, following software engineering best practices.
π Design Principles¶
Separation of Concerns¶
Documentation is organized by target audience, not by file type:
| Directory | Purpose | Target Audience | Location |
|---|---|---|---|
docs/ | User-facing documentation | Users, learners | Website |
docs/tools/ | Developer tools reference (full docs) | Contributors | Website |
docs/contributors/ | Maintainer documentation (full docs) | Maintainers | Website |
tools/README.md | Tools overview (shortened) | Contributors | GitHub only |
.dev/README.md | Maintainer overview (shortened) | Maintainers | GitHub only |
Single Source of Truth¶
Each topic has one authoritative document:
- β Avoid: Same content in multiple places
- β Prefer: One source, with links from other places
Proximity Principle¶
Documentation follows a migration strategy for accessibility:
- Full documentation β
docs/tools/anddocs/contributors/(accessible on website) - Shortened READMEs β Original locations (
tools/README.md,.dev/README.md) with links to full docs - Code proximity β Tool scripts remain in
tools/, tests remain in.dev/
π Documentation Structure¶
neetcode/
β
βββ README.md # π Project overview (users)
βββ README_zh-TW.md # π Project overview (ηΉι«δΈζ)
β
βββ docs/ # π Documentation (MkDocs website)
β βββ index.md # Homepage (includes README.md)
β βββ index_zh-TW.md # Homepage (ηΉι«δΈζ)
β β
β βββ solution-contract.md # Solution file specification
β βββ generator-contract.md # Generator file specification
β βββ architecture-migration.md # Architecture migration guide
β βββ github-pages-setup.md # Deployment guide
β β
β βββ patterns/ # Pattern documentation
β β βββ README.md
β β βββ sliding_window/
β β βββ two_pointers/
β β
β βββ mindmaps/ # Mind map documentation
β β βββ index.md
β β βββ *.md
β β
β βββ contributors/ # π₯ Maintainer documentation (website)
β β βββ README.md # Full maintainer guide
β β βββ testing.md # Complete testing documentation
β β βββ documentation-architecture.md # This file
β β βββ virtual-env-setup.md # Virtual environment setup
β β
β βββ tools/ # π οΈ Tools documentation (website)
β β βββ README.md # Complete tools reference
β β βββ mindmaps/
β β β βββ README.md # Mind Maps Generator docs
β β β βββ ai-markmap-agent/
β β β βββ README.md # AI Markmap Agent docs
β β βββ patterndocs/
β β β βββ README.md # Pattern Docs Generator docs
β β βββ review-code/
β β βββ README.md # Review Code tools docs
β β
β βββ ontology-design.md # Ontology design
β βββ mkdocs-content-guide.md # Content guide
β
βββ tools/ # π§ Developer tools (code + scripts)
β βββ README.md # Shortened version (links to docs/tools/)
β βββ mindmaps/ # Mind Maps tools (consolidated)
β β βββ core/ # Core module
β β βββ ai-markmap-agent/ # AI Markmap Agent
β β βββ prompts/ # AI prompts
β βββ patterndocs/ # Pattern Docs Generator
β βββ review-code/ # Code review tools
β β βββ validation/ # Validation tools
β βββ docstring/ # Docstring utilities
β βββ leetcode-api/ # LeetCode API cache
β
βββ .dev/ # π Maintainer zone (tests + scripts)
βββ README.md # Shortened version (links to docs/contributors/)
βββ tests/ # Component tests
βββ tests_solutions/ # Solution correctness tests
π― Target Audience Guide¶
π€ Users (Learners, Practitioners)¶
What they need: - How to use the framework - Solution and generator specifications - Pattern guides and mind maps
Where to find: - README.md β Quick start - docs/ β Detailed documentation - Website β https://lufftw.github.io/neetcode/
π§ Contributors (Pull Request Authors)¶
What they need: - Code style and architecture - Tool usage - Testing requirements
Where to find: - docs/tools/README.md β Complete tools reference (website) - docs/contracts/solution-contract.md β Solution format - docs/contributors/testing.md β Complete testing documentation (website)
π οΈ Maintainers (Core Team)¶
What they need: - Internal architecture - Release process - Module deep-dives
Where to find: - docs/contributors/README.md β Full maintainer guide (website) - docs/tools/*/README.md β Complete module documentation (website) - docs/contributors/documentation-architecture.md β Documentation structure (this file)
π Documentation Checklist¶
When Adding a New Feature¶
- Update
README.mdif user-facing - Update
tools/README.mdif developer tool - Add module README if new module
- Update relevant CONTRACT files if API change
When Adding a New Tool¶
- Add to
docs/tools/README.mdquick reference table (full documentation) - Add detailed section in
docs/tools/README.md - Create
docs/tools/<module>/README.mdif complex - Update
tools/README.md(shortened version) if needed - Add tests to
.dev/tests/ortools/tests/ - Update
mkdocs.ymlnavigation if adding new documentation page
When Modifying Documentation Structure¶
- Update this file (
docs/contributors/documentation-architecture.md) - Update
docs/mkdocs-content-guide.md - Update
mkdocs.ymlif adding to website - Update README documentation section
- Verify all links follow the linking strategy (files in
docs/use relative paths, files outsidedocs/use GitHub URLs)
ποΈ Industry Best Practices¶
This structure follows patterns from well-known open source projects:
Flask / Django Pattern¶
project/
βββ docs/ # Sphinx/MkDocs user documentation
βββ scripts/ # Scripts with their own README
βββ CONTRIBUTING.md # Contributor guide
Kubernetes Pattern¶
project/
βββ docs/ # User documentation
βββ hack/ # Developer scripts and tools
βββ contributor/ # Contributor documentation
Our Adaptation¶
neetcode/
βββ docs/ # User documentation (MkDocs)
βββ tools/ # Developer tools (with README.md)
βββ .dev/ # Maintainer documentation
β FAQ¶
Why migrate documentation to docs/?¶
Migration Strategy: Full documentation has been moved to docs/contributors/ and docs/tools/ to make it accessible via the MkDocs website, while maintaining GitHub browsing context through shortened READMEs in original locations.
Benefits: - β All documentation accessible on MkDocs website - β Maintains GitHub browsing context with shortened READMEs - β Links work correctly in both GitHub and website using relative paths - β Single source of truth for full documentation content
Structure: - docs/contributors/ β Full maintainer documentation (on website) - docs/tools/ β Full tools documentation (on website) - .dev/README.md β Shortened version (links to full docs on website) - tools/README.md β Shortened version (links to full docs on website)
Why .dev/ for maintainer zone?¶
- Clearly signals "internal" directory
- Keeps root directory clean
- Groups with test files (same audience)
- Shortened README maintains GitHub browsing context
Why separate code from documentation in tools/?¶
tools/β Contains actual tool scripts (.pyfiles) and shortened READMEdocs/tools/β Contains full documentation (on website)- Clear separation between code and documentation
How do I know where to add new documentation?¶
Ask: Who is the primary reader?
| Reader | Location |
|---|---|
| User learning the framework | docs/ (patterns, guides, contracts) |
| Contributor adding features | docs/tools/README.md (full reference on website) |
| Maintainer debugging issues | docs/contributors/ (full docs on website) |
Note: Original locations (.dev/README.md, tools/README.md) contain shortened versions with links to full documentation on the website.
Link Strategy¶
When adding links in documentation files, follow this strategy:
- β
Files inside
docs/directory: Use relative paths (e.g.,[README](README.md),[Tools](../tools/README.md)) - β
Files outside
docs/directory: Use GitHub absolute URLs (e.g.,[Runner](https://github.com/lufftw/neetcode/blob/main/runner/README.md))
This ensures links work correctly in both GitHub repository browsing and the MkDocs website.
Examples: - β
docs/contributors/README.md linking to docs/contributors/testing.md β Use [testing.md](testing.md) - β
docs/contracts/solution-contract.md linking to runner/README.md β Use [Runner](https://github.com/lufftw/neetcode/blob/main/runner/README.md) - β
docs/tools/README.md linking to tools/prompts/README.md β Use [Prompts](https://github.com/lufftw/neetcode/blob/main/tools/prompts/README.md)
π See MkDocs Content Guide for detailed linking strategy documentation.
π Update Log¶
- 2025-12-24: Migrated maintainer and tools documentation to
docs/contributors/anddocs/tools/for MkDocs website integration. Created shortened READMEs in original locations with links to full documentation. - 2025-12-24: Added link strategy section documenting rules for linking to files inside/outside
docs/directory - 2025-12-12: Initial version - Documented architecture after consolidating tools documentation