← Back to Documentation

🔔 Reminders, Calendar & Email Guide

Version 1.2 adds automated reminders, a calendar view, and an optional daily email digest. The app works fully without email — reminders are always visible in the Reminders page and Calendar.

1. How Reminders Work

Reminders track important dates for each location: lease deadlines, rent payments, HVAC maintenance, insurance renewals, and more. They are separate from Tasks — reminders are time-based alerts, while Tasks are to-dos with status tracking.

Reminder Types

TypeDescription
Lease DeadlineLease expiration, rent commencement, etc.
RentMonthly recurring rent reminders
HVACBiannual HVAC service and contract deadlines
TITenant improvement submission deadlines
InsuranceInsurance renewal dates
UtilityUtilities transfer deadlines
SignagePylon sign deadlines
Gross SalesAnnual gross sales report due dates
CustomAny other reminder you create manually

Priority & Reminder Date Buffers

Each reminder has a due date and a reminder date (the date it first shows as active). Buffers by priority:

PriorityReminder Fires At
Critical30, 14, 7, 3, 1, 0 days before due
High14, 7, 3, 1, 0 days before due
Normal7, 3, 1, 0 days before due
Low3, 1, 0 days before due

2. Generating Reminders for a Location

The fastest way to set up reminders is to use the Generate Reminders button:

  1. Open the location in Location Detail
  2. Go to the Lease Dates tab
  3. Enter all known dates (delivery date, target opening, lease expiration, etc.) and click Save Dates
  4. Click the 🔔 Generate Reminders button in the top bar

This will create:

Re-running Generate Reminders replaces all non-Custom reminders for that location. Custom reminders you added manually are never deleted.

3. Auto-Calculated Deadlines

When you save dates on a location, these deadlines are auto-calculated:

DeadlineFormula
Rent Commencementmin(Delivery + 150 days, Actual Opening Date)
TI Submission DeadlineActual Opening + 180 days
HVAC Contract DeadlineActual Opening + 10 days
Utilities TransferDelivery + 30 days
Pylon Sign DeadlineRent Commencement + 120 days
Annual Gross Sales ReportLease Signed + 1 year
Next HVAC ServiceActual Opening + 6 months

You can override any auto-calculated value by editing it directly in the Lease Dates form.

4. Calendar Page

The Calendar page (/calendar.html) shows all tasks and reminders in a month view or list view. Use the location filter to focus on a single location. Click any event to see details.

5. Dashboard: Immediate Attention

The Dashboard now shows an Immediate Attention section listing all reminders due within 14 days or with Critical priority. This appears automatically when there are items needing attention — it disappears when nothing is urgent.

6. Email Digest (Optional)

The app sends a daily digest email each morning at 8:00 AM UTC if RESEND_API_KEY is configured. The digest includes:

Email is completely optional. The app works fully without it. If RESEND_API_KEY is missing, emails are silently skipped — no errors.

Setting Up Email

  1. Create a free account at resend.com
  2. Get your API key from the Resend dashboard
  3. In Cloudflare Pages → your project → Settings → Environment Variables, add:
    RESEND_API_KEY = re_xxxxxxxxxxxxxxxxxxxx  (Secret)
    REMINDER_EMAIL_TO = your@email.com  (Plain text)
    REMINDER_EMAIL_FROM = reminders@yourdomain.com  (Plain text)
  4. Redeploy: push a small change to GitHub, or use "Retry deployment" in Cloudflare Pages
  5. Test via Settings → Send Test Email
The cron trigger (daily digest schedule) is defined in wrangler.toml. It runs at 0 8 * * * (8:00 AM UTC). This is automatically deployed with the app — no separate setup needed.

Resend Free Tier

Resend's free tier allows 100 emails/day and 3,000/month — more than enough for a single-team internal app sending one digest per day.

7. API Endpoints (v1.2)

MethodPathDescription
GET/api/remindersList reminders (filters: location_id, status, type, priority, upcoming)
POST/api/remindersCreate reminder
GET/api/reminders/:idGet single reminder
PUT/api/reminders/:idUpdate reminder
DELETE/api/reminders/:idDelete reminder
POST/api/reminders/generate-location/:idAuto-generate all reminders for a location
POST/api/reminders/test-emailSend a test email
GET/api/calendarGet events (tasks + reminders) for a month
GET/api/dashboardDashboard stats now includes reminder_stats and attention array
GET/api/settingsApp settings (email config status)

8. Running Migration 003

Before v1.2 features work, run the database migration in your Cloudflare Dashboard or via wrangler:

wrangler d1 execute sonan-location-launchpad --remote --file=db/migrations/003_reminders_recurring_email.sql

This adds the new columns to the locations table and creates the reminders table.

← Back to Documentation