finds.dev

dhax/go-base

Go RESTful API Boilerplate with JWT Authentication backed by PostgreSQL

View on GitHub

★ 1,687GoMITupdated Jul 2026

// the take

A Go REST API starter with chi routing, PostgreSQL via bun, JWT auth, and a passwordless email login flow. Targets developers who want a working skeleton with real auth wired up, not just a hello-world. Actively maintained — last push yesterday.

The passwordless email login flow is fully implemented and tested, not just stubbed out — that's the hardest part most boilerplates skip. Chi is a good router choice: stdlib-compatible, no magic, easy to reason about. The separation between api/admin and api/app packages makes RBAC boundaries explicit from the start. Docker Compose setup actually works end-to-end including migrations, which saves the usual first-hour friction.

The test coverage is narrow — only the auth/pwdless package has tests, and they're against a mocked store, so the database layer is completely untested. Mixed migration strategy (some .go files, some raw SQL) means you need to understand both approaches before touching the schema. Logrus is past its prime; most new Go projects have moved to slog or zerolog, and you'll want to swap it out before long. No rate limiting or brute-force protection on the auth endpoints despite them being the most obvious attack surface.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,687
Forks
240
Language
Go
License
MIT
Last commit
7 Jul 2026

// nearby

If go-base isn't quite it.

All repos →