frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Bffgen – A Go CLI to generate secure Back end-for-Front end APIs

https://github.com/RichGod93/bffgen
2•richgodusen•3h ago
I’ve been experimenting with ways to reduce boilerplate when wiring up multiple backends for frontend projects. The Backend-for-Frontend (BFF) pattern is a common approach, but most solutions I found were either too heavy or tied to specific platforms.

I wrote a small CLI in Go called bffgen:

scaffolds a BFF service with chi, echo, or fiber

sets up CORS, JWT, Redis, and session management by default

supports route templates for aggregation

now includes a bffgen.yaml config so defaults persist across runs