Trip Ledger by SGD
Real-Time Trip Budget TrackerTrip 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.
Dolomites
2026-07-24 → 2026-08-01- 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-key | List all trips. |
| POST | /api/tripsx-api-key | Create a trip and make it the active one. |
| PATCH | /api/trips/:idx-api-key | Update a trip - switch which one is active, adjust the budget, rename it, change dates. |
| DELETE | /api/trips/:idx-api-key | Delete a trip and every expense on it. |
| GET | /api/expenses?trip_id=...x-api-key | List expenses for a trip. |
| POST | /api/expensesx-api-key | Add an expense. trip_id is optional - defaults to the active trip. |
| DELETE | /api/expenses/:idx-api-key | Delete a single expense. |
| GET | /api/summaryx-api-key | Everything the dashboard shows in one call: active trip, computed budget stats, full expense list. |
| GET / POST | /api/notify?slot=morning|eveningx-cron-secret | Sends 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-secret | Sends 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/expensesTrigger a full report email
curl "https://agent-trip-tracker.vercel.app/api/notify?slot=report" \ -H "x-cron-secret: your_cron_secret_here"