{"id":27127829,"url":"https://github.com/vladdoroniuk/email-notification-system","last_synced_at":"2026-04-06T08:01:39.358Z","repository":{"id":220449524,"uuid":"751667175","full_name":"vladdoroniuk/email-notification-system","owner":"vladdoroniuk","description":"NestJS, Prisma, Prometheus, BullMQ | BTC-to-UAH exchange rate email notifications","archived":false,"fork":false,"pushed_at":"2025-03-22T15:11:14.000Z","size":1399,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T17:57:58.112Z","etag":null,"topics":["bullmq","cqrs","cron","docker","nestjs","postgresql","prisma","prometheus","redis","typescript"],"latest_commit_sha":null,"homepage":"","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/vladdoroniuk.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}},"created_at":"2024-02-02T04:05:55.000Z","updated_at":"2025-03-22T15:11:17.000Z","dependencies_parsed_at":"2024-03-08T11:49:28.533Z","dependency_job_id":null,"html_url":"https://github.com/vladdoroniuk/email-notification-system","commit_stats":null,"previous_names":["vladdoroniuk/btc-exchange-rate","vladdoroniuk/universe-genesis-test-task","vladdoroniuk/email-notification-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vladdoroniuk/email-notification-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladdoroniuk%2Femail-notification-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladdoroniuk%2Femail-notification-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladdoroniuk%2Femail-notification-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladdoroniuk%2Femail-notification-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vladdoroniuk","download_url":"https://codeload.github.com/vladdoroniuk/email-notification-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladdoroniuk%2Femail-notification-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bullmq","cqrs","cron","docker","nestjs","postgresql","prisma","prometheus","redis","typescript"],"created_at":"2025-04-07T17:58:02.776Z","updated_at":"2026-04-06T08:01:39.341Z","avatar_url":"https://github.com/vladdoroniuk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## System Design Diagram\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\"\u003e\n    \u003cimg src=\"./images/system_design.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Entity Relationship Diagram\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\"\u003e\n    \u003cimg src=\"./images/erd.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Services\n\n- localhost:3001 -\u003e Service App (/api -\u003e Swagger Docs)\n- localhost:3002 -\u003e Worker App\n- localhost:9090 -\u003e Prometheus\n- localhost:6379 -\u003e Redis\n- localhost:5432 -\u003e PostgreSQL\n- localhost:5555 -\u003e Prisma Studio (npm run db:studio, only in local dev)\n\n## Todo\n\n- [x] Create system design diagram\n- [x] Create entity relationship diagram\n- [x] Setup NestJS monorepo\n- [x] Create Prisma schema file based on ERD\n- [x] Create Dockerfile for service app and worker app\n- [x] Create docker-compose.yml file\n- [x] Connect to external BTC-to-UAH API\n- [x] Configure Prometheus and prom-client\n- [x] Create endpoints\n  - [x] GET /rate\n  - [x] POST /rate\n  - [x] GET /emails\n  - [x] POST /emails\n  - [x] DELETE /emails\n  - [x] GET /metrics\n- [x] Collect metrics\n  - [x] subscribe email count\n  - [x] unsubscribe email count\n  - [x] send email success count\n  - [x] send email error count\n  - [x] exchange rate gauge\n- [x] Get exchange rate every hour\n- [x] Get exchange rate at 9 AM Kyiv time\n- [x] Use CQRS pattern\n- [x] Use Nodemailer for mailing\n- [x] Use Bull for task queuing\n- [x] Use Cron/Interval for task scheduling\n- [ ] Use Pino for logging\n- [ ] Add unit tests\n\n## Links\n\n- https://www.bemyaficionado.com/design-a-notification-system\n- https://blog.risingstack.com/node-js-performance-monitoring-with-prometheus/\n- https://mailtrap.io/ (email delivery testing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladdoroniuk%2Femail-notification-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvladdoroniuk%2Femail-notification-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladdoroniuk%2Femail-notification-system/lists"}