This project implements a cryptocurrency price monitor application that covers various cloud computing concepts. Users can subscribe to receive email alerts when the price of a cryptocurrency they have subscribed to exceeds a specified percentage change. They can also retrieve a history of price changes for any cryptocurrency.
The application consists of two main services, Bepa and Peyk, and a MySQL database to store cryptocurrency prices and user subscriptions. Here is a more detailed description of the services:
Coinnews (External API)
This service provides fake cryptocurrency data for testing purposes. It has three endpoints for retrieving the list of active cryptocurrencies, their current prices, and their price history. The full description of this service can be found here.Bepa
This service runs every 3 minutes (by a CronJob) and performs two key functions:- Price Fetching: It sends requests to the Coinnews API to retrieve the latest cryptocurrency prices and writes the data to the database table.
- Alerting: It calculates the percentage change for each cryptocurrency against the last recorded price and checks if any user subscription triggers an alert based on the configured percentage threshold. If an alert is triggered, the service sends an email notification to the subscribed user using the Mailgun service.
Peyk
This service provides two endpoints:- Price: Returns the price history of a cryptocurrency.
- Subscribe: Allows users to subscribe to price changes for a specific cryptocurrency. It requires the user's email, the cryptocurrency's name, and the desired percentage change threshold.
All components of this application, including services, database, and user interface, are containerized using Docker.