Snow

#EPIC REFACTOR - NOTIFICATIONS/USER SETTINGS

Your Plan Recap

New Tables:

  • Users — stores user metadata (email, name, etc.)

  • Devices — stores one record per device per user with FCM token and last update time

New Feature:

  • Email notifications/reminders alongside FCM push

User Settings:

  • Toggle Allow Notifications (push)

  • Toggle Allow Emails

  • These settings control if and how reminders get sent — full respect for user preferences

Refactor:

  • Remove FCM tokens from LocoTasks & LocoReminders

  • Lookup user devices on notification send and push to all tokens

  • Send email reminder if enabled

UI Component:

  • Notifications component fetching from locoreminders for both FG & BG notifications

  • Allow user to deep link by tapping notifications

  • Allow swipe-to-delete notifications (which triggers a lambda to remove records)


You’re on a very solid track. Next steps could be:

  • Design the Users and Devices tables carefully — think about indexing and query patterns for efficient token lookup and device cleanup (stale tokens).

  • Build the user settings UI and connect it to your backend — this UX layer is critical for user trust.

  • Refactor your Lambdas incrementally to read tokens from Devices table and send emails accordingly.

  • Notifications component will be a great UX win — persistent, actionable reminders.


New Tables:
Users
Devices (FCM TOKENS)

New Feature: EMAIL NOTIFICATIONS / REMINDERS

Update User Settings: Allow Notifications / Allow Emails - we need to respect users wishes

Refactor LocoTasks & LocoReminders not to store FCM TOKEN but to take from table and send notifications to all devices + EMAIL (if allowed)

Add New Notifications component to pull from locoreminders table - this should allow deletions and deep links

That's about it