Skip to content

Reminders

The Reminders app allows users to set up recurring or one-time reminders that fire notifications to specified recipients. Reminders can optionally target specific resources like documents, invoices, or projects.

  • Seven frequency options: Once, Daily, Weekly, Monthly, Quarterly, Half Yearly, Yearly
  • Target type filtering (Document, Invoice, Project, Custom)
  • Multiple recipient support via user IDs
  • Active/Inactive toggle directly from the list view
  • Reminder execution logs with timestamps and recipient counts
  • Configurable day-of-week (for weekly) and day-of-month (for monthly)
  • Start and optional end dates
RoutePurpose
/business/apps/remindersList view with target-type filter and inline active/inactive toggle
/business/apps/reminders/newCreate reminder form with frequency, scheduling, targeting, and recipients
/business/apps/reminders/[id]View/edit a specific reminder
/business/apps/reminders/logsExecution log history showing when reminders fired

The main page shows a filterable list of reminders. Each card displays the title, frequency badge, optional target type badge, next fire date, and last fired date. An inline form toggles the is_active state with a toast notification on success.

The target-type filter uses a Select dropdown that updates the URL search parameter (?type=document).

The creation form collects:

  • Title and optional Message
  • Frequency — determines which additional scheduling fields appear (day-of-week for weekly, day-of-month for monthly)
  • Start date (required) and End date (optional)
  • Target type and Target ID — for linking to a specific resource
  • Recipient IDs — comma-separated input that syncs to a hidden array field

Validation uses createReminderSchema from $lib/apps/reminders/modules/reminders/index.js.

TableDescription
ext_reminders.remindersCore reminder record with scheduling, targeting, and status fields
ext_reminders.reminder_recipientsJunction table linking reminders to recipient user IDs
ext_reminders.reminder_logsExecution log entries (fired_at, recipients_notified)
  • Reminder — id, user_id, title, message, frequency, target_id, target_type, starts_at, ends_at, day_of_week, day_of_month, is_active, last_fired_at, next_fire_at
  • ReminderFrequency"once" | "daily" | "weekly" | "monthly" | "quarterly" | "half_yearly" | "yearly"
  • ReminderTargetType"document" | "invoice" | "project" | "custom"
  • ReminderLog — id, reminder_id, fired_at, recipients_notified
ComponentLocation
Reminder list with togglesrc/routes/(app)/business/apps/reminders/+page.svelte
Create reminder formsrc/routes/(app)/business/apps/reminders/new/+page.svelte
Reminder logssrc/routes/(app)/business/apps/reminders/logs/+page.svelte

Server-side logic lives in $lib/apps/reminders/services/index.js:

  • listReminders(userId, filters) — list with optional target_type filter
  • createReminder(userId, data) — create reminder with recipients
  • toggleReminder(id) — flip is_active state
ActionPageDescription
toggleList pageToggles is_active for a reminder
createNew pageCreates a reminder with all scheduling and recipient data