A sample cli project showcasing how to use transaction with clean & readable code in hexagonal architecture
- Clone the repository
git clone git@github.com:William9923/clean-architecture.git
- Setup mysql infrastructure (use docker!)
sh ./scripts/mysql/run-local
-
Import the Postman collection in
.api
folder -
Run the Proof of Concept Code (Transfer from user 1 to user 2 for 20000)
go run cmd/cli/main.go -from 1 -to 2 -amount 20000
- To stop the infrastructure
sh ./scripts/mysql/stop-local
- Golang minimum v1.17 (https://golang.org/doc/install)
- Go Modules (https://blog.golang.org/using-go-modules)
If you feel that this repo have helped you provide more example on learning software engineering, then it is enough for me! Wanna contribute more? Please ⭐ this repo so other can see it too!