Notification channels
Rich HTML emails via Resend with formatted content, links, and meeting details.
Template messages via Bird API with quick action buttons and meeting summaries.
SMS
Automatic fallback to SMS when WhatsApp delivery fails, ensuring message delivery.
How notifications work
The notification system uses a sophisticated matching engine to connect users with relevant content:Meeting processing
When a meeting is summarized, the system identifies subjects and their importance levels based on topic and proximity.
User matching
Each subject is matched against user preferences using four priority rules:
- High importance subjects notify everyone
- Normal importance subjects notify users interested in the topic
- Near proximity subjects notify users within 400m
- Wide proximity subjects notify users within 1.5km
Notification creation
Matched notifications are created in “pending” status, grouped by meeting and user, with delivery records for each channel.
Approval workflow
Depending on administrative body settings, notifications are either:
- Auto-sent immediately after creation
- Held for admin approval before sending
- Disabled entirely
Matching rules
The notification matching engine uses four rules with clear priorities:- Rule 1: High importance
- Rule 2: Topic matching
- Rule 3: Near proximity
- Rule 4: Wide proximity
Notify everyone regardless of preferencesWhen a subject is marked as high importance:Admins set importance levels per subject to control notification scope.
Example: Budget approvals, major infrastructure decisions, emergency measures
src/lib/notifications/matching.ts:31-94
User preferences
Users configure notification preferences to control what they receive:Topic interests
Topic interests
Users select topics they care about from a predefined list:
- Transportation & Traffic
- Environment & Parks
- Urban Development
- Education & Culture
- Public Safety
- Budget & Finance
- Health & Social Services
Location subscriptions
Location subscriptions
Users add specific locations they want to track:
- Home address - Get notified about nearby decisions
- Work location - Stay informed about your commute area
- Other places - Parks, schools, businesses you care about
Delivery channels
Delivery channels
Users choose how they want to receive notifications:
- Email only - Traditional email notifications
- Messages only - WhatsApp or SMS notifications
- Both channels - Maximum coverage with email + messages
- None - Pause all notifications
Approval workflows
Administrative bodies control notification behavior:- Auto-send (recommended)
- Manual approval
- Disabled
- Summarize task completes
- Notifications created in pending status
- System immediately calls
releaseNotifications() - Emails and messages sent with rate limiting
- Discord alert sent to admins with delivery stats
Best for transparent governance - citizens are immediately informed about new decisions.
src/lib/tasks/summarize.ts:194-246
Delivery implementation
The notification delivery system handles multi-channel sending with graceful fallbacks:src/lib/notifications/deliver.ts:29-174
Notification impact calculation
Before creating notifications, calculate the impact to estimate reach:src/lib/notifications/matching.ts:100-145
Impact calculation is useful for admin dashboards to show how many people will be notified before approval.
Configuration
Set up notification services in your environment:Welcome notifications
New users receive a welcome notification with platform information:- Platform introduction
- How to set up preferences
- Examples of notification types
- Links to user profile and documentation
src/lib/notifications/welcome.ts
Notification tokens
Unsubscribe and preference management uses secure tokens:src/lib/notifications/tokens.ts
Tokens use HMAC-SHA256 signatures and expire after 30 days for security.
Notification content
Content generation creates localized, formatted messages:src/lib/notifications/content.ts
API reference
Matches users to relevant subjects based on preferences
Sends all pending notifications for given IDs
Next steps
AI summaries
Learn how summaries trigger notification creation
Search
Users can search topics they’re interested in
Transcription
Understand the data pipeline feeding notifications
User guide
Help users set up their notification preferences