Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/micheltank/crypto-price-alert
An application to monitoring cryptocurrency price changes by email
https://github.com/micheltank/crypto-price-alert
clean-architecture cryptocurrency gin-gonic grpc kafka rest
Last synced: 4 months ago
JSON representation
An application to monitoring cryptocurrency price changes by email
- Host: GitHub
- URL: https://github.com/micheltank/crypto-price-alert
- Owner: micheltank
- Created: 2021-07-12T03:10:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T01:01:28.000Z (over 3 years ago)
- Last Synced: 2024-10-01T09:06:38.169Z (4 months ago)
- Topics: clean-architecture, cryptocurrency, gin-gonic, grpc, kafka, rest
- Language: Go
- Homepage:
- Size: 79.1 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crypto Price Alert
Application diagram:
![](diagram.png "Diagram")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
# Assumptions
- 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## Running
- for run application asap you can use docker-compose, as the images have already been built and uploaded to docker hub:
```shell
make docker_compose
```- for build the application:
```shell
make docker_build
```## Project's structure
```shell script
📦price-alert-service
┣ 📂cmd
┃ ┣ 📂grpc
┃ ┃ ┣ 📂handler
┃ ┃ ┣ 📂pb
┃ ┃ ┣ 📂proto
┃ ┣ 📂rest
┃ ┃ ┣ 📂handler
┃ ┃ ┣ 📂presenter
┃ ┃ ┗ 📜api.go
┃ ┗ 📜main.go
┣ 📂docs
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂config
┃ ┃ ┣ 📂db
┃ ┃ ┗ 📂repository
┣ 📂migrations
``````shell script
📦price-alert-job
┣ 📂cmd
┃ ┣ 📂app
┃ ┃ ┗ 📜app.go
┃ ┗ 📜main.go
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂alert-service
┃ ┃ ┣ 📂config
┃ ┃ ┣ 📂crypto-compare
┃ ┃ ┣ 📂kafka
┃ ┃ ┗ 📂notification-broker
``````shell script
📦notification-service
┣ 📂cmd
┃ ┣ 📂app
┃ ┃ ┣ 📜app.go
┃ ┗ 📜main.go
┣ 📂internal
┃ ┣ 📂application
┃ ┣ 📂domain
┃ ┗ 📂infra
┃ ┃ ┣ 📂config
┃ ┃ ┗ 📂gomail-email-service
```## Code quality
- golangci-lint
- unit testing## TODO's
- 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