~ trip2g
← home
star us on github
answer first
the bottom line · 2025–2026

Hand-built 5%. Agents and codegen did the rest.

One backend developer. Telegram integration, billing, vector search, federation, multi-tenancy — eighteen months full-time. Combat code (Go-prod + TS + SQL, no tests) is 128k loc. Of that, the founder hand-typed ~6.4k — just the parts where architecture, contracts, and trade-offs compound. Claude Code drafted the rest under review; gqlgen + sqlc + moq added another 139k for free — static code after codegen, not runtime reflection. One person, ×54 leverage across 177k of owned code.

human multiplier
×54

177k owned code  ÷  6.4k typed by hand

supporting evidence · headline numbers read left-to-right · most important first
own code
177k loc

Hand-written across Go, TypeScript, SQL. 15 months of keystrokes.

codegen
139k loc

From schema / queries / interfaces. Never edited by hand.

vendor
190k loc

Tiptap bundle + legacy Milkdown. Not ours to refactor.

cadence
1,615

Commits over 15 months. ≈ 108/month · 3.6/day.

situation → answer why this matters to a solo backend
situation

Solo backend, growing surface area.

Obsidian publishing platform with Telegram bot, billing, vector search, federation, multi-tenancy. One backend dev.

complication

Type-safety can't slow shipping.

Hand-writing GraphQL resolvers, SQL bindings, and mocks would eat half the calendar.

question

How do we stay typed without paying the cost?

Where can a codegen contract replace hand-written glue without losing safety?

answer

Three contracts, three generators.

Schema → gqlgen. Queries → sqlc. Interfaces → moq. 139k loc emerges for free.

what the codebase is hired to do four jobs · one runtime
01

AI-native CMS.

Forms, templates, markdown base. A content layer designed from day one to be readable by agents, not just humans.

02

Second brain for agents.

Notes, sources, links — served as a queryable graph an LLM can walk, not just read.

03

Knowledge network.

Federated meshes: hubs publish, peers subscribe, agents stitch the pieces back together.

04

External RAG.

A retrieval surface other agents can call. Your context, on tap, with provenance.

stack notes · why these tools opinions from Alexey Yurchenko, founder
gqlgen

Reads what you write — adjusts codegen.

Schema-first: missing field → resolver appears immediately. These details flow smoothly into the process. 139k loc for free.

graphql

"Just a good contract between front and back."

Not magic. Not religion. A type-safe interface both sides agree on — that's the whole pitch.

$mol

A dark horse that handles 40 CRUD pages.

Reactive, no virtual DOM. Claude Code picks up the pattern from examples and keeps going confidently. 41k loc, still fast.

sqlite + litestream

"Data on S3 with a hot cache."

Local SQLite for speed, continuous replication to S3 for durability. Embedded DB, cloud durability.

built to last · not a weekend prototype vibe-coded code is fragile · this isn't
why this isn't a vibe-coding demo

Half of what you see here, you could
vibe-code in a weekend. The other half
is what survives the second month.

Vibe-coded code is fragile: it ships fast and breaks on the third edge case. This codebase has been pounded on for over a year — by paying users, by Claude, by tests, by every refactor. The 2.53× test ratio, the 120 forward-only migrations, the typed glue from schema.sql to UI — that's not decoration. It's the difference between a prototype and a markdown-based rock.

the rock test
15months

1,615 commits of refactors, regressions, and real users. 2.53× test ratio against production Go. 120 migrations, all forward-only. Litestream to S3 so the data outlives the box.

human multiplier · the math how one human ships 177k of owned code
human
ai + tooling
total
typed by hand
6.4k loc

5% of combat code. Architecture, contracts, the parts where a wrong call costs a month.

claude-drafted
121.7k loc

95% of combat code. Drafted under review. Reads like a junior with infinite patience and zero opinions.

generated
139k loc

From schema.graphql, schema.sql, Go interfaces. Free — if the contract is right.

leverage
×54

177k owned (own + codegen) ÷ 6.4k human-typed. Per-line.

stack composition where the 177k lives · by language
Go · teststable-driven
81,000
81k
TypeScript · $molfrontend
41,000
41k
Go · productionruntime · ≈5× human
32,000
32k
SQL · queriesread · write
2,600
2,600
SQL · migrations120 files
2,500
2,500
tests vs production · go side 200-cell waffle · each cell ≈ 565 loc
production

32k
the runtime.

Handlers, services, GraphQL resolvers, jobs, the bot, billing — the code that ships.

tests · 2.53×

81k
the safety net.

Table-driven unit tests, integration against real SQLite, GraphQL snapshots. The ratio is what makes refactors cheap.

sql in three parts 120 migration files · sqlc-typed queries
migrations
2,500loc

120 files, one per schema change. Forward-only, append-only, append-faster.

reads
1,476loc

SELECTs feeding GraphQL. sqlc emits typed Go functions from these.

writes
1,159loc

INSERT / UPDATE / DELETE. Transactional where it matters, idempotent where it counts.

codegen · detail 139k generated · 134 files
multiplier · detail

32k hand-written.
139k auto-generated.
×4.3 leverage.

We describe the contract once — schema.graphql, schema.sql, a Go interface — and the toolchain emits typed glue all the way to the call site. That ratio is the entire reason these tools exist.

gqlgengraphql → go
~78,000
56%
sqlcsql → go
~43,000
31%
moqiface → mocks
~18,000
13%
total · everything in the repo 506k loc · own 35.0% · gen 27.5% · vendor 37.6%
OWN · 177K
CODEGEN · 139K
VENDOR · 190K
own
177k

35.0% · 15 months of hand-written code.

codegen
139k

27.5% · derived from contracts. Free.

vendor
190k

37.6% · Tiptap bundle + legacy Milkdown.

total
506k

100% · what the linter sees.

cadence · 1,615 commits over 15 months avg 108/mo · 3.6/day · peak m06 · 140
takeaways · what the numbers say read these three · forget the rest
01

5% typed by hand. 95% drafted or generated.

Founder types ~6.4k of combat code (architecture + tricky parts). Claude drafts 121.7k under review. Codegen adds 139k. ×54 leverage on 177k owned.

02

One binary. Boots in seconds.

Go monolith + embedded SQLite + Litestream to S3. No orchestration, no migrations dance, no cold-start ceremony — just ./trip2g.

03

Vertical scale. Decentralized by protocol.

SQLite doesn't shard easily — but the protocol is federated. One node handles thousands of req/s; thousands of nodes form the mesh.

read more · related articles go deeper on the patterns behind these numbers
anatomy

Anatomy of trip2g: 15 months of code

A deep-dive into how the codebase grew: what shipped first, what got refactored, and what we'd do differently.

read →
architecture

The Env Pattern: One IO Spine, Portable Business Logic

How a single interface keeps every use case testable, portable, and free from framework lock-in.

read →
support · if any of this was useful it costs you one click
open source · MIT

Built this in the open.
A star goes a long way.

trip2g is an open-source publishing platform. If you read this far, the easiest way to help is a star — it signals the project to other devs and keeps the work going.

one click · zero cost star on github

github.com/trip2g · MIT