saferwall-api
saferwall-api copied to clipboard
The 🚀 Web APIs for Saferwall.
saferwall web apis

Preface
This repository powers the web service api used in https://saferwall.com.
Vendoring
These packages are used in the project:
- Routing: Echo
- Configuration: viper
- Logging: zap
- Message queuing: nsq
- Authentication jwt
- Database: gocb
- Password Hashing: bcrypt
- Data Validation: validator
Folder Structure
This project follows the Standard Go Project Layout
- build - contains packaging and Continuous Integration files.
- cmd - contains the main function.
- configs - contains configuration file templates or default configs.
- docs - contains design and user documents.
- internal - contains project specific packages with dependencies.
- pkg - contains generic packages without project specific dependencies - these can be safely moved to other projects without internal dependencies.
Improvements compared to the previous implementation
- clean architecture with solid principles.
- Full test coverage
- swagger doc
- Error handling with proper error response generation
- details:
-
File{}
not depending onpeparser
.
-
References
- Standard Package Layout
- How Do You Structure Your Go Apps? by Kat Zień
- https://www.calhoun.io/moving-towards-domain-driven-design-in-go/
- Domain Driven Design in Golang - Strategic Design
- Idiometic Go Web Application Structure
- A clean architecture for Web Application in Go lang
- https://github.com/golang/go/wiki/CodeReviewComments
- https://golang.org/doc/effective_go
- https://peter.bourgon.org/go-best-practices-2016/
- https://www.youtube.com/watch?v=dp1cc6-QKY0