Go System Design: Build a Social Network Backend
Murmur: a Twitter-style social network, built to learn system design by building it. A Go backend that is
measured, broken and fixed one wall at a time, and then a React web app on top of it. The code from the YouTube
course Go System Design Full Course: Build a Social Network Backend From Scratch. Every line was typed on
camera and every decision is explained in the videos.
- ▶ The course on YouTube: link coming soon
- ▶ In chapters, with your progress saved: link coming soon
Follow along: one branch per episode
Each episode ends with a commit, and each episode has its own branch holding the code as it is at the end of that
episode. To start an episode where the video starts, check out the previous episode's branch:
git clone https://github.com/dev-marker/murmur.git
cd murmur
git checkout ep01 # the code at the end of episode 1, where episode 2 begins
main holds the latest episode plus this README.
The Go module is named github.com/fiston-user/murmur, as typed in the videos. It's only a name: everything builds
and runs from this clone as is.
Episodes 1 to 16 are the backend. Episodes 17 and 18 add what a client needs from the API, and 19 to 26 build the
web app in web/ and put it behind nginx.
The system
Run it
You need Docker and make. Go 1.26 is needed for make seed, make run and make test, and Node.js with npm for
the web app (the course used Node 26).
make up && make seed # the whole system, and 100,000 users with a realistic follow graph
make web # build the web app into web/dist, served on http://localhost:8088
In that order: until make web has run, port 8088 answers 404. Sign in with a seeded key, seed-token-N for
userN (try seed-token-16726, a quiet account), or create an account.
make test # the Go tests (needs make up)
make load S=feed # a k6 load test, run in Docker
make web-dev # the web app with hot reload, on http://localhost:5173
make down # stop everything (the data stays in its volume)
The Makefile has a comment above every target, and web/README.md explains how the web app is
organised and why.
Older branches run with less: on the first episodes make up starts only Postgres and make run starts the API on
http://localhost:8081. Redis arrives in episode 4, the worker in episode 6, and from episode 14 everything runs in
Docker Compose behind nginx.
License
MIT, see LICENSE.