Build Your Own X is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch. As Richard Feynman said: “What I cannot create, I do not understand.”

What is Build Your Own X?

Build Your Own X is a curated repository of tutorials that teach you how to build popular technologies from the ground up. With 495,146 stars, it’s one of the most popular educational repositories on GitHub and a testament to the effectiveness of learning by doing.

The repository covers 30+ technology categories with hundreds of tutorials in multiple programming languages.

Learning Paths

Learning Paths

The tutorials are organized into logical learning paths:

Systems Programming

  • Operating Systems: Build kernels, memory allocators, schedulers
  • Databases: Implement B-trees, SQL parsers, storage engines
  • Virtual Machines: Create bytecode interpreters, emulators
  • Docker: Build container runtimes from scratch

Web Technologies

  • Web Browsers: Parse HTML/CSS, implement rendering engines
  • Web Servers: Handle HTTP, routing, middleware
  • Front-end Frameworks: Build React, Redux, Angular clones
  • Search Engines: Implement indexing, ranking algorithms

Graphics & Games

  • 3D Renderers: Ray tracing, rasterization, OpenGL
  • Game Engines: Physics, collision detection, game loops
  • Physics Engines: Rigid body dynamics, constraints

Languages & Tools

  • Programming Languages: Lexers, parsers, interpreters, compilers
  • Shells: Command parsing, process management, pipelines
  • Regex Engines: Pattern matching, finite automata
  • Template Engines: Parsing, variable substitution

AI & Machine Learning

  • Neural Networks: Backpropagation, gradient descent
  • Large Language Models: Transformer architectures, training
  • Diffusion Models: Image generation pipelines

Blockchain & Networking

  • Blockchain: Proof of work, consensus algorithms
  • BitTorrent: Peer discovery, piece selection

Complexity Spectrum

Complexity Spectrum

Tutorials range from beginner-friendly to advanced:

Level Examples Time Investment
Beginner Bot, CLI Tool, Shell Weekend
Intermediate Database, Web Server, Game 1-2 Weeks
Advanced Compiler, OS, Browser, VM Months

Popular Tutorials

Some of the most popular tutorials include:

Large Language Model (Python)

  • Build a complete LLM from scratch
  • Implement transformer architecture
  • Train on custom datasets
  • Resource: LLMs-from-scratch

Blockchain (Multiple Languages)

  • Go: Building Blockchain in Go
  • Python: Learn Blockchains by Building One
  • JavaScript: Naivecoin in under 1500 lines
  • Rust: Building A Blockchain in Rust & Substrate

React Clone (JavaScript)

  • Gooact: React in 160 lines
  • Build your own React (pomb.us)
  • DIY guide to build your own React

Redis Clone (C/Go)

  • C: Let’s Build a Simple Database
  • Go: Build Your Own Redis from Scratch
  • Python: Write your own miniature Redis

Docker Clone (Go)

  • Build Your Own Container in under 100 lines of Go
  • Linux containers in 500 lines of code (C)
  • Docker implemented in around 100 lines of bash

Operating System (C/Rust)

  • Writing a simple OS from scratch
  • Rust OS development tutorials
  • xv6: A simple Unix-like teaching OS

Learning Methodology

Learning Methodology

The recommended approach for using these tutorials:

  1. Choose a Technology: Pick something you’re curious about
  2. Read the Tutorial: Understand the concepts before coding
  3. Code the Implementation: Type it out, don’t copy-paste
  4. Test & Debug: Verify it works, fix issues
  5. Extend & Customize: Add features, optimize, make it yours

Sample Tutorial Categories

Build Your Own Database

| Language | Tutorial | |———-|———-| | C | Let’s Build a Simple Database | | C++ | Build Your Own Redis from Scratch | | Go | Build Your Own Database: From B+Tree To SQL in 3000 Lines | | Python | DBDB: Dog Bed Database | | Rust | Build your own Redis client and server |

Build Your Own Programming Language

| Language | Tutorial | |———-|———-| | C | Writing a simple compiler | | JavaScript | The Super Tiny Compiler | | Python | Let’s Build A Simple Interpreter | | Rust | Writing a compiler in Rust | | TypeScript | Build your own programming language |

Build Your Own Web Browser

| Language | Tutorial | |———-|———-| | Python | Let’s build a browser engine! | | JavaScript | Build your own Web Browser | | Rust | Building a browser engine in Rust |

Why Build From Scratch?

Deep Understanding

Building from scratch forces you to understand every layer of abstraction. You’ll learn why things are designed the way they are.

Debugging Skills

When something breaks in a system you built, you know exactly where to look. This translates to better debugging in production systems.

Appreciation for Complexity

Understanding the complexity behind seemingly simple tools (like a shell or text editor) makes you a more thoughtful engineer.

Portfolio Building

These projects make excellent portfolio pieces. They demonstrate deep technical knowledge and persistence.

Getting Started

# Clone the repository
git clone https://github.com/codecrafters-io/build-your-own-x.git

# Browse the README for tutorials
cd build-your-own-x

Conclusion

Build Your Own X represents the best of open-source education — a community-driven collection of knowledge that helps developers understand the technologies they use every day. Whether you’re a beginner looking to understand how things work or an experienced engineer wanting to deepen your knowledge, there’s a tutorial here for you.

The repository’s motto captures its essence perfectly: “What I cannot create, I do not understand.” By building these technologies from scratch, you gain an intuition for how they work that no amount of reading can provide.

Get Started: GitHub Repository CodeCrafters
Watch PyShine on YouTube

Contents