🧳

Trip Ledger by SGD

Real-Time Trip Budget Tracker

Trip Ledger answers one question during any trip: how much do I have left to spend, right now? Built on Next.js and Supabase, it computes a live daily allowance from trip dates and logged expenses, and ships a complete REST API so expenses can be logged from anywhere - a Siri Shortcut, a script, or a custom integration - not just a web form. A GitHub Actions cron job sends an automated budget digest twice a day while a trip is active, and an on-demand full report emails a category breakdown, a spend-pace projection, and the complete expense list at any time.

Next.jsSupabaseVercelGitHub Actions
agent-trip-tracker.vercel.app
In progress

Dolomites

2026-07-24 → 2026-08-01
5/9day of trip
€891.58Spent
€191.58Over by
€99.06Avg / day
Jul 26activitiesGardena Pass€248.00
Jul 26foodPizza€28.00
Jul 25chargingTesla charge€44.00
Sample data shown - the live app is password-protected to keep real trip data private.
Open Live App
  • Hands-free expense logging via a Siri Shortcut
  • Automated twice-daily budget digest by email
  • On-demand full report: category breakdown + spend-pace projection
  • Multi-currency, works for any trip length

System-to-System API Integration

The web dashboard is just one client of this API - every action it can do (and a couple it can't, like scheduled digests) is available as a plain REST endpoint, which is what makes the Siri Shortcut and the automated email reports possible.

Every endpoint requires an x-api-key header, except /api/notify, which requires x-cron-secret instead - kept as a separate credential so a leaked dashboard key can never trigger notifications, and vice versa.

GET/api/tripsx-api-keyList all trips.
POST/api/tripsx-api-keyCreate a trip and make it the active one.
PATCH/api/trips/:idx-api-keyUpdate a trip - switch which one is active, adjust the budget, rename it, change dates.
DELETE/api/trips/:idx-api-keyDelete a trip and every expense on it.
GET/api/expenses?trip_id=...x-api-keyList expenses for a trip.
POST/api/expensesx-api-keyAdd an expense. trip_id is optional - defaults to the active trip.
DELETE/api/expenses/:idx-api-keyDelete a single expense.
GET/api/summaryx-api-keyEverything the dashboard shows in one call: active trip, computed budget stats, full expense list.
GET / POST/api/notify?slot=morning|eveningx-cron-secretSends the twice-daily budget digest. Only fires while a trip is actually active - this is what the GitHub Actions cron job calls.
GET / POST/api/notify?slot=reportx-cron-secretSends a full report on demand: category breakdown, spend-pace projection, and the complete expense list. Works any time, not just mid-trip.

Log an expense from anywhere

curl -X POST \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"amount": 25.50, "category": "food", "note": "lunch"}' \
  https://agent-trip-tracker.vercel.app/api/expenses

Trigger a full report email

curl "https://agent-trip-tracker.vercel.app/api/notify?slot=report" \
  -H "x-cron-secret: your_cron_secret_here"