Request: Implement Notifications
Source Input
"I want to implement notifications for this app starting with a simple set of notifications when one of your household members adds something to a shopping list"
Current Understanding
The user wants to implement a notification system for the Roomy app with the initial scope focused on shopping list activity - specifically notifying household members when someone adds an item to a shopping list.
Codebase Analysis:
- NO push notification infrastructure currently exists (no FCM integration)
MessageDto exists in lib/inbox/ with notification fields (notificationTitle, notificationMessage)
- Inbox UI exists but is non-functional (no backend integration)
- Shopping list feature is fully functional with real-time sync
- Cloud Functions infrastructure exists with email capabilities
- Household member relationships are well-defined via
HouseholdDto.userIds
Identified Ambiguities
- Notification Delivery Channel: Push notifications only? In-app only? Both?
- Notification Scope: Only shopping list additions, or also edits/completions/deletions?
- User Preferences: Should users be able to toggle notifications on/off?
- Quiet Hours: Should there be time-based notification suppression?
- Batching: Individual notification per item, or batched (e.g., "User added 5 items")?
- Self-Notifications: Should the user who added the item receive the notification?
- Real-time vs Background: Should notifications trigger immediately or be processed in background?
- Notification Content: What information should be included (item name, list name, who added it)?
- FCM Setup: Is setting up FCM credentials/keys in scope for this work?
- iOS/Android APNs: Are both platforms in scope?
- Inbox Feature: Should notifications also appear in the existing Inbox UI?
- Read Receipts: Should notifications track read/unread state?
Decisions
- Delivery Channel: Both push notifications AND in-app inbox storage. Users receive device alerts and can view notifications later in the inbox.
- Triggers: Notify when shopping list items are added OR completed/purchased. Not for edits or deletions initially.
- Self-Notifications: No. Only other household members receive notifications, not the user who performed the action.
- Batching: Yes. Group notifications when multiple items are added/completed in quick succession (e.g., "Alice added 5 items to Groceries").
- User Preferences: Yes. Include notification settings so users can toggle notifications on/off.
- FCM Setup: Full scope - includes Firebase console configuration, APNs certificates for iOS, and service account credentials setup.
- Preference Granularity: Per category - separate toggles for Shopping, Cleaning, etc.
- External Setup Tooling: Use Playwright MCP for browser automation to configure Firebase Console, Apple Developer Portal, and other external services.
- Deep Linking: Yes. Tapping a notification navigates to the relevant shopping list or inbox message.
- Batch Window: 30 seconds - items added/completed within 30 seconds are grouped into a single notification.
- Read State: Yes. Track read/unread with visual indicators and unread count badge on inbox.
- Platforms: Both iOS and Android with full cross-platform push notification support.
Final Intent
Implement a comprehensive notification system for the Roomy app, starting with shopping list notifications.
Core Functionality:
- Push notifications (FCM) AND in-app inbox storage for all notifications
- Initial scope: Shopping list item additions and completions
- Notifications sent to all household members except the actor
- Batched notifications within 30-second windows (e.g., "Alice added 5 items to Groceries")
User Experience:
- Deep linking: Tapping notifications navigates to the relevant shopping list
- Read/unread state tracking with visual indicators and unread count badges
- Per-category notification preferences (Shopping, Cleaning, etc.) in user settings
Technical Scope:
- Full FCM setup including Firebase Console configuration and APNs certificates
- Use Playwright MCP for browser automation of external service configuration
- Cross-platform support for both iOS and Android
- Cloud Functions for notification triggering and batching logic
- Firestore collections for messages and notification preferences
Reacties