AlertWave is a real-time stock market price alert system that allows users to subscribe to stock alerts and receive periodic notifications based on their preferences.
- Architecture Overview
- Working Demo
- Prerequisites
- Installation
- API Documentation
- Usage
- Contributing
- License
- Acknowledgments
The AlertWave system is built on a microservices architecture, providing modularity and scalability. Here's an overview of the key components:
-
API Gateway:
- The API Gateway handles incoming requests and redirects them to the appropriate microservices.
-
Authentication Microservice:
- Responsible for user authentication and authorization. Ensures secure access to the system.
-
Subscription Microservice:
- Manages user subscriptions to specific stocks. Users can create or delete subscriptions and set alert criteria.
-
Scheduler:
- Periodically runs database queries to identify users subscribed to a particular stock.
- Puts relevant information (e.g., STOCK ID, FCM tokens of subscribed users) into a message queue for processing.
-
Notification Service:
- Consumes messages from the queue, fetches the current stock price, and sends notifications to subscribed users using Firebase Cloud Messaging (FCM).
- Background Notification
- Foreground Notification
- Node.js
- npm
- Docker (optional)
- Firebase project credentials for FCM
$ git clone git clone https://github.com/toth2000/alertWave
$ cd lingo
$ cd frontend
$ npm install
$ npm start
- Make sure you define the value of all the variable in the
.env
mentioned in the.env.example
file. - Add a firebase.config file in the
/src
directory of the project
$ cd server
-
API Gateway
$ cd gateway $ npm install $ npm run dev
-
Auth Microservice
$ cd services $ cd authentication $ npm install $ npm run dev
-
Subscription Microservice
$ cd services $ cd subscription $ npm install $ npm run dev
-
Scheduler Microservice
$ cd services $ cd scheduler $ npm install $ npm run dev
-
Scheduler Microservice
$ cd services $ cd notification $ npm install $ npm run dev
- Ensure that you set up the necessary environment variables for each microservice. Refer to the
.env.example
files in each microservice folder for guidance. - Visit https://www.alphavantage.co/ to generate API key to get stock market details
Explore the full capabilities of the AlertWave API by referring to our comprehensive API Documentation. Whether you're integrating AlertWave into your application, developing additional features, or simply curious about how our API works, this documentation provides clear and detailed insights into each endpoint. Get started with authentication, manage stock subscriptions, and understand the intricacies of our notification system. If you have any questions or need assistance, feel free to reach out!
-
Authentication:
- Obtain an access and refresh token by registering or logging in.
-
Subscription:
- Use the Subscription microservice to manage stock subscriptions.
- Create or delete subscriptions based on stock symbols and alert criteria.
- Update user FCM token in the database
-
Receive Alerts:
- Subscribed users will receive periodic alerts for the subscribed stock.
We welcome contributions! If you'd like to contribute to AlertWave, please follow our contribution guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to Firebase for providing a reliable Cloud Messaging service.
- Thanks to Alpa Vantage for providing API to get real time data related to stock market.
- Inspired by the need for real-time stock market alerts.