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 .env
Deploy the application.
make dev
Browse the application at localhost:8080.
Run the migration target with the name of the migration as argument.
make migration create_users_table
make migrate
make rollback
When a migration fails, fix the error and force the version of the failed migration. Then run the migration again.
make force 1
make migrate
make bundle
make watch-css
make watch-ts
make bundle-prod
Run unit tests.
make test
Run integration tests.
make integration
make psql
Provide a service as argument to the restart target.
make restart proxy
make stop
View 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.