▲ 8 ▼ Alloy - Boilerplate for building web applications with Go
I've been working on my first non-trivial project using Golang. I've extracted this starter template from that project. This does not aim to be a web framework but is instead a collection of useful libraries and packages that you can use as a base to build on top of.
A quick rundown of the major packages used -
- go-chi/chi (routing)
- lib/pq, jmoiron/sqlx, markbates/pop/nulls, pressly/goose (database)
- gorilla/sessions, gorilla/csrf, gorilla/securecookies (login/signup)
- markbates/refresh (recompile app on file change)
- microcosm-cc/bluemonday (display HTML)
- pressly/douceur, gomail (sending emails)
- pkg/errors, satori/go.uuid, spf13/cobra
Let me know what you guys think.
Register to comment or vote on this story
Interesting approach, it sounds very like the approach used to generate resources for this website. I wouldn't shy away from calling it a framework, or from rewriting some libraries yourself. The downside with an agglomeration of libs/packages is that they gradually drift out of sync with each other and require vigilant updates, the upside is of course that you don't have to maintain them. There is some value I think in having examples of how to put all this together, and being able to quickly add new resources to your sites with templates.
Seems to be a lot of people inventing the same thing for Go, because if you're not writing simple services you need all these tools to build a website - there is definitely a gap for a web framework here.