
BuildingGonet/httpPostgreSQL+4 more
Go HTTP Backend from Scratch
A production-style HTTP backend built using Go’s net/http, PostgreSQL, SQLC, and JWT to understand routing, middleware, authentication, and database design without frameworks.
Timeline
January 2026
Role
Backend Engineer
Team
Solo
Status
BuildingTechnology Stack
Go
net/http
PostgreSQL
pgx / pgxpool
SQLC
JWT
HTTP Cookies
Key Challenges
- Designing routing and middleware without a web framework
- Structuring a Go backend for long-term maintainability
- Managing SQL migrations separately from application queries
- Implementing secure cookie-based JWT authentication
- Avoiding type-safety issues between JWT claims, context, and database types
- Understanding pgx, pgtype.UUID, and SQLC generated code
Key Learnings
- How Go’s net/http server actually handles requests
- How middleware chaining works using http.Handler
- How JWT signing and verification works under the hood
- How to safely pass request-scoped data using context.Context
- How SQLC enforces compile-time safety for SQL queries
- How to design a backend without ORMs or heavy abstractions