- OpenAPI API spec and using https://github.com/oapi-codegen/oapi-codegen/ to generate the types, server interface, and client library
- Standard library http package for the API server implementation
- Standard library template/html package for generating the dynamic parts of the webpage content
- Static web content is embedded within the Go binary (https://pkg.go.dev/embed) and served through server routes
- api served from /api route, htmx webpage served from /
- no ORM, mostly using standard library database/sql package for DB transactions, maybe reaching for a query builder library for more complex queries like complex search functionality
- Local S3 compatible object store for dynamic binary data like user-uploaded images and video. Local filesystem can be fine for small scale stuff.
For my home server I have authn/authz happening at the OS/infra layer, but if you need multitenancy you can pretty easily integrate an OAuth/OpenID authn/authz middleware for login with Google or whatever.
https://github.com/gsxhq/gsxui
https://github.com/jackielii/structpages is what I might call a framework that GSX sits nicely in.
Also one ai haven't tried: Templ.
That's great but I believe it's still over-engineered. Unless it's a web site that can tolerate no downtime at all during schema updates, SQLite in WAL2 mode is more than enough. Moreover, in Postgres version upgrades can't be done without significant downtime (or setting up replication and performing a complex dance), so even that isn't so cut and dry.
</ ... >
Postgres version upgrades are basically painless, at my workplace our upgrades complete in so little time our users don't notice, and we have more data than probably 99.9999% of companies out there (mature company in aerospace industry).
Version upgrades for SQLite are basically a no-op though, that's kinda one of the reasons why it's so great to run in production (and deployment a maintenance being mostly a no-op as well, apart from setting up backups I guess).
I don't actually suggest that everyone should run their production on SQLite, but it's genuinely worth considering especially for small-ish projects.
The difference is only in the deployment/maintenance.
And considering the context he stated, zero downtime really doesn't seem like something he's worrying about.
I personally find Postgres WAY easier than SQLite simply because of the deployment story. I do a lot of hotfixes and dangerous stuff on personal projects, and having two databases complicates that tremendously. I like being able to run hot code on prod.
For the record, this is not the same reason I like postgres for actual production code