Live Site: https://backend-from-first-principles.netlify.app
A professional, long-form documentation website dedicated to teaching backend engineering concepts from the ground up. Designed to feel like modern documentation sites (Stripe, MDN, Microsoft Learn), this platform prioritizes readability, fast navigation, and clear conceptual explanations.
- Framework: React 18 + Vite
- Routing: React Router DOM v6
- Styling: Vanilla CSS (CSS Modules) + Custom Design System
- Icons: Lucide React
- Syntax Highlighting: PrismJS
- Search: Fuse.js (Fuzzy search)
- Diagrams: Mermaid.js
- Node.js (v18+ recommended)
- npm or yarn
-
Clone the repository and install dependencies:
npm install
-
Start the development server:
npm run dev
The site will be available at
http://localhost:5173. -
Build for production:
npm run build
src/
├── components/
│ ├── content/ # Content building blocks (Definitions, Callouts, Quizzes, etc.)
│ ├── layout/ # Core layout (Sidebars, TopBar, Breadcrumbs)
│ └── ui/ # Generic UI components (ThemeToggle, CodeBlock, SearchModal)
├── content/ # The actual documentation content (pages)
│ ├── chapter1-foundation/
│ └── registry.js # Lazy-loading map for all content sections
├── data/
│ └── chapters.js # The single source of truth for the site's table of contents
├── hooks/ # Custom React hooks (Search, Theme, Scroll tracking)
├── pages/ # Top-level route pages (Home, NotFound)
└── styles/ # Global CSS design system (Tokens, Themes, Utilities)
The site uses a component-based approach to writing documentation rather than Markdown. This allows for rich, interactive, and highly styled content blocks.
This documentation teaches fundamental concepts, not language-specific syntax.
- Avoid using arbitrary language code (Python, Java, Go) to explain general concepts like sockets, database connections, or API routing.
- Instead, use conceptual explanations, numbered lists, and Mermaid flow diagrams.
- Exceptions: Code blocks are permitted only when a concept is intrinsically tied to a specific language (e.g., explaining the JavaScript event loop).
- Create a new
.jsxfile in the appropriatesrc/content/chapterX/folder. - Use the standard content components (see
networking-fundamentals.jsxfor a full reference example). - Import and map the new file in
src/content/registry.js. - Ensure the section slug matches exactly what is defined in
src/data/chapters.js.
- Structure:
<SectionPage>,<ConceptBlock> - Explanations:
<Definition>,<CodeBlock>,<Callout>(note, tip, warning, etc.) - Visuals:
<FlowDiagram>,<ComparisonTable>,<ProsConsList> - Interactive:
<Quiz>,<Exercise>,<Checklist> - Admonitions:
<InterviewQuestion>,<RealWorld>,<CommonPitfall> - Summaries:
<Summary>,<KeyTakeaways>,<FurtherReading>