🎯 Bounty: Alarms System - Database, API & Dashboard UI
Bounty: $15
Overview
Build a complete alarms system that allows users to create custom notification alarms, configure notification channels (Slack, Discord, Email, Webhook, Teams, Telegram, Google Chat), and assign alarms to trigger on various events (uptime, analytics, errors, etc.).
This issue uses the @databuddy/notifications package located at packages/notifications/.
Requirements
1. Database Schema (Required)
Create the database table(s) and migrations for storing alarms.
Schema Fields:
id - Unique identifier (nanoid)
user_id / organization_id - Owner reference
website_id - Optional website association
name - Alarm name (required)
description - Alarm description (optional)
enabled - Boolean, whether alarm is active
notification_channels - Array of channels (slack, discord, email, webhook, teams, telegram, google-chat)
slack_webhook_url - Optional Slack webhook URL
discord_webhook_url - Optional Discord webhook URL
teams_webhook_url - Optional Teams webhook URL
telegram_bot_token - Optional Telegram bot token
telegram_chat_id - Optional Telegram chat ID
google_chat_webhook_url - Optional Google Chat webhook URL
email_addresses - Array of email addresses
webhook_url - Optional custom webhook URL
webhook_headers - JSON object for custom headers
trigger_type - Type of trigger (uptime, traffic_spike, error_rate, goal, custom)
trigger_conditions - JSON object for trigger conditions/thresholds
created_at - Timestamp
updated_at - Timestamp
Acceptance Criteria:
2. API Endpoints (Required)
Create ORPC endpoints for alarm CRUD operations.
Endpoints:
alarms.list - List all alarms for user/organization
alarms.get - Get single alarm by ID
alarms.create - Create new alarm
alarms.update - Update existing alarm
alarms.delete - Delete alarm
alarms.test - Send test notification to configured channels
Acceptance Criteria:
3. Dashboard UI (Required)
Create the alarms management UI in the dashboard settings.
Pages/Components:
- Settings → Notifications page with alarms list
- Create/Edit alarm modal or page
- Channel configuration (add Slack URL, Discord URL, Teams URL, Telegram bot token + chat ID, Google Chat URL, emails, webhook)
- Trigger type selection and condition configuration
- Test notification button
- Enable/disable toggle
Acceptance Criteria:
4. Testing (Required)
Acceptance Criteria:
Available Notification Channels
The @databuddy/notifications package supports 7 channels. Each has a helper function for one-off sends and a provider class for use with NotificationClient:
| Channel |
Helper Function |
Config |
| Slack |
sendSlackWebhook(webhookUrl, payload) |
webhookUrl |
| Discord |
sendDiscordWebhook(webhookUrl, payload) |
webhookUrl |
| Email |
sendEmail(sendEmailAction, payload) |
sendEmailAction, defaultTo |
| Webhook |
sendWebhook(url, payload) |
url, method, headers |
| Teams |
sendTeamsWebhook(webhookUrl, payload) |
webhookUrl |
| Telegram |
sendTelegramMessage(botToken, chatId, payload) |
botToken, chatId |
| Google Chat |
sendGoogleChatWebhook(webhookUrl, payload) |
webhookUrl |
All helpers and providers support timeout, retries, and retryDelay options with exponential backoff.
Technical Requirements
- Follow existing codebase patterns and conventions
- Use
bun for all package management (never npm/pnpm)
- TypeScript with strict types (no
any, unknown, or never)
- Use
dayjs for dates (never date-fns)
- Use Tanstack Query for data fetching hooks
- Use Jotai for any local state if needed
- Proper error boundaries
- Use
rounded class (not rounded-xl or rounded-md)
Design Reference
The UI should match the existing dashboard design. Reference these for patterns:
apps/dashboard/app/(main)/settings/ - Settings page patterns
apps/dashboard/components/ - Existing component patterns
- Current notification settings page at
apps/dashboard/app/(main)/settings/notifications/page.tsx (currently shows "Coming Soon")
Files to Reference
packages/notifications/ - Notification providers and helpers
packages/notifications/README.md - Full API reference and usage examples
packages/db/src/drizzle/schema.ts - Database schema patterns
packages/rpc/src/routers/ - API router patterns
packages/validation/src/schemas/ - Validation schema patterns
Submission Requirements
Questions?
Comment on this issue for any clarification needed before starting.
🎯 Bounty: Alarms System - Database, API & Dashboard UI
Bounty: $15
Overview
Build a complete alarms system that allows users to create custom notification alarms, configure notification channels (Slack, Discord, Email, Webhook, Teams, Telegram, Google Chat), and assign alarms to trigger on various events (uptime, analytics, errors, etc.).
This issue uses the
@databuddy/notificationspackage located atpackages/notifications/.Requirements
1. Database Schema (Required)
Create the database table(s) and migrations for storing alarms.
Schema Fields:
id- Unique identifier (nanoid)user_id/organization_id- Owner referencewebsite_id- Optional website associationname- Alarm name (required)description- Alarm description (optional)enabled- Boolean, whether alarm is activenotification_channels- Array of channels (slack,discord,email,webhook,teams,telegram,google-chat)slack_webhook_url- Optional Slack webhook URLdiscord_webhook_url- Optional Discord webhook URLteams_webhook_url- Optional Teams webhook URLtelegram_bot_token- Optional Telegram bot tokentelegram_chat_id- Optional Telegram chat IDgoogle_chat_webhook_url- Optional Google Chat webhook URLemail_addresses- Array of email addresseswebhook_url- Optional custom webhook URLwebhook_headers- JSON object for custom headerstrigger_type- Type of trigger (uptime,traffic_spike,error_rate,goal,custom)trigger_conditions- JSON object for trigger conditions/thresholdscreated_at- Timestampupdated_at- TimestampAcceptance Criteria:
packages/db/src/drizzle/schema.tsuser_id,organization_id,website_id,enabled2. API Endpoints (Required)
Create ORPC endpoints for alarm CRUD operations.
Endpoints:
alarms.list- List all alarms for user/organizationalarms.get- Get single alarm by IDalarms.create- Create new alarmalarms.update- Update existing alarmalarms.delete- Delete alarmalarms.test- Send test notification to configured channelsAcceptance Criteria:
packages/rpc/src/routers/alarms.ts@databuddy/notificationspackage3. Dashboard UI (Required)
Create the alarms management UI in the dashboard settings.
Pages/Components:
Acceptance Criteria:
Button,Input,Select,Dialog, etc.)4. Testing (Required)
Acceptance Criteria:
packages/rpc/src/routers/alarms.test.tsAvailable Notification Channels
The
@databuddy/notificationspackage supports 7 channels. Each has a helper function for one-off sends and a provider class for use withNotificationClient:sendSlackWebhook(webhookUrl, payload)webhookUrlsendDiscordWebhook(webhookUrl, payload)webhookUrlsendEmail(sendEmailAction, payload)sendEmailAction,defaultTosendWebhook(url, payload)url,method,headerssendTeamsWebhook(webhookUrl, payload)webhookUrlsendTelegramMessage(botToken, chatId, payload)botToken,chatIdsendGoogleChatWebhook(webhookUrl, payload)webhookUrlAll helpers and providers support
timeout,retries, andretryDelayoptions with exponential backoff.Technical Requirements
bunfor all package management (never npm/pnpm)any,unknown, ornever)dayjsfor dates (neverdate-fns)roundedclass (notrounded-xlorrounded-md)Design Reference
The UI should match the existing dashboard design. Reference these for patterns:
apps/dashboard/app/(main)/settings/- Settings page patternsapps/dashboard/components/- Existing component patternsapps/dashboard/app/(main)/settings/notifications/page.tsx(currently shows "Coming Soon")Files to Reference
packages/notifications/- Notification providers and helperspackages/notifications/README.md- Full API reference and usage examplespackages/db/src/drizzle/schema.ts- Database schema patternspackages/rpc/src/routers/- API router patternspackages/validation/src/schemas/- Validation schema patternsSubmission Requirements
bun run lint)bun run check-types)Questions?
Comment on this issue for any clarification needed before starting.