A fully-featured REST API developed in Golang for an ebook store.
Check out the TODO.md if you want to have some fun ๐
- Authentication (Sign up, Login and Reset Password)
- Multiple Roles (Customer and Administrator)
- Book Catalog Management
- Order Management
- Pagination
- Order Creation
- File Storage/Retrieval
- Payment Management
- Golang
- Gin
- PostgreSQL
- GORM
- JWT
- Bcrypt
- Wire
- Viper
- Zap
- Stripe
- Amazon S3
- Amazon SES
- Swagger
- Localstack
- Testify
- golangci-lint
This is a high-level technical documentation about how this application is structured. The diagrams follow the C4 model
- SOLID Principles
- Hexagonal Architecture
- Domain Driver Design
- Package by Feature
- Test-Driven-Development
- Execute docker containers
make docker-up
- Execute REST HTTP Server
make start_server
- Open
http://localhost:8080/docs
in your browser
- Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- Execute
lint
target
make lint
Pre-commit hooks are very useful to prevent commits with bad code.
- Install Husky
go install github.com/go-courier/husky/cmd/husky@latest
- Init Husky
husky init
- Execute docker containers
make docker-up
- Clean database and generate seed data
make generate_seed_data
- Install Mockery
go install github.com/vektra/mockery/v2@latest
- Generate Mocks
make generate-mocks
- Install Swaggo
go install github.com/swaggo/swag/cmd/[email protected]
- Generate Docs
make api-docs
- Install wire
go install github.com/google/wire/cmd/wire@latest
- Execute wire
make wire