An API Boilerplate written in Golang with chi-route and entgo. 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 featuresentgo
: 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