codecrafters-io/build-your-own-x

GitHub Trending (daily) 工具

摘要

一个精选的GitHub仓库,汇集了从零开始重建各种技术的逐步指南,从3D渲染器到神经网络,旨在通过创作进行深度学习。

通过从头重建你喜爱的技术来掌握编程。
查看原文
查看缓存全文

缓存时间: 2026/05/24 12:23

codecrafters-io/build-your-own-x

来源:https://github.com/codecrafters-io/build-your-own-x

Banner (https://codecrafters.io/github-banner)

构建你自己的 <此处填入技术名称>

这个仓库收录了一系列编写精良、步骤详细的指南,教你从头重新创建我们最喜爱的技术。

我无法创造的东西,我就无法理解——理查德·费曼。

这是一种非常棒的学习方式。

教程

构建你自己的分布式系统

  • Java: 从头构建一个类似Kafka的系统:逐步指南 (https://github.com/buildthingsuseful/build-your-own-kafka)

构建你自己的3D渲染器

  • C++: 光线追踪简介:创建3D图像的简单方法 (https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing/how-does-it-work)
  • C++: OpenGL的工作原理:500行代码实现软件渲染 (https://github.com/ssloy/tinyrenderer/wiki)
  • C++: Wolfenstein 3D的光线投射引擎 (http://lodev.org/cgtutor/raycasting.html)
  • C++: 基于物理的渲染:从理论到实现 (http://www.pbr-book.org/)
  • C++: 周末光线追踪 (https://raytracing.github.io/books/RayTracingInOneWeekend.html)
  • C++: 光栅化:实用实现 (https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/overview-rasterization-algorithm)
  • C# / TypeScript / JavaScript: 学习如何用C#、TypeScript或JavaScript从头编写3D软引擎 (https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/)
  • Java / JavaScript: 构建你自己的3D渲染器 (https://avik-das.github.io/build-your-own-raytracer/)
  • Java: 如何用纯Java创建你自己的简单3D渲染引擎 (http://blog.rogach.org/2015/08/how-to-create-your-own-simple-3d-render.html)
  • JavaScript / 伪代码: 从零开始的计算机图形学 (http://www.gabrielgambetta.com/computer-graphics-from-scratch/introduction.html)
  • Python: 一个3D建模器 (http://aosabook.org/en/500L/a-3d-modeller.html)

构建你自己的AI模型

  • Python: 一个大语言模型(LLM) (https://github.com/rasbt/LLMs-from-scratch)
  • Python: 用于图像生成的扩散模型 (https://huggingface.co/learn/diffusion-course/en/unit1/3)
  • Python: 用于文档搜索的RAG (https://github.com/langchain-ai/rag-from-scratch)

构建你自己的增强现实

  • C#: 如何做:面向初学者的Vuforia和Unity 3D增强现实应用教程 (https://www.youtube.com/watch?v=uXNjNcqW4kY) [视频]
  • C#: 如何做Unity ARCore (https://www.youtube.com/playlist?list=PLKIKuXdn4ZMjuUAtdQfK1vwTZPQn_rgSv) [视频]
  • C#: 使用Unity的AR传送门教程 (https://www.youtube.com/playlist?list=PLPCqNOwwN794Gz5fzUSi1p4OqLU0HTmvn) [视频]
  • C#: 如何在Unity ARCore中创建一条增强现实龙 (https://www.youtube.com/watch?v=qTSDPkPyPqs) [视频]
  • C#: 如何做增强现实AR教程:ARKit传送门通往颠倒世界 (https://www.youtube.com/watch?v=Z5AmqMuNi08) [视频]
  • Python: 使用Python和OpenCV的增强现实 (https://bitesofcode.wordpress.com/2017/09/12/augmented-reality-with-python-and-opencv-part-1/)

构建你自己的BitTorrent客户端

  • C#: 用C#从零构建一个BitTorrent客户端 (https://www.seanjoflynn.com/research/bittorrent.html)
  • Go: 用Go从头构建一个BitTorrent客户端 (https://blog.jse.li/posts/torrent/)
  • Nim: 编写一个Bencode解析器 (https://xmonader.github.io/nimdays/day02_bencode.html)
  • Node.js: 编写你自己的bittorrent客户端 (https://allenkim67.github.io/programming/2016/05/04/how-to-make-your-own-bittorrent-client.html)
  • Python: 一个Python 3.5的BitTorrent客户端 (http://markuseliasson.se/article/bittorrent-in-python/)

构建你自己的区块链/加密货币

  • ATS: 功能性区块链 (https://beta.observablehq.com/@galletti94/functional-blockchain)
  • Crystal: 使用Crystal编写你自己的区块链和PoW算法 (https://medium.com/@bradford_hamilton/write-your-own-blockchain-and-pow-algorithm-using-crystal-d53d5d9d0c52)
  • Go: 用Go构建区块链 (https://jeiwan.net/posts/building-blockchain-in-go-part-1/)
  • Go: 用不到200行Go代码编写你自己的区块链 (https://medium.com/@mycoralhealth/code-your-own-blockchain-in-less-than-200-lines-of-go-e296282bcffc)
  • Java: 用Java创建你的第一个区块链 (https://medium.com/programmers-blockchain/create-simple-blockchain-java-tutorial-from-scratch-6eeed3cb03fa)
  • JavaScript: 一个用不到1500行代码实现的加密货币 (https://github.com/conradoqg/naivecoin)
  • JavaScript: 在JavaScript中构建你自己的区块链 (https://github.com/nambrot/blockchain-in-js)
  • JavaScript: 学习并构建一个JavaScript区块链 (https://medium.com/digital-alchemy-holdings/learn-build-a-javascript-blockchain-part-1-ca61c285821e)
  • JavaScript: 用JavaScript创建区块链 (https://github.com/SavjeeTutorials/SavjeeCoin)
  • JavaScript: 如何发布你自己的生产级加密货币 (https://hackernoon.com/how-to-launch-your-own-production-ready-cryptocurrency-ab97cb773371)
  • JavaScript: 在Node.js中编写区块链 (https://www.smashingmagazine.com/2020/02/cryptocurrency-blockchain-node-js/)
  • Kotlin: 让我们用Kotlin实现一个加密货币 (https://medium.com/@vasilyf/lets-implement-a-cryptocurrency-in-kotlin-part-1-blockchain-8704069f8580)
  • Python: 通过构建一个区块链来学习区块链 (https://hackernoon.com/learn-blockchains-by-building-one-117428612f46)
  • Python: 构建你自己的区块链:一个Python教程 (http://ecomunsing.com/build-your-own-blockchain)
  • Python: 区块链的Python实用入门 (http://adilmoujahid.com/posts/2018/03/intro-blockchain-bitcoin-python/)
  • Python: 让我们构建最小的区块链 (https://medium.com/crypto-currently/lets-build-the-tiniest-blockchain-e70965a248b)
  • Ruby: 逐步编写区块链(手稿书籍版) (https://github.com/yukimotopress/programming-blockchains-step-by-step)
  • Scala: 如何构建一个简单的基于actor的区块链 (https://medium.freecodecamp.org/how-to-build-a-simple-actor-based-blockchain-aac1e996c177)
  • TypeScript: Naivecoin:构建加密货币的教程 (https://lhartikk.github.io/)
  • TypeScript: NaivecoinStake:使用权益证明共识构建加密货币的教程 (https://naivecoinstake.learn.uno/)
  • Rust: 在Rust和Substrate中构建区块链 (https://hackernoon.com/building-a-blockchain-in-rust-and-substrate-a-step-by-step-guide-for-developers-kc223ybp)

构建你自己的机器人

  • Haskell: 自己动手做IRC机器人 (https://wiki.haskell.org/Roll_your_own_IRC_bot)
  • Node.js: 使用API.ai在Node.js中创建简单的Facebook Messenger AI机器人 (https://tutorials.botsfloor.com/creating-a-simple-facebook-messenger-ai-bot-with-api-ai-in-node-js-50ae2fa5c80d)
  • Node.js: 如何制作一个响应式Telegram机器人 (https://www.sohamkamani.com/blog/2016/09/21/making-a-telegram-bot/)
  • Node.js: 创建一个Discord机器人 (https://discordjs.guide/)
  • Node.js: gifbot - 构建一个GitHub应用 (https://blog.scottlogic.com/2017/05/22/gifbot-github-integration.html)
  • Node.js: 使用Web Speech API和Node.js构建简单的AI聊天机器人 (https://www.smashingmagazine.com/2017/08/ai-chatbot-web-speech-api-node-js/)
  • Python: 如何用Python构建你的第一个Slack机器人 (https://www.fullstackpython.com/blog/build-first-slack-bot-python.html)
  • Python: 如何在20分钟内使用Python、Slack Events API和Django构建一个Slack机器人 (https://medium.com/freehunch/how-to-build-a-slack-bot-with-python-using-slack-events-api-django-under-20-minute-code-included-269c3a9bf64e)
  • Python: 构建一个Reddit机器人 (https://pythonforengineers.com/blog/build-a-reddit-bot-part-1/)
  • Python: 如何制作一个Reddit机器人 (https://www.youtube.com/watch?v=krTUf7BpTc0) [视频]
  • Python: 如何使用Python创建一个Telegram机器人 (https://www.freecodecamp.org/news/how-to-create-a-telegram-bot-using-python/)
  • Python: 使用Tweepy在Python中创建Twitter机器人 (https://medium.freecodecamp.org/creating-a-twitter-bot-in-python-with-tweepy-ac524157a607)
  • Python: 使用Python和PRAW创建Reddit机器人 (https://www.youtube.com/playlist?list=PLIFBTFgFpoJ9vmYYlfxRFV6U_XhG-4fpP) [视频]
  • R: 用R构建一个加密货币交易机器人 (https://towardsdatascience.com/build-a-cryptocurrency-trading-bot-with-r-1445c429e1b1)
  • Rust: 用Rust、C或任何其他语言为星际争霸编写机器人 (https://habr.com/en/post/436254/)

构建你自己的命令行工具

  • Go: 用Go可视化你的本地git贡献 (https://flaviocopes.com/go-git-contributions/)
  • Go: 用Go构建一个命令行应用:lolcat (https://flaviocopes.com/go-tutorial-lolcat/)
  • Go: 用Go构建一个CLI命令:cowsay (https://flaviocopes.com/go-tutorial-cowsay/)
  • Go: Go CLI教程:fortune克隆 (https://flaviocopes.com/go-tutorial-fortune/)
  • Nim: 编写一个stow替代方案来管理dotfiles (https://xmonader.github.io/nimdays/day06_nistow.html)
  • Node.js: 用Javascript创建CLI工具 (https://citw.dev/tutorial/create-your-own-cli-tool)
  • Rust: Rust命令行应用 (https://rust-cli.github.io/book/index.html)
  • Rust: 用Rust编写命令行工具 (https://mattgathu.dev/2017/08/29/writing-cli-app-rust.html)
  • Zig: 从零开始用Zig构建你自己的CLI应用 (https://rebuild-x.github.io/docs/#/./zig/terminal/cli)

构建你自己的数据库

  • C: 让我们构建一个简单的数据库 (https://cstack.github.io/db_tutorial/)
  • C++: 从头构建你自己的Redis (https://build-your-own.org/redis)
  • C#: 构建你自己的数据库 (https://www.codeproject.com/Articles/1029838/Build-Your-Own-Database)
  • Clojure: 一个受考古学启发的数据库 (http://aosabook.org/en/500L/an-archaeology-inspired-database.html)
  • Crystal: 为什么你应该构建自己的NoSQL数据库 (https://medium.com/@marceloboeira/why-you-should-build-your-own-nosql-database-9bbba42039f5)
  • Go: 从零构建你自己的数据库:从B+树到SQL,3000行代码 (https://build-your-own.org/database/)
  • Go: 用45个步骤编写数据库:一系列测试驱动的小型编码谜题 (https://trialofcode.org/database/)
  • Go: 从头构建你自己的Redis (https://www.build-redis-from-scratch.dev/)
  • JavaScript: Dagoba:一个内存图数据库 (http://aosabook.org/en/500L/dagoba-an-in-memory-graph-database.html)
  • Python: DBDB:狗床数据库 (http://aosabook.org/en/500L/dbdb-dog-bed-database.html)
  • Python: 用Python编写你自己的微型Redis (http://charlesleifer.com/blog/building-a-simple-redis-server-with-python/)
  • Ruby: 用Ruby构建你自己的快速持久化KV存储 (https://dineshgowda.com/posts/build-your-own-persistent-kv-store/)
  • Rust: 构建你自己的Redis客户端和服务器 (https://tokio.rs/tokio/tutorial/setup)

构建你自己的Docker

  • C: 500行代码实现Linux容器 (https://blog.lizzie.io/linux-containers-in-500-loc.html)
  • Go: 用不到100行Go代码构建你自己的容器 (https://www.infoq.com/articles/build-a-container-golang)
  • Go: 用Go从头构建一个容器 (https://www.youtube.com/watch?v=8fi7uSYlOdc) [视频]
  • Python: 一个关于Linux容器的研讨会:从零重建Docker (https://github.com/Fewbytes/rubber-docker)
  • Python: 一个纯Python编写的Docker模仿概念验证 (https://github.com/tonybaloney/mocker)
  • Shell: 用大约100行bash实现Docker (https://github.com/p8952/bocker)

构建你自己的模拟器/虚拟机

  • C: 自制的字节码解释器 (https://medium.com/bumble-tech/home-grown-bytecode-interpreters-51e12d59b25c)
  • C: C语言虚拟机 (http://web.archive.org/web/20200121100942/https://blog.felixangell.com/virtual-machine-in-c/)
  • C: 编写你自己的虚拟机 (https://justinmeiners.github.io/lc3-vm/)
  • C: 编写一个Game Boy模拟器,Cinoop (https://cturt.github.io/cinoop.html)
  • C++: 如何编写模拟器(CHIP-8解释器) (http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/)
  • C++: 模拟教程(CHIP-8解释器) (http://www.codeslinger.co.uk/pages/projects/chip8.html)
  • C++: 模拟教程(GameBoy模拟器) (http://www.codeslinger.co.uk/pages/projects/gameboy.html)
  • C++: 模拟教程(Master System模拟器) (http://www.codeslinger.co.uk/pages/projects/mastersystem/memory.html)
  • C++: 从零开始的NES模拟器 (https://www.youtube.com/playlist?list=PLrOv9FMX8xJHqMvSGB_9G9nZZ_4IgteYf) [视频]
  • Common Lisp: Common Lisp中的CHIP-8 (http://stevelosh.com/blog/2016/12/chip8-cpu/)
  • JavaScript: JavaScript中的GameBoy模拟 (http://imrannazar.com/GameBoy-Emulation-in-JavaScript)
  • Python: 模拟基础:编写你自己的Chip 8模拟器/解释器 (http://omokute.blogspot.com.br/2012/06/emulation-basics-write-your-own-chip-8.html)
  • Rust: 0dmg:通过构建部分Game Boy模拟器学习Rust (https://jeremybanks.github.io/0dmg/)

构建你自己的前端框架/库

  • JavaScript: WTF is JSX(让我们构建一个JSX渲染器) (https://jasonformat.com/wtf-is-jsx/)
  • JavaScript: 一个DIY指南,构建你自己的React (https://github.com/hexacta/didact)
  • JavaScript: 从零构建React (https://www.youtube.com/watch?v=_MAD4Oly9yg) [视频]
  • JavaScript: Gooact:160行JavaScript实现React (https://medium.com/@sweetpalma/gooact-react-in-160-lines-of-javascript-44e0742ad60f)
  • JavaScript: 通过构建你自己的轻量级React DOM来学习React Reconciler包的工作原理 (https://hackernoon.com/learn-you-some-custom-react-renderers-aed7164a4199)
  • JavaScript: 为自己构建一个Redux (https://zapier.com/engineering/how-to-build-redux/)
  • JavaScript: 让我们编写Redux! (https://www.jamasoftware.com/blog/lets-write-redux/)
  • JavaScript: Redux:

相似文章

使用AI构建网站

Reddit r/AI_Agents

一份免费可下载的参考卡片,涵盖了使用AI工具构建和部署网站的完整流程,从基本原理讲起。