{"id":25386174,"url":"https://github.com/9ssi7/bilira.crypto-alert","last_synced_at":"2025-04-09T16:57:42.114Z","repository":{"id":275398399,"uuid":"924064364","full_name":"9ssi7/bilira.crypto-alert","owner":"9ssi7","description":"A real-time cryptocurrency price monitoring and alert system","archived":false,"fork":false,"pushed_at":"2025-02-06T16:34:01.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:12:43.301Z","etag":null,"topics":["aws","fastify"],"latest_commit_sha":null,"homepage":"https://crypto-alert.9ssi7.dev/docs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/9ssi7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T10:56:53.000Z","updated_at":"2025-02-06T16:33:47.000Z","dependencies_parsed_at":"2025-02-02T08:27:10.917Z","dependency_job_id":"9fe602c8-71d5-41a8-8d45-52d4e16df6ff","html_url":"https://github.com/9ssi7/bilira.crypto-alert","commit_stats":null,"previous_names":["9ssi7/bilira.crypto-alert"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9ssi7%2Fbilira.crypto-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9ssi7%2Fbilira.crypto-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9ssi7%2Fbilira.crypto-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9ssi7%2Fbilira.crypto-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9ssi7","download_url":"https://codeload.github.com/9ssi7/bilira.crypto-alert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074970,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","fastify"],"created_at":"2025-02-15T10:21:27.317Z","updated_at":"2025-04-09T16:57:42.093Z","avatar_url":"https://github.com/9ssi7.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto Price Alert Service\n\nThe Crypto Price Alert Service is a robust, microservices-based system that monitors cryptocurrency prices and sends alerts based on user-defined conditions. Built with TypeScript and AWS services, it provides real-time price monitoring, customizable alerts, and comprehensive price history tracking.\n\n## Architecture\n\n### System Components\n\n```mermaid\ngraph TB\nClient[Client Applications] --\u003e API[Backend API Service]\nAPI --\u003e DB[(PostgreSQL)]\nAPI --\u003e Redis[(Redis Cache)]\nAPI --\u003e SQS[AWS SQS]\nHistoryGen[History Generator Lambda] --\u003e SQS\nSQS --\u003e PriceConsumer[Price Update Consumer]\nPriceConsumer --\u003e DB\nAPI --\u003e Jaeger[Jaeger Tracing]\nAPI --\u003e Prometheus[Prometheus Metrics]\nPrometheus --\u003e Grafana[Grafana Dashboard]\n```\n\n### Alert Flow\n\n```mermaid\nsequenceDiagram\nparticipant User\nparticipant API\nparticipant DB\nparticipant SQS\nparticipant NotificationService\nUser-\u003e\u003eAPI: Create Price Alert\nAPI-\u003e\u003eDB: Store Alert\nAPI-\u003e\u003eUser: Alert Created\nloop Price Check\nAPI-\u003e\u003eDB: Get Active Alerts\nAPI-\u003e\u003eAPI: Check Price Conditions\nopt Alert Triggered\nAPI-\u003e\u003eSQS: Send Notification\nAPI-\u003e\u003eDB: Update Alert Status\nSQS-\u003e\u003eNotificationService: Process Notification\nend\nend\n```\n\n### Price Update Flow\n\n```mermaid\nsequenceDiagram\nparticipant Lambda\nparticipant SQS\nparticipant Consumer\nparticipant DB\nparticipant History\nLambda-\u003e\u003eSQS: Generate Price Update\nSQS-\u003e\u003eConsumer: Consume Message\nConsumer-\u003e\u003eDB: Update Current Price\nConsumer-\u003e\u003eHistory: Store Price History\n```\n\n## Core Features\n\n### 1. Price Monitoring\n\n- Real-time cryptocurrency price tracking\n- Historical price data storage\n- Price trend analysis\n- Volatility calculations\n\n### 2. Alert System\n\n- Multiple alert types:\n  - Price threshold (above/below)\n  - Price change percentage\n  - Volatility alerts\n  - Trend change detection\n- Customizable time windows\n- Alert deduplication\n- Active/inactive alert management\n\n### 3. Observability\n\n- Distributed tracing with Jaeger\n- Metrics collection with Prometheus\n- Visualization with Grafana\n- Comprehensive logging\n\n## Technical Stack\n\n### Backend Services\n\n- Node.js \u0026 TypeScript\n- Fastify web framework\n- PostgreSQL database\n- Redis caching\n- AWS Services (SQS, Lambda)\n- Docker \u0026 Docker Compose\n\n### Monitoring \u0026 Observability\n\n- OpenTelemetry instrumentation\n- Jaeger distributed tracing\n- Prometheus metrics\n- Grafana dashboards\n\n## Project Structure\n\n```\n├── apps/\n│ ├── backend/ # Main API service\n│ │ ├── src/\n│ │ │ ├── api/ # API layer\n│ │ │ ├── core/ # Domain logic\n│ │ │ └── infrastructure/ # External services\n│ │ └── Dockerfile\n│ └── history-generator/ # Price update Lambda\n├── deployments/ # Deployment configurations\n│ ├── compose.yml\n│ └── prometheus.yml\n└── .github/\n└── workflows/ # CI/CD pipelines\n```\n\n## API Documentation\n\n### Alert Endpoints\n\n- `POST /api/alerts` - Create new alert\n- `GET /api/users/:userId/alerts` - Get user alerts\n- `PUT /api/alerts/:id` - Update alert\n- `DELETE /api/alerts/:id` - Delete alert\n\n### Coin Endpoints\n\n- `GET /api/coins` - List all coins\n- `GET /api/coins/:symbol` - Get coin details\n- `GET /api/coins/:symbol/history` - Get price history\n\n## Deployment\n\n### Local Development\n\n```bash\n# install dependencies\nmake install\n\n# prepare environment\nmake prepare\n\n# start services\nmake compose\n```\n\n### Production Deployment\n\nThe service uses GitHub Actions for CI/CD:\n\n- Automated testing on pull requests\n- Build verification\n- AWS Lambda deployment on releases\n\n## Monitoring \u0026 Observability\n\n### Tracing\n\n- All services are instrumented with OpenTelemetry\n- Trace context propagation across services\n- Detailed span attributes for debugging\n\n### Metrics\n\n- Application metrics\n- System metrics\n- Custom business metrics\n\n### Dashboards\n\n- Real-time price monitoring\n- Alert statistics\n- System health metrics\n- Service performance metrics\n\n## Security Considerations\n\n### API Security\n\n- Rate limiting\n- CORS protection\n- Helmet security headers\n- Input validation\n\n### Infrastructure Security\n\n- AWS IAM roles\n- Secure credential management\n- Network isolation\n- Container security\n\n## Future Enhancements\n\n1. Support for more cryptocurrency exchanges\n2. Advanced technical analysis indicators\n3. Mobile push notifications\n4. WebSocket real-time updates\n5. Machine learning price predictions\n6. Enhanced alert conditions\n7. User authentication and authorization\n8. API rate limiting per user\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit changes\n4. Create pull request\n5. Ensure CI passes\n\n## License\n\nMIT License - See LICENSE file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9ssi7%2Fbilira.crypto-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9ssi7%2Fbilira.crypto-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9ssi7%2Fbilira.crypto-alert/lists"}