geektutu/7days-golang: Building Gee, GeeCache, GeeORM and GeeRPC from Scratch
7 days of Go programs from scratch: a web framework (Gee), a distributed cache (GeeCache), an ORM framework (GeeORM), an RPC framework (GeeRPC), and more.
At a glance
- What is it?
- A seven-day-per-project tutorial repository that builds a gin-like web framework, a groupcache-like distributed cache, an xorm-like ORM and a net/rpc-based RPC framework in Go, with a separate code directory for each day. It is teaching material, not a library you import.
- Who is it for?
- Adopt it if you learn Go by writing the thing yourself and want a guided path from http.Handler to consistent hashing, transactions and a registry. Do not adopt it if you need a maintained library to ship: Gee, GeeCache, GeeORM and GeeRPC are teaching artifacts, and the README presents them as imitations of gin, groupcache, gorm and xorm.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 70 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- geektutu/7days-golang17,037 ★ · +21
| Repository | 2026-09-21 | 2026-11-14 |
|---|---|---|
| geektutu/7days-golang | 17k | 17k |
21 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What 7days-golang actually is, and who the seven-day format is for
The repository is a collection of from-scratch Go implementations, each split into seven daily steps. Four tracks are documented in the README: Gee, described as a gin-like web framework; GeeCache, described as a groupcache-like distributed cache; GeeORM, an object relational mapping library whose interface design references xorm with some implementation details from gorm-v1; and GeeRPC, built on the standard library net/rpc and described as roughly 1k lines with protocol exchange, service registration and discovery, and load balancing added. There is also a demo-wasm directory with four WebAssembly examples and a gee-bolt entry in the repository root.
The audience is narrow and the format is deliberate. Each day pairs an article on geektutu.com with a code directory, so the unit of work is one concept: the http.Handler interface on day one of Gee, LRU eviction on day one of GeeCache, database/sql on day one of GeeORM. If you want a library to import, this is the wrong shape. If you want to understand why a router uses a trie, or how singleflight stops cache breakdown, the day-by-day split is the point.
How the Gee, GeeCache, GeeORM and GeeRPC tracks are structured
Each track is a directory tree with one subdirectory per day, and the code accumulates rather than branching. In gee-web, day1-http-base is followed by day2-context, day3-router, day4-group, day5-middleware, day6-template and day7-panic-recover. In gee-cache the sequence runs from day1-lru through day2-single-node, day3-http-server, day4-consistent-hash, day5-multi-nodes, day6-single-flight and day7-proto-buf. gee-orm moves from day1-database-sql to day7-migrate. gee-rpc ends at day7-registry.
That layout means you can read day N and diff it against day N-1 to see exactly what changed, which is the real teaching mechanism. The README does not describe a shared module path or a single importable package across the days, so treat each directory as a self-contained snapshot. GeeRPC is the one track with a stated size: about 1k lines. The others have no line count in the README, and there is no benchmark data, no throughput figure and no release history in the repository, so any performance comparison between Gee and gin would be invented.
Installing the repo and running your first day
There is no install command for the project as a whole, because it is not published as a module you pull in. You clone the repository and run a day directory. The README links each day to its own code path, for example gee-web/day3-router for the trie router and gee-cache/day1-lru for the LRU cache.
Start by cloning and entering the web framework track:
git clone https://github.com/geektutu/7days-golang.git
cd 7days-golang/gee-web/day3-routerThe README does not list a required Go version or how to run each day, so read the files inside the directory you pick and the matching article before running anything.
Where the tutorial approach stops being useful
The clearest limitation is that none of these are drop-in replacements for the libraries they imitate. Gee is gin-like, GeeCache is groupcache-like, GeeORM is gorm-like and xorm-like, and GeeRPC is built on net/rpc. The README frames them as imitations, and the GeeRPC description gives the scale: about 1k lines. A framework that fits in a tutorial cannot carry the edge cases, the option surface or the compatibility guarantees of the project it models.
The second limitation is maintenance shape. The last push was on 2026-09-05, and the repository is not archived, but the repository has no published GitHub releases, so there is no versioned artifact to pin. If you copy a day directory into a real service, you own it from that moment. The README does not document rollback, deprecation or upgrade paths between days, because days are not versions. Use this when the goal is understanding; reach for gin, groupcache, gorm or xorm when the goal is shipping.
Gee versus gin, GeeCache versus groupcache: the difference in approach
The honest alternative is the library each track imitates, and the difference is not just completeness. gin is a general-purpose web framework with a mature middleware ecosystem; Gee builds a context, a trie router, groups, middleware, HTML templates and panic recovery across seven days so you can see how those pieces fit together. You would pick gin to build a service and Gee to learn what gin is doing underneath.
The same split holds for GeeCache against groupcache. GeeCache walks through LRU eviction, a single-machine concurrent cache, an HTTP server, consistent hashing, multi-node communication, singleflight against cache breakdown, and Protobuf as the exchange type. groupcache is the production-shaped version of that idea. GeeORM sits between gorm and xorm by design: the README states that xorm's design is easier to understand than gorm-v1, so the interface follows xorm while some details follow gorm. If your reason for reading is to choose an ORM for a real schema, read gorm and xorm documentation instead; if your reason is to understand chain operations, hooks, transactions and migration, GeeORM shows the machinery.
Licence and the cost of tracking the repository
The repository is MIT licensed, which permits reuse with attribution and without a copyleft obligation, but this is a description of the licence identifier and not legal advice. If you copy a day directory into a product, keep the licence text and the copyright notice with it.
Upgrade cost is the more practical question, and the answer follows from the layout. There is nothing to upgrade: the repository has no published GitHub releases, and the units are day directories, not versions. Pulling the latest master gives you newer tutorial code, not a bug-fix line you can track. The last push was on 2026-09-05, so the repository has moved recently, but movement in a tutorial repo means the explanation changed, not that an API was stabilised. Budget for reading the diff, not for a dependency bump.
Editorial conclusion
Adopt it if you learn Go by writing the thing yourself and want a guided path from http.Handler to consistent hashing, transactions and a registry. Do not adopt it if you need a maintained library to ship: Gee, GeeCache, GeeORM and GeeRPC are teaching artifacts, and the README presents them as imitations of gin, groupcache, gorm and xorm. Before you start, open one day directory such as gee-web/day3-router and check that the code matches the article you are reading, because each day is a snapshot rather than a continuously updated package.
Frequently asked questions
What is geektutu/7days-golang used for?
It is a set of from-scratch Go implementations split into seven daily steps: Gee, a gin-like web framework; GeeCache, a groupcache-like distributed cache; GeeORM, a gorm-like and xorm-like ORM; and GeeRPC, built on net/rpc with service registration and load balancing. Each day pairs an article with a code directory. It is for learning how these systems work, not for importing into production.
Is 7days-golang a library I can install with go get?
No. The README presents each track as a sequence of day directories, for example gee-web/day3-router and gee-cache/day1-lru, and does not describe a published module to import. You clone the repository and run a day directory. The README does not list a required Go version or module path, so check the files inside the directory you choose.
How is GeeORM different from gorm and xorm?
The README states that GeeORM's interface design mainly references xorm, because xorm's design is easier to understand than gorm-v1, while some implementation details reference gorm. It is built up over seven days from database/sql through schema mapping, save and query, chain operations, hooks, transactions and migration. It is a teaching implementation, not a replacement for either library.
What does GeeCache cover across its seven days?
The README lists LRU caching strategy, a single-machine concurrent cache, an HTTP server, consistent hashing, communication between distributed nodes, cache breakdown with single flight, and Protobuf as the RPC data exchange type. GeeCache is described as groupcache-like. The README gives no benchmark numbers for it.
What is the licence of geektutu/7days-golang?
The repository is MIT licensed, and the README links to the MIT licence text. That permits reuse with attribution and without a copyleft obligation, though this is a description of the licence identifier rather than legal advice. Keep the licence and copyright notice if you copy a day directory into your own code.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/geektutu-7days-golang)Star history chart for your README
[](https://hysenlabs.com/projects/geektutu-7days-golang)Was this useful?