Inspired from go-starter-kit This project is a go starter kit / golang boilerplate that uses the golang standards project layout. It builds a foundation for golang API using packages gin webframework, gorm, postgres and jwt-go for Authentication.
- Routing using gin
- Request Validation
- Filtering / Pagination / Ordering
- Authentication using jwt-go
- Crash Alerts via email using gomail
- Logging
- Error Handling
- Dockerfile
- Makefile
- Linter
- Golang
- Postgres
- Docker
Clone the repo use env.sample file to set env variables
Start postgres and docker at your machine then run
make start
This will automatically build docker image of this project (if it does not exist already) and run it at port 4000
To only build first
make build
then run
make run
You can check for other targets/commands in Makefile.
You can also run this without docker using
go build -o bin/
This will create a binary named go-starter-kit
in newly created bin
directory
Run it
./bin/go-starter-kit
Feel free to contribute to this project.
Please follow conventional-commits pattern when contributing.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]