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.
Key Features
Section titled “Key Features”- 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
Page Structure
Section titled “Page Structure”| Route | Purpose |
|---|---|
/business/apps/reminders | List view with target-type filter and inline active/inactive toggle |
/business/apps/reminders/new | Create reminder form with frequency, scheduling, targeting, and recipients |
/business/apps/reminders/[id] | View/edit a specific reminder |
/business/apps/reminders/logs | Execution log history showing when reminders fired |
List View
Section titled “List View”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).
Create Reminder
Section titled “Create Reminder”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.
Data Model
Section titled “Data Model”| Table | Description |
|---|---|
ext_reminders.reminders | Core reminder record with scheduling, targeting, and status fields |
ext_reminders.reminder_recipients | Junction table linking reminders to recipient user IDs |
ext_reminders.reminder_logs | Execution log entries (fired_at, recipients_notified) |
Key Types
Section titled “Key Types”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_atReminderFrequency—"once"|"daily"|"weekly"|"monthly"|"quarterly"|"half_yearly"|"yearly"ReminderTargetType—"document"|"invoice"|"project"|"custom"ReminderLog— id, reminder_id, fired_at, recipients_notified
Key Components
Section titled “Key Components”| Component | Location |
|---|---|
| Reminder list with toggle | src/routes/(app)/business/apps/reminders/+page.svelte |
| Create reminder form | src/routes/(app)/business/apps/reminders/new/+page.svelte |
| Reminder logs | src/routes/(app)/business/apps/reminders/logs/+page.svelte |
Services
Section titled “Services”Server-side logic lives in $lib/apps/reminders/services/index.js:
listReminders(userId, filters)— list with optional target_type filtercreateReminder(userId, data)— create reminder with recipientstoggleReminder(id)— flip is_active state
Form Actions
Section titled “Form Actions”| Action | Page | Description |
|---|---|---|
toggle | List page | Toggles is_active for a reminder |
create | New page | Creates a reminder with all scheduling and recipient data |