This repository is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch.
What I cannot create, I do not understand — Richard Feynman.
It's a great way to learn.
3D RendererAI ModelAugmented RealityBitTorrent ClientBlockchain / CryptocurrencyBotCommand-Line ToolDatabaseDockerEmulator / Virtual MachineFront-end Framework / LibraryGameGitMemory AllocatorNetwork StackNeural NetworkOperating SystemPhysics EngineProcessorProgramming LanguageRegex EngineSearch EngineShellTemplate EngineText EditorVisual Recognition SystemVoxel EngineWeb BrowserWeb ServerUncategorized
C++:Introduction to Ray Tracing: a Simple Method for Creating 3D ImagesC++:How OpenGL works: software rendering in 500 lines of codeC++:Raycasting engine of Wolfenstein 3DC++:Physically Based Rendering:From Theory To ImplementationC++:Ray Tracing in One WeekendC++:Rasterization: a Practical ImplementationC# / TypeScript / JavaScript:Learning how to write a 3D soft engine from scratch in C#, TypeScript or JavaScriptJava / JavaScript:Build your own 3D rendererJava:How to create your own simple 3D render engine in pure JavaJavaScript / Pseudocode:Computer Graphics from scratchPython:A 3D Modeller
Python:A Large Language Model (LLM)Python:Diffusion Models for Image GenerationPython**:RAG for Document Search
[video]C#:How To: Augmented Reality App Tutorial for Beginners with Vuforia and Unity 3D[video]C#:How To Unity ARCore[video]C#:AR Portal Tutorial with Unity[video]C#:How to create a Dragon in Augmented Reality in Unity ARCore[video]C#:How to Augmented Reality AR Tutorial: ARKit Portal to the Upside DownPython:Augmented Reality with Python and OpenCV
C#:Building a BitTorrent client from scratch in C#Go:Building a BitTorrent client from the ground up in GoNim**:Writing a Bencode ParserNode.js:Write your own bittorrent clientPython:A BitTorrent client in Python 3.5
ATS:Functional BlockchainCrystal:Write your own blockchain and PoW algorithm using CrystalGo:Building Blockchain in GoGo:Code your own blockchain in less than 200 lines of GoJava:Creating Your First Blockchain with JavaJavaScript:A cryptocurrency implementation in less than 1500 lines of codeJavaScript:Build your own Blockchain in JavaScriptJavaScript:Learn & Build a JavaScript BlockchainJavaScript:Creating a blockchain with JavaScriptJavaScript:How To Launch Your Own Production-Ready CryptocurrencyJavaScript:Writing a Blockchain in Node.jsKotlin:Let’s implement a cryptocurrency in KotlinPython:Learn Blockchains by Building OnePython:Build your own blockchain: a Python tutorialPython:A Practical Introduction to Blockchain with PythonPython:Let’s Build the Tiniest BlockchainRuby:Programming Blockchains Step-by-Step (Manuscripts Book Edition)Scala:How to build a simple actor-based blockchainTypeScript**:Naivecoin: a tutorial for building a cryptocurrencyTypeScript:NaivecoinStake: a tutorial for building a cryptocurrency with the Proof of Stake consensusRust:Building A Blockchain in Rust & Substrate
Haskell:Roll your own IRC botNode.js:Creating a Simple Facebook Messenger AI Bot with API.ai in Node.jsNode.js:How to make a responsive telegram botNode.js:Create a Discord botNode.js:gifbot - Building a GitHub AppNode.js:Building A Simple AI Chatbot With Web Speech API And Node.jsPython:How to Build Your First Slack Bot with PythonPython:How to build a Slack Bot with Python using Slack Events API & Django under 20 minutePython:Build a Reddit Bot[video]Python:How To Make A Reddit BotPython:How To Create a Telegram Bot Using PythonPython:Create a Twitter Bot in Python Using Tweepy[video]Python:Creating Reddit Bot with Python & PRAWR:Build A Cryptocurrency Trading Bot with RRust:A bot for Starcraft in Rust, C or any other language
Go:Visualize your local git contributions with GoGo:Build a command line app with Go: lolcatGo:Building a cli command with Go: cowsayGo:Go CLI tutorial: fortune cloneNim:Writing a stow alternative to manage dotfilesNode.js:Create a CLI tool in JavascriptRust:Command line apps in RustRust:Writing a Command Line Tool in RustZig:Build Your Own CLI App in Zig from Scratch
C:Let's Build a Simple DatabaseC++:Build Your Own Redis from ScratchC#:Build Your Own DatabaseClojure:An Archaeology-Inspired DatabaseCrystal:Why you should build your own NoSQL DatabaseGo:Build Your Own Database from Scratch: From B+Tree To SQL in 3000 LinesGo:Code a database in 45 steps: a series of test-driven small coding puzzlesGo:Build Your Own Redis from ScratchJavaScript:Dagoba: an in-memory graph databasePython:DBDB: Dog Bed DatabasePython:Write your own miniature Redis with PythonRuby:Build your own fast, persistent KV store in RubyRust:Build your own Redis client and server
C:Linux containers in 500 lines of codeGo:Build Your Own Container Using Less than 100 Lines of Go[video]Go:Building a container from scratch in GoPython:A workshop on Linux containers: Rebuild Docker from ScratchPython:A proof-of-concept imitation of Docker, written in 100% PythonShell:Docker implemented in around 100 lines of bash
C:Home-grown bytecode interpretersC:Virtual machine in CC:Write your Own Virtual MachineC:Writing a Game Boy emulator, CinoopC++:How to write an emulator (CHIP-8 interpreter)C++:Emulation tutorial (CHIP-8 interpreter)C++:Emulation tutorial (GameBoy emulator)C++:Emulation tutorial (Master System emulator)[video]C++:NES Emulator From ScratchCommon Lisp:CHIP-8 in Common LispJavaScript**:GameBoy Emulation in JavaScriptPython:Emulation Basics: Write your own Chip 8 Emulator/InterpreterRust:0dmg: Learning Rust by building a partial Game Boy emulator
JavaScript:WTF is JSX (Let's Build a JSX Renderer)JavaScript:A DIY guide to build your own React[video]JavaScript:Building React From ScratchJavaScript**:Gooact: React in 160 lines of JavaScriptJavaScript:Learn how React Reconciler package works by building your own lightweight React DOMJavaScript:Build Yourself a ReduxJavaScript:Let’s Write Redux![video]JavaScript:Redux: Implementing Store from ScratchJavaScript:Build Your own Simplified AngularJS in 200 Lines of JavaScriptJavaScript:Make Your Own AngularJSJavaScript:How to write your own Virtual DOMJavaScript:*Building a frontend framework, from scratch, with components (templating, state, VDOM)*JavaScript:Build your own React[video]JavaScript:Building a Custom React Renderer
C:Handmade HeroC:How to Program an NES game in C[video]C:Chess Engine In C[video]C:Let's Make: Dangerous Dave[video]C:Learn Video Game Programming in C[video]C:Coding A Sudoku Solver in C[video]C:Coding a Rogue/Nethack RPG in CC:On Tetris and ReimplementationC++:BreakoutC++:Beginning Game Programming v2.0C++:Tetris tutorial in C++ platform independent focused in game logic for beginners[video]C++:Remaking Cavestory in C++[video]C++:Reconstructing Cave StoryC++:Space Invaders from ScratchC#:Learn C# by Building a Simple RPGC#:Creating a Roguelike Game in C#C#:Build a C#/WPF RPG[video]Go:Games With Go[video]Java:Code a 2D Game Engine using Java - Full Course for BeginnersJava**:3D Game Development with LWJGL 3JavaScript:2D breakout game using PhaserJavaScript:How to Make Flappy Bird in HTML5 With PhaserJavaScript:Developing Games with React, Redux, and SVG[video]JavaScript:Build your own 8-Ball Pool game from scratchJavaScript:How to Make Your First RoguelikeJavaScript:Think like a programmer: How to build Snake using only JavaScript, HTML & CSSLua:BYTEPATHPython:Developing Games With PyGame[pdf]Python:Making Games with Python & PygamePython:Roguelike Tutorial RevisedRuby:Developing Games With RubyRuby:Ruby SnakeRust:Adventures in Rust: A Basic 2D GameRust:Roguelike Tutorial in Rust + tcod
Haskell:Reimplementing “git clone” in Haskell from the bottom upJavaScript:GitletJavaScript:Build GIT - Learn GITPython:Just enough of a Git client to create a repo, commit, and push itself to GitHubPython:Write yourself a Git!Python:ugit: Learn Git Internals by Building Git YourselfRuby**:Rebuilding Git in Ruby
C:Beej's Guide to Network ProgrammingC:Let's code a TCP/IP stackC / Python:Build your own VPN/Virtual SwitchRuby:How to build a network stack in Ruby
C#:Neural Network OCRF#:Building Neural Networks in F#: Part 1F#:Building Neural Networks in F#: Part 2Go:Build a multilayer perceptron with GolangGo:How to build a simple artificial neural network with GoGo:Building a Neural Net from Scratch in Go[video]JavaScript / Java:Neural Networks - The Nature of CodeJavaScript:Neural networks from scratch for JavaScript linguists (Part1 — The Perceptron)Python:A Neural Network in 11 lines of PythonPython**:Build Deep Learning From Scratch (reimplement PyTorch internals across 34 stages)Python:Implement a Neural Network from ScratchPython**:Optical Character Recognition (OCR)Python:Traffic signs classification with a convolutional networkPython**:Generate Music using LSTM Neural Network in KerasPython:An Introduction to Convolutional Neural NetworksPython:Neural Networks: Zero to HeroPython:SlowTorch: Implementation of PyTorch from the ground up in 100% pure Python
Assembly:Writing a Tiny x86 BootAssembly:Baking Pi – Operating Systems Development[video]C:Building a software and hardware stack for a simple computer from scratchC:Operating Systems: From 0 to 1C:The little book about OS developmentC:Roll your own toy UNIX-clone OSC:Kernel 101 – Let’s write a KernelC:Kernel 201 – Let’s write a Kernel with keyboard and screen supportC:Build a minimal multi-tasking kernel for ARM from scratchC:How to create an OS from scratchC:Malloc tutorialC:Hack the virtual memoryC:Learning operating system development using Linux kernel and Raspberry PiC:Operating systems development for Dummies[video]C++:Write your own Operating SystemC++:Writing a BootRust:Writing an OS in RustRust:Add RISC-V Rust Operating System Tutorial**(any)**:Linux from scratch
C:Video Game Physics TutorialC++:Game physics series by Allen ChouC++:How to Create a Custom Physics Engine[video]C++:3D Physics Engine TutorialJavaScript:How Physics Engines WorkJavaScript:Broad Phase Collision Detection Using Spatial PartitioningJavaScript:Build a simple 2D physics engine for JavaScript games
(any):mal - Make a LispAssembly:JonesforthC:Baby's First Garbage CollectorC:Build Your Own Lisp: Learn C and build your own programming language in 1000 lines of codeC:Writing a Simple Garbage Collector in CC:C interpreter that interprets itself.C:A C & x86 version of the "Let's Build a Compiler" by Jack CrenshawC**:A journey explaining how to build a compiler from scratchC++:Writing Your Own Toy Compiler Using Flex[video]C++:How to Create a CompilerC++:Kaleidoscope: Implementing a Language with LLVMF#:Understanding Parser Combinators[video]Elixir:Demystifying compilers by writing your ownGo:The Super Tiny Compiler[video]Go:Lexical Scanning in GoHaskell:Let's Build a CompilerHaskell:Write You a HaskellHaskell:Write Yourself a Scheme in 48 HoursHaskell:Write You A SchemeJava:Crafting interpreters: A handbook for making programming languagesJava:Creating JVM LanguageJavaScript:The Super Tiny CompilerJavaScript:The Super Tiny InterpreterJavaScript:Little Lisp interpreterJavaScript:How to implement a programming language in JavaScriptJavaScript:Let’s go write a LispOCaml:Writing a C CompilerOCaml:Writing a Lisp, the seriesPascal:Let's Build a CompilerPython:A Python Interpreter Written in PythonPython:lisp.py: Make your own Lisp interpreterPython:How to Write a Lisp Interpreter in PythonPython:Let’s Build A Simple Interpreter[video]Python:Make Your Own Simple Interpreted Programming LanguagePython:From Source Code To Machine Code: Build Your Own Compiler From ScratchRacket:Beautiful Racket: How to make your own programming languages with RacketRuby:A Compiler From ScratchRuby:Markdown compiler from scratch in RubyRust:Learning Parser Combinators With RustSwift:Building a LISP from scratch with SwiftTypeScript:Build your own WebAssembly Compiler
C:A Regular Expression MatcherC:Regular Expression Matching Can Be Simple And FastGo:How to build a regex engine from scratchJavaScript:Build a Regex Engine in Less than 40 Lines of CodeJavaScript:How to implement regular expressions in functional javascript using derivativesJavaScript:Implementing a Regular Expression EnginePerl:How Regexes WorkPython:Build Your Own Regular Expression Engines: Backtracking, NFA, DFAScala:No Magic: Regular Expressions
CSS:A search engine in CSSPython:Building a search engine using Redis and redis-pyPython:Building a Vector Space Indexing Engine in Python[video]Python:Building A Python-Based Search EnginePython:Making text search learn from feedbackPython:Finding Important Words in Text Using TF-IDF
C:Tutorial - Write a Shell in CC:Let's build a shell!C:Writing a UNIX ShellC**:Build Your Own ShellC: Write a shell in C** Go**:Writing a simple shell in GoRust:Build Your Own Shell using Rust
JavaScript:JavaScript template engine in just 20 linesJavaScript:Understanding JavaScript Micro-TemplatingPython:Approach: Building a toy template engine in PythonPython:A Template EngineRuby:How to write a template engine in less than 30 lines of code
C:Build Your Own Text EditorC++:Designing a Simple Text Editor[video]Python:Python Tutorial: Make Your Own Text EditorPython:Create a Simple Python Text Editor!Ruby:Build a Collaborative Text Editor Using RailsRust**:Hecto: Build your own text editor in Rust
Python:Developing a License Plate Recognition System with Machine Learning in PythonPython:Building a Facial Recognition Pipeline with Deep Learning in Tensorflow
C#:Writing a Web Server from ScratchNode.js:Build Your Own Web Server From Scratch In JavaScriptNode.js:Let's code a web server from scratch with NodeJS StreamsNode.js:lets-build-expressPHP:Writing a webserver in pure PHPPython:A Simple Web ServerPython:Let’s Build A Web Server.Python:Web application from scratchPython**:Building a basic HTTP Server from scratch in PythonPython:Implementing a RESTful Web API with Python & FlaskRuby:Building a simple websockets server from scratch in Ruby
(any):From NAND to Tetris: Building a Modern Computer From First Principles**(any): build-your-own-x-vibe-coding: BYOX-style tutorials adapted for vibe coding Alloy**:The Same-Origin PolicyC:How to Write a Video Player in Less Than 1000 LinesC:Learn how to write a hash table in CC:The very basics of a terminal emulatorC:Write a System CallC:Sol - An MQTT broker from scratchC++:Build your own VR headset for $200C++:How X Window Managers work and how to write oneC++:Writing a Linux DebuggerC++:How a 64k intro is madeC++:Make your own Game EngineC#:C# Networking: Create a TCP chater server, TCP games, UDP Pong and moreC#:* and rendering 3D skeletal animations from scratch in C# and GLSLClojure:Building a spell-checkerGo*:Build A Simple Terminal Emulator In 100 Lines of GolangGo:Let's Create a Simple Load BalancerGo:Video Encoding from Scratch[video]Java:How to Build an Android Reddit AppJavaScript:Build Your Own Module Bundler - MinipackJavaScript:Learn JavaScript Promises by Building a Promise from ScratchJavaScript:Implementing promises from scratch (TDD way)JavaScript:Implement your own — call(), apply() and bind() method in JavaScriptJavaScript**:JavaScript Algorithms and Data StructuresJavaScript:Build a ride hailing app with React NativeJavaScript:Build Your Own AdBlocker in (Literally) 10 MinutesKotlin:Build Your Own CacheLua:Building a CDN from Scratch to Learn about CDNNim:Writing a Redis Protocol ParserNim:Writing a Build systemNim:Writing a MiniTest FrameworkNim:Writing a DMIDecode ParserNim:Writing a INI ParserNim:Writing a Link CheckerNim:Writing a URL Shortening ServiceNode.js:Build a static site generator in 40 lines with Node.jsNode.js:Building A Simple Single Sign On(SSO) Server And Solution From Scratch In Node.js.Node.js:How to create a real-world Node CLI app with NodeNode.js**:Build a DNS Server in Node.jsNode.js:Build a Synchronization Engine with Node.js and Y.jsPHP:Write your own MVC from scratch in PHPPHP:Make your own blogPHP:Modern PHP Without a FrameworkPHP:Code a Web Search Engine in PHP[video]Python:Build a Deep Learning LibraryPython:How to Build a Kick-Ass Mobile Document Scanner in Just 5 MinutesPython:Continuous Integration SystemPython:Recommender Systems in Python: Beginner TutorialPython:Write SMS-spam detector with Scikit-learnPython:A Simple Content-Based Recommendation Engine in PythonPython:Stock Market Predictions with LSTM in PythonPython:Building a simple Generative Adversarial Network (GAN) using TensorflowPython:Learn ML Algorithms by coding: Decision TreesPython:JSON Decoding AlgorithmPython:Build your own Git plugin with pythonRuby:A Pedometer in the Real WorldRuby:Creating a Linux Desktop application with RubyRust:Building a DNS server in RustRust:Writing Scalable Chat Service from ScratchRust:WebGL + Rust: Basic Water TutorialTypeScript:Tiny Package Manager: Learns how npm or Yarn works
- Submissions welcome, just send a PR, or
[create an issue](https://github.com/codecrafters-io/build-your-own-x/issues/new) - Help us review
[pending submissions](https://github.com/codecrafters-io/build-your-own-x/issues)by leaving comments and "reactions"
This repository is the work of many contributors. It was started by Daniel Stefanovic, and is now maintained by CodeCrafters, Inc. To the extent possible under law, CodeCrafters, Inc. has waived all copyright and related or neighboring rights to this work.