Skip to content

Architecture Documentation

Status: Overview
Scope: System architecture and package relationships

This section documents the overall architecture of the NeetCode Practice Framework.


Package Architecture

The project follows a clean dependency hierarchy:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Dependency Direction                      β”‚
β”‚                                                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”‚
β”‚   β”‚  tools/  β”‚ ──────► β”‚    src/      β”‚                     β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚
β”‚        β”‚                      β”‚                              β”‚
β”‚        β”‚                      β–Ό                              β”‚
β”‚        β”‚               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”‚
β”‚        └─────────────► β”‚   runner/    β”‚                     β”‚
β”‚                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚
β”‚                                                              β”‚
β”‚   βœ… tools β†’ packages                                        β”‚
β”‚   βœ… tools β†’ runner                                          β”‚
β”‚   ❌ packages β†’ tools  (FORBIDDEN)                           β”‚
β”‚   ❌ packages β†’ runner (FORBIDDEN)                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Modules

Module Location Role Documentation
runner runner/ Test execution engine Runner Spec
codegen src/codegen/ Solution skeleton generator CodeGen Spec
leetcode_datasource src/leetcode_datasource/ LeetCode data layer DataSource Spec
practice_workspace src/practice_workspace/ Practice file management Workspace Spec

Design Principles

Principle Description
Packages are source of truth Tools adapt to packages, never the reverse
One-way dependencies tools β†’ packages β†’ (nothing)
Stateless codegen Generation is pure function, no side effects
Stateful workspace History and restore managed separately

Documentation

Document Content
packages-overview.md Detailed packages architecture
architecture-migration.md Migration history and plans