01 · Web · Scale · Tool
Go + Postgres + React
A compiled backend with one binary to deploy, a React frontend built to static assets, and a contract generated from the Go handlers.
Agent fit4/5 Scale · Run it for many Reviewed
The stack
- Framework
- React (Vite) frontend
- Runtime
- Go HTTP service (chi or Echo)
- Data
- Postgres via sqlc, Redis if you need it
- Auth
- OIDC, sessions in Postgres
- Hosting
- Single binary in a container, static assets on a CDN
- Also
-
- OpenAPI from the Go handlers, TypeScript client generated from it
- sqlc for typed queries from SQL
- Structured logging and pprof endpoints
Why agents do well here
4/5- Go's small language and strong formatting conventions mean agent-written code looks like the code around it, which matters when many people review it.
- sqlc turns SQL files into typed functions, so the agent writes plain SQL and the compiler checks the result.
- The compiler is a second reviewer; most of the mistakes an agent makes in dynamic languages do not build here.
Avoid at this tier
- Generics-heavy frameworks and dependency-injection containers; keep Go boring.
- ORMs that hide the SQL; sqlc keeps it visible.
- Serving the frontend from the Go binary in production; use a CDN.
How it fits together
A tool at scale is often an internal platform with many users and strict uptime. Go gives one binary, predictable performance and a compiler that catches what tests miss. The React frontend stays a static SPA that talks to the generated client.
Folder layout
cmd/server/ main.go
internal/ <domain>/ {handler.go, service.go, queries.sql, handler_test.go}
db/ migrations/, sqlc.yaml
web/ Vite + React, src/api/ generated from OpenAPI First five decisions
Lock these in before the agent writes the second feature. Each one removes a choice it would otherwise make differently every time.
- 01 Chi or Echo with no framework magic
- 02 Sqlc for every query
- 03 OpenAPI generated from handlers
- 04 Migrations with a single tool
- 05 Integration tests against a real Postgres in CI
When to move on
This is the top tier. From here the work is keeping the boundaries explicit, not changing the stack. The Web Scale page lists what stays the same.