Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohammadshaad/tanx.fi-assignment
A price alert application that triggers an email when the user’s target price is Achieved. Say, the current price of BTC is $28,000, a user sets an alert for BTC at a price of 33,000$. The application should send an email to the user when the price of BTC reaches 33,000$.
https://github.com/mohammadshaad/tanx.fi-assignment
docker dockerfile golang jwt postgresql rabittmq redis sql
Last synced: about 12 hours ago
JSON representation
A price alert application that triggers an email when the user’s target price is Achieved. Say, the current price of BTC is $28,000, a user sets an alert for BTC at a price of 33,000$. The application should send an email to the user when the price of BTC reaches 33,000$.
- Host: GitHub
- URL: https://github.com/mohammadshaad/tanx.fi-assignment
- Owner: mohammadshaad
- Created: 2024-07-27T17:01:10.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T18:24:58.000Z (6 months ago)
- Last Synced: 2025-01-09T06:52:17.940Z (about 12 hours ago)
- Topics: docker, dockerfile, golang, jwt, postgresql, rabittmq, redis, sql
- Language: Go
- Homepage:
- Size: 4.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Price Alert Application
## Overview
This application allows users to set price alerts for Bitcoin (BTC). When the target price is reached, an email notification is sent to the user.## Features
- Create, delete, and fetch price alerts.
- Real-time price updates using Binance WebSocket.
- User authentication with JWT tokens.
- Email notifications using Gmail SMTP.
- Caching with Redis.
- Dockerized setup.## Endpoints
### Login
`POST /login`
```json
{
"username": "username",
"password": "password"
}
```### Create Alert
`POST /alerts/create`
```json
{
"user_id": "1",
"coin": "BTC",
"target_price": 33000.00
}
```### Delete Alert
`DELETE /alerts/delete`
```json
{
"user_id": "1",
"coin": "BTC"
}
```### Fetch Alerts
`GET /alerts/fetch?user_id=1`
```json
{
"user_id": "1"
}
```## Setup
1. Clone the repository.
2. Create a `.env` file in the root directory and add the following environment variables:
```bash
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: price_alert
```3. Run the following command to start the application:
```bash
docker-compose up
```4. The application will be running on `http://localhost:8000`.
## Technologies
- Golang
- PostgreSQL
- Redis
- Docker
- Binance WebSocket
- JWT## Thank You
Made with ❤️ by [Mohammad Shaad](https://github.com/mohammadshaad).