{"id":31644407,"url":"https://github.com/sekharsunkara6/alerting-notification-platform","last_synced_at":"2026-05-02T18:32:06.602Z","repository":{"id":316744259,"uuid":"1064664292","full_name":"SekharSunkara6/Alerting-Notification-Platform","owner":"SekharSunkara6","description":"A scalable, cleanly designed backend Alerting \u0026 Notification Platform enabling admins to configure targeted alerts with recurring reminders, and users to manage notifications with snooze and read/unread controls. Built with Node.js, Express, and TypeScript, it supports in-app delivery and provides analytics for alert engagement.","archived":false,"fork":false,"pushed_at":"2025-09-26T11:37:36.000Z","size":7155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-26T13:26:31.633Z","etag":null,"topics":["expressjs","nodejs","postman","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/SekharSunkara6/Alerting-Notification-Platform.git","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/SekharSunkara6.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-26T11:17:23.000Z","updated_at":"2025-09-26T11:40:55.000Z","dependencies_parsed_at":"2025-09-26T13:26:35.616Z","dependency_job_id":"4e8b7977-354b-48cf-b899-43a879da427b","html_url":"https://github.com/SekharSunkara6/Alerting-Notification-Platform","commit_stats":null,"previous_names":["sekharsunkara6/alerting-notification-platform"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SekharSunkara6/Alerting-Notification-Platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SekharSunkara6%2FAlerting-Notification-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SekharSunkara6%2FAlerting-Notification-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SekharSunkara6%2FAlerting-Notification-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SekharSunkara6%2FAlerting-Notification-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SekharSunkara6","download_url":"https://codeload.github.com/SekharSunkara6/Alerting-Notification-Platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SekharSunkara6%2FAlerting-Notification-Platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722769,"owners_count":26034461,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"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":["expressjs","nodejs","postman","typescript"],"created_at":"2025-10-07T04:52:27.574Z","updated_at":"2025-10-07T04:52:29.755Z","avatar_url":"https://github.com/SekharSunkara6.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alerting \u0026 Notification Platform\n\n## Project Overview\n\nThis project is a scalable, extensible backend system for managing alerts and notifications within an organization. It enables administrators to create, configure, and manage alerts based on organizational, team, or user-level visibility. End Users receive alerts via an in-app delivery system with recurring reminders every 2 hours until snoozed or expired.\n\nThe system ensures timely communication, user control over notifications, and analytical insights into alert usage and engagement.\n\n***\n\n## Features Summary\n\n### Admin Capabilities\n\n- Create, update, and archive alerts with flexible visibility settings\n- Alert details: title, message, severity (Info, Warning, Critical)\n- Delivery type: MVP supports In-App notifications (extensible to Email/SMS)\n- Reminder frequency: default 2 hours reminder until snoozed or expiry\n- Alert visibility: whole org, selected teams, or selected users\n- Analytics on alerts: view total created, read rates, snoozes, severity breakdown\n\n### User Capabilities\n\n- Receive alerts relevant to their organization/team/user assignment\n- Alerts auto re-trigger every 2 hours till user snoozes or alert expires\n- Snooze an alert for current day; reset snooze next day automatically\n- Mark alerts as read/unread\n- View history of snoozed and active alerts\n\n### Shared \u0026 Backend Features\n\n- Alerts visible based on effective visibility calculating org/team/user membership\n- Notification delivery logging with user preferences for snooze and read states\n- Analytics endpoint providing alert metrics for system-wide monitoring\n- Modular, clean OOP design with extensibility for new notification channels and reminder frequencies\n\n***\n\n## Tech Stack\n\n- Node.js with Express framework\n- TypeScript for type safety and OOP principles\n- In-memory data store for demo, easily extensible to real database\n- API testing via Postman (or any API client)\n\n***\n\n## Setup Instructions\n\n1. Clone the repository:\n\n   ```bash\n   git clone \u003cyour-repo-url\u003e\n   cd alerting-notification-platform\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Start the development server:\n\n   ```bash\n   npm run dev\n   ```\n\n4. The backend server will run at:\n\n   ```\n   http://localhost:3000\n   ```\n\n***\n\n## Core Data Models\n\n| Model                 | Description                                                     |\n|-----------------------|-----------------------------------------------------------------|\n| Alert                 | Represents alerts with details such as title, message, severity, reminder frequency, visibility, and scheduling. |\n| User                  | Holds user details including ID, name, and team association.    |\n| Team                  | Represents organizational teams with unique IDs and names.     |\n| UserAlertPreference   | Tracks per-user per-alert states: read/unread and snoozed until.|\n| NotificationDelivery  | Logs each alert delivery to a user for analytics and debugging. |\n\n***\n\n## API Endpoints \u0026 Usage\n\n### Admin APIs (`/admin` prefix)\n\n| Method | Endpoint                | Description                   | Request Body (JSON) Summary                   |\n|--------|-------------------------|-------------------------------|-----------------------------------------------|\n| POST   | `/admin/alerts`          | Create a new alert            | title, message, severity, startTime, expiryTime, visibility, reminderFrequencyMinutes, enableReminders |\n| GET    | `/admin/alerts`          | List all alerts with filters  | Query params: severity, status (active/expired), audience |\n| PUT    | `/admin/alerts/:id`      | Update an existing alert      | Same as POST body for patching alerts          |\n| DELETE | `/admin/alerts/:id`      | Archive/delete alert          | None                                            |\n\n***\n\n### User APIs (`/user` prefix)\n\nAll require an `x-user-id` header with the user’s ID.\n\n| Method | Endpoint                          | Description                         | Notes                        |\n|--------|----------------------------------|-----------------------------------|------------------------------|\n| GET    | `/user/alerts`                   | Fetch all active alerts visible to user | Filters out snoozed alerts for the current day |\n| POST   | `/user/alerts/:alertId/read`      | Mark alert as read                 | Requires alert ID            |\n| POST   | `/user/alerts/:alertId/unread`    | Mark alert as unread               |                              |\n| POST   | `/user/alerts/:alertId/snooze`    | Snooze alert for current day      | Resets at midnight            |\n\n***\n\n### Reminder Simulation Endpoint\n\n| Method | Endpoint             | Description                       |\n|--------|----------------------|-----------------------------------|\n| POST   | `/trigger-reminders` | Manually trigger reminders        |\n\n***\n\n### Analytics Endpoint\n\n| Method | Endpoint      | Description                            |\n|--------|---------------|--------------------------------------|\n| GET    | `/analytics`  | Get alert system metrics and statistics |\n\n***\n\n## Sample Workflow \u0026 Postman Test Cases\n\n### 1. Create Alert (Admin)\n\n- **Method:** POST  \n- **URL:** `/admin/alerts`  \n- **Body:**\n\n```json\n{\n  \"title\": \"System Downtime\",\n  \"message\": \"Scheduled system downtime from 2 AM to 4 AM.\",\n  \"severity\": \"Info\",\n  \"startTime\": \"2025-09-24T00:00:00.000Z\",\n  \"expiryTime\": \"2025-09-25T00:00:00.000Z\",\n  \"visibleToOrg\": true,\n  \"reminderFrequencyMinutes\": 120,\n  \"enableReminders\": true\n}\n```\n\n***\n\n### 2. List Alerts (Admin)\n\n- **Method:** GET  \n- **URL:** `/admin/alerts`  \n- Verifies the alert is created and active.\n\n***\n\n### 3. Fetch User Alerts\n\n- **Method:** GET  \n- **URL:** `/user/alerts`  \n- **Header:** `x-user-id: user1`  \n- Fetches alerts visible to user1 based on visibility and snooze filters.\n\n***\n\n### 4. Mark Alert as Read\n\n- **Method:** POST  \n- **URL:** `/user/alerts/{alertId}/read`  \n- **Header:** `x-user-id: user1`\n\n***\n\n### 5. Snooze Alert\n\n- **Method:** POST  \n- **URL:** `/user/alerts/{alertId}/snooze`  \n- **Header:** `x-user-id: user1`  \n- Snoozes alert for current day, suppressing repeat reminders.\n\n***\n\n### 6. Analytics Check\n\n- **Method:** GET  \n- **URL:** `/analytics`  \n- Returns aggregated alert metrics.\n\n***\n\n## Postman Screenshots\n\n### Create Alert\n\n![Create Alert](screenshots/create_alert.png)\n\n### List Alerts\n\n![List Alerts](screenshots/list_alerts.png)\n\n### Fetch Alerts\n\n![Fetch Alerts](screenshots/fetch_alerts_user.png)\n\n### Mark Alert As Read\n\n![Mark as Read](screenshots/mark_read.png)\n\n### Snooze Alert\n\n![Snooze Alert](screenshots/snooze_alert.png)\n\n### Analytics Summary\n\n![Analytics](screenshots/analytics.png)\n\nWhile this MVP satisfies all assignment requirements, the code is designed for easy extension to include:\n\n- Email and SMS delivery channels via Strategy Pattern\n- Custom reminder frequencies beyond 2 hours\n- Scheduled alerts running on cron or specific times of day\n- Escalation logic for unacknowledged alerts\n- Role-based access control for secure admin operations\n- Push notification service integration\n- Persistent database support\n- Frontend dashboard for admins and users\n\n***\n\n## Author\n\nYour Name  \nContact: sekharsunkara2002@gmail.com\n\n***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsekharsunkara6%2Falerting-notification-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsekharsunkara6%2Falerting-notification-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsekharsunkara6%2Falerting-notification-platform/lists"}