A Go + HTMX internal portal for a fictional growing robot-manufacturing company. The processes haven't caught up with the growth — AI to the rescue. Four phases, each adding one AI-assisted capability.
- Go 1.24+ (
go versionto check) make dev— hot-reload dev server via air at http://localhost:8080make build && make run— plain build + run- SQLite DB (
robotfactory.db) is created and seeded automatically on first run — delete it to reset seed data.
cp .env.example .env
# edit .env, add the keys you need for the phase you're on (see below)
make devEach phase starts from a git tag with the relevant TODO(s) left in
handlers.go, and has a reference solution on a branch. If you get stuck,
diff against or check out the finish branch — you can't break anything
permanently.
| Phase | What you build | Starting point | Reference solution | Needs |
|---|---|---|---|---|
| 1 | Get it running, small UI tweaks | git checkout v1-start (= initial commit) |
— (there's nothing to "finish", just get comfortable in the codebase) | nothing |
| 2 | Read parts data from an uploaded image (BOM import) | git checkout v2-start |
origin/v2-finish |
ANTHROPIC_API_KEY |
| 3 | Shopping list calculator for N robots (with packaging logic) | git checkout v3-start |
origin/v3-finish |
nothing |
| 4 (bonus) | Generate product photos from descriptions | git checkout v4-start (= current main) |
origin/v4-finish |
GOOGLE-NANO-BANANA (free-tier Gemini key, see below) |
main currently sits at v4-start — i.e. phases 1–3 are open TODOs and
phase 4 is the bonus/stretch TODO. Look for TODO comments in
handlers.go — that's the exact scope of what to implement per phase.
To peek at a reference solution without losing your work:
git diff origin/v2-finish -- handlers.go
git show origin/v2-finish:claude.goTo reset a specific phase's starting point if you get stuck:
git checkout v2-start -- handlers.go # just that file
# or, to reset everything to that savepoint:
git checkout v2-start .docs/parts-list.html is a mock scanned parts document. A pre-rendered
screenshot is at docs/parts-list.png — upload that on the BOM page to test
your Claude Vision extraction. (If you want a different one, open the
.html file in a browser and screenshot it yourself.)
ANTHROPIC_API_KEY(phase 2, Claude Vision BOM extraction) — console.anthropic.com. This is the only key required for the core session.GOOGLE-NANO-BANANA(phase 4, bonus image generation) — a Google Gemini API key. Get a free one at aistudio.google.com — no credit card required, rate-limited free tier. Optional; the core session (phases 1–3) doesn't need it. Note the unusual env var name (GOOGLE-NANO-BANANA, with hyphens) — it's read literally viaos.Getenv("GOOGLE-NANO-BANANA")inimagegen.goon thev4-finishbranch.
Go 1.24, net/http + html/template, HTMX (CDN, no build step), SQLite
(mattn/go-sqlite3), hot reload via air.