A standalone course · Catch up on this repo + interview prep
The "v2" architecture — Hexagonal + CQRS + sqlc
The shape all new code is written in: ports & adapters, commands & queries, and typed SQL — taught on the modules you own, honestly, including where the repo bends the rules.
Your services — conversationmgmt, notification, spike —
were rebuilt on "v2": a hexagonal module (ports & adapters), a
CQRS split of commands and queries, and — in eureka — sqlc to
generate type-safe SQL. This course teaches each pattern from the canon (Cockburn, Fowler,
sqlc, Three Dots Labs), then how this repo actually applies it, landing every idea on a
real file:line in code you own.
Part 1 — Hexagonal: the shape of a v2 module available now
Ports, adapters, the domain layer — and spotting a real leak in your own code.
1 · The v2 map
v1 vs v2, the layers, the pattern matrix, and the naming split across services.
ready2 · Ports & adapters
Cockburn's core idea: interface = port, impl = adapter, and the purity rule.
ready3 · The domain layer & DTO boundary
Pure domain, model vs dto, and the pgtype leak.
4 · Spot the leak
conversationmgmt's core imports infrastructure — read your own hexagon critically.
readyPart 2 — CQRS: commands, queries & the read/write split available now
Separate the write model from the read model — the honest, bus-free version.
5 · CQRS & Fowler's caveat
Write vs read models, and why there's no bus here.
ready6 · Command handlers
The write side: one op per handler, ExecInTx, DB per call.
7 · Queries & the read/write split
Read via sqlc directly; write only through a port.
ready8 · Wiring without a bus
Inline interfaces, the composition root, no mediator.
readyPart 3 — sqlc: typed SQL + the synthesis available now
Borrowing eureka (the only sqlc user) — then putting all three patterns together.
9 · sqlc & this repo's config
Write SQL, generate Go; two mechanisms; the WASM plugin.
ready10 · The Querier & the adapter
Querier injection, constructor-not-literal, the hybrid.
ready11 · sqlc in the hexagon
assessment end-to-end: read direct, write via port.
ready12 · The whole picture
Migration, the module ladder, when sqlc pays — and the recap.
readyReference shelf
Cheat sheet
The module skeleton, the dependency rule, the read/write rule, the sqlc flow.
Glossary
The canonical vocabulary, mapped to interview terms.
Repo v2 map
Ground truth: where each pattern lives, with file:line.
Resources
Cockburn, Fowler, docs.sqlc.dev, Three Dots Labs — high-trust only.