fiber-versioning-boilerplate
fiber-versioning-boilerplate copied to clipboard
A boilerplate for fiber versioning, Clean Architecture, API versioning, API documentation, Data versioning
Fiber Versioning Boilerplate
Prerequisite
Make sure you have the following installed outside the current project directory and available in your GOPATH
Features โจ
- API Versioning
- Data Versioning
- Dynamic Struct Type
- Clean Architecture
- Postman Collections
- API Documentation with swagger
Project structure ๐
api
โโโ adapters
โ โโโ mongo.go
โโโ app.go
โโโ handlers
โ โโโ errors.go
โ โโโ parser_body.go
โ โโโ response.go
โโโ utilities
โ โโโ configuration.go
โ โโโ converter.go
โโโ versions
โโโ v1
โ โโโ entities
โ โโโ factories
โ โโโ repositories
โ โโโ routes
โ โโโ usecases
โโโ v2
โโโ entities
โโโ factories
โโโ repositories
โโโ routes
โโโ usecases
Development environment setup
make setup
Start the application โก๏ธ
make start
Testing ๐งช
make test
Manual ๐๏ธ
Run make help to list available commands:
Choose a command run in fiber-versioning-boilerplate:
setup Initialize project
docker-start Start docker-compose
docker-stop Stop docker-compose
start Start the application
copy-env Copy environment file
gendoc Generate docs api with swagger
test Run tests coverage
mongo-dump Dump MongoDB data for testing
mongo-restore Restore MongoDB data for testing