An API Boilerplate written in Golang with chi-route and Gorm. Write restful API with fast development and developer friendly.
In this project use 3 layer architecture
- Models
- Repository
- Usecase
- Delivery
- CRUD
- Jwt, refresh token saved in redis
- Cached user in redis
- Email verification
- Forget/reset password, send email
chi
: router and middlewareviper
: configurationcobra
: CLI featuresgorm
: ormvalidator
: data validationjwt
: jwt authenticationzap
: loggergomail
: emailhermes
: generate email bodyair
: hot-reload
- Generate the private and public keys: travistidwell.com/jsencrypt/demo/
- Copy the generated private key and visit this Base64 encoding website to convert it to base64
- Copy the base64 encoded key and add it to the
config/config-local.yml
file asjwt
- Similar for public key
- Create mailtrap account
- Create new inboxes
- Update smtp config
config/config-local.yml
file assmtpEmail
docker-compose up
- Swagger: localhost:5000/swagger/
- Traefik
- Config using .env
- Linter
- Jaeger
- Production docker file version
- Mock database using gomock
- github.com/dhax/go-base
- github.com/akmamun/go-fication
- github.com/wpcodevo/golang-fiber-jwt
- github.com/wpcodevo/golang-fiber
- github.com/kienmatu/togo
- github.com/AleksK1NG/Go-Clean-Architecture-REST-API
- github.com/bxcodec/go-clean-arch
- codevoweb.com/golang-and-gorm-user-registration-email-verification/
- codevoweb.com/golang-gorm-postgresql-user-registration-with-refresh-tokens/
- codevoweb.com/how-to-implement-google-oauth2-in-golang/
- codevoweb.com/how-to-upload-single-and-multiple-files-in-golang/
- codevoweb.com/forgot-reset-passwords-in-golang-with-html-email/
- techmaster.vn/posts/34577/kien-truc-sach-voi-golang