A template to scaffold a fullstack go web application.
- Standard Go Project Layout
- Postgresql database using database/sql with pgx driver
- Router based on net/http ServeMux
- HTML templating using html/template
- Typescript support out-of-the-box
- Toolkit that makes common tasks easier
- Database migrations
- Hot reloading during development
- nginx as web server and reverse proxy configured for high-performance
- Docker deployment
- Go version 1.22 or higher
- Docker
Rename .env.example to .env.
mv .env.example .envDeploy the application.
make devBrowse the application at localhost:8080.
Run the migration target with the name of the migration as argument.
make migration create_users_tablemake migratemake rollbackWhen a migration fails, fix the error and force the version of the failed migration. Then run the migration again.
make force 1
make migratemake bundlemake watch-cssmake watch-tsmake bundle-prodRun unit tests.
make testRun integration tests.
make integrationmake psqlProvide a service as argument to the restart target.
make restart proxymake stopView the usage information by running make.
make- Health endpoint
- Login with email and password
- Email verification
- Secure Cookie Session Management
- Login with Google (OAuth2)
- Authorization
- Audit logs
- Database query caching
- Environment Page (go version, drivers, env, os kernel, etc.)
- Cache busting for assets
This project comes with a golangci-lint config file. Just install golangci-lint and enable it as the default linter on your editor of choice.
This project is distributed under the MIT License. See LICENSE for more details.