← All projects
Case study · Web app · Scheduled jobs and offline sync

Sailday

A trip planner for a group cruise. It checks public prices every hour, compares them with the saved booking, graphs the history and sends opt-in alerts. Plans work offline and sync without losing anyone's edits.

Status
Personal app, private source
Timeline
September 2026
Stack
React, JavaScript, Zod
Works with
Supabase (PostgreSQL, pg_cron), Web Push, Vercel

Key decisionSeparate reading prices from collecting them. Opening the app reads saved prices; only a scheduled or deliberate check contacts the source, and a failed check keeps the last good price.

What it shows

Scheduled collection

Three pg_cron jobs collect public prices hourly. A queued job wakes a server function to send encrypted Web Push alerts, with bounded retries and expired-subscription cleanup.

Prices you can compare

Only quotes for the same sailing and room category count, compared with fare plus taxes rather than the deposit. Gaps in the data break the graph instead of showing a fake drop.

Permissions on the server

PostgreSQL checks the signed-in user and current membership on every edit. Invites are expiring, limited-use links stored as hashes.

Offline without lost work

Edits wait in a durable outbox. Separate field edits merge; two edits to the same field go to the user. The app never claims a save it hasn't confirmed.

Limits

Discuss Sailday

Ask about scheduled jobs in the database, push notifications or offline sync. Email me at aagarwalcollege@gmail.com.