This is a template application I use frequently to spin simple applications up quickly. The stack is essentially:
The golang backend implements the twirp API server and also serves static FE files (index.html, css, js, etc). The protocol buffer API definition generates both go code for the server implementation and the client-side typescript code the frontend to use. The sqlite db is replicated to S3 (in production) by litestream.
TODO
git clone https://github.com/cameront/go-svelte-sqlite-template [your_directory]
./scripts/one_time_setup.sh
(source env_dev.sh && air)
pushd _ui && npm run dev
Rename the "count" service to the name of the service ([servicename]) you want to build.
mv rpc/count/countservice.proto rpc/[servicename]/[servicename]service.proto
mv rpc/count -> rpc/[servicename]
rm -rf rpc/count