I opted out to overengineering this project in order to demonstrate some concepts and technologies. In order to do that, I followed some good practices, such as: Clean Architecture and SOLID principles
- One currency will be supported: USD
- Three coins will be supported: BTC, ETH, BNB
- Each job execution will notify the user about the price change
- for run application asap you can use docker-compose, as the images have already been built and uploaded to docker hub:
make docker_compose
- for build the application:
make docker_build
📦price-alert-service
┣ 📂cmd
┃ ┣ 📂grpc
┃ ┃ ┣ 📂handler
┃ ┃ ┣ 📂pb
┃ ┃ ┣ 📂proto
┃ ┣ 📂rest
┃ ┃ ┣ 📂handler
┃ ┃ ┣ 📂presenter
┃ ┃ ┗ 📜api.go
┃ ┗ 📜main.go
┣ 📂docs
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂config
┃ ┃ ┣ 📂db
┃ ┃ ┗ 📂repository
┣ 📂migrations
📦price-alert-job
┣ 📂cmd
┃ ┣ 📂app
┃ ┃ ┗ 📜app.go
┃ ┗ 📜main.go
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂alert-service
┃ ┃ ┣ 📂config
┃ ┃ ┣ 📂crypto-compare
┃ ┃ ┣ 📂kafka
┃ ┃ ┗ 📂notification-broker
📦notification-service
┣ 📂cmd
┃ ┣ 📂app
┃ ┃ ┣ 📜app.go
┃ ┗ 📜main.go
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂config
┃ ┃ ┗ 📂gomail-email-service
- golangci-lint
- unit testing
- Implement DLQ (Dead Letter Queue)
- Finish graceful shutdown implementation
- Implement better api error treatment
- Implement better test coverage
- Make documentation available
- To be production ready, must follow 12-factor app, such as:
- separate codebase (the three projects)
- create script for database migration
- change the price alert job to be as a one-time execution, using kubernetes job scheduler as an example