Apps templates

Full design · Apps

Trip planner

Meridian, a shared trip planner for small groups of friends or family travelling together, Sydney based and built for trips that cross the country and cross time zones.

Live preview. Click around, it works.

About this template

Meridian, a shared trip planner for small groups of friends or family travelling together, Sydney based and built for trips that cross the country and cross time zones. Trips lists every trip the group is planning or has taken, each with its dates, destinations and a Viewing as switch between the organiser, who manages members, dates and bookings, and a member, who plans alongside them but cannot remove the trip or another member. Itinerary lays the trip out day by day: stops are dragged into a new order or a new day, each keeps the local time zone of the place it is in rather than the traveller's home time zone, and an overnight flight or a late transfer carries its arrival into the next day correctly. A stop whose gap to the next is too short, or whose local arrival lands after the next stop's local start, is flagged with a held clash mark until the order changes or the gap widens. Places holds everywhere the group has saved to the trip with a note on why, whether or not it has made it into a day yet. Packing is a shared list, ticked off by whoever is packing it. Budget keeps every cost in whole cents, split evenly or by exact share, and totals who owes whom, settled in one step. Bookings holds the trip's flights, stays and activities as demo records, clearly labelled demo, naming no real airline, hotel or booking site. The itinerary can be turned into a clean printable or shareable day sheet at any point. All figures are fictional and general information; nothing on screen states a real visa, entry or health requirement as fact.

What the agents are asked

The first message sent when you use this template. You can edit the plan before anything is built.

Adapt Meridian to my own group's trips. Keep the six screens (Trips, Itinerary with drag to reorder and time zone aware stops, Places, Packing, Budget with cents based splitting and who owes whom, Bookings) and keep every working rule: each stop's time is shown and stored in the local time zone of the place it is in, an overnight or late connection correctly carries its arrival into the next calendar day, a stop with too short a gap or an impossible connection to the next is flagged until the order or gap changes, money is stored and totalled in whole cents, and a member can plan and split costs but only the organiser can remove the trip or another member. Replace the trips, places, itinerary stops, packing items, budget entries and members with mine, keep the sample rows marked Sample and removable in one step, and keep every booking clearly labelled demo, naming no real airline, hotel, tour operator or booking site. Keep every destination and place fictional or generic, with no claim about a real visa, entry or health requirement stated as fact anywhere. When I want real sign in and a shared database, wire in the tables and functions schema.sql describes as the README explains, with every secret key kept on the server.

A shared trip planner for small groups of friends or family travelling together. Meridian gives a group one itinerary instead of six group chats: a day by day plan where every stop shows its own place's local time, a shared list of saved places, a packing list, a budget split in whole cents that always knows who owes whom, and a set of demo bookings, clearly labelled demo.

"Meridian" is invented for this template. It is not modelled on any real travel product. Every trip, place, person and booking in the sample data is fictional; email addresses use the reserved .example domain. Destination cities (Sydney, Tokyo, Kyoto, Osaka and a stand in for a stop in central Vietnam) are real places, but every photograph, place description and itinerary note describes what is actually shown or planned in general terms, never a claim to be a specific real landmark, temple, bay or business. Every booking names a made up provider and is labelled Demo booking on screen; no real airline, hotel, tour operator or booking site is named anywhere. Nothing here states a real visa, entry or health requirement as fact.

Built on the NovaBuild template kit (docs/guardrails/TEMPLATE-KIT.md): one CONFIG block, one design token block, and a shared data layer that runs in demo mode with no backend or against a real Supabase project once one is connected, with no code change either way.

Screens

  • Trips (#/): every trip the visitor is on, each with its dates and members, and a way to start a new one.
  • Itinerary (#/trip/<id>/itinerary): the trip laid out day by day. Every stop shows its own local time (a flight or long train also shows the zone it arrives in); stops are reordered by dragging or with the up and down buttons, which is a real time edit, not just a list order. A stop that does not get enough of a gap after the one before it is flagged, naming the shortfall, until the order changes or the gap widens. "Share" builds a plain text copy of the plan to paste anywhere; "Print" uses the browser's own print styles.
  • Places (#/trip/<id>/places): everywhere the group has saved to the trip, scheduled or not, with a note on why it is there.
  • Packing (#/trip/<id>/packing): a shared checklist, optionally assigned to a member.
  • Budget (#/trip/<id>/budget): every shared cost, split evenly or by an exact amount, in whole cents; a balance per member and a minimal list of suggested transfers that clears them, settled in one step.
  • Bookings (#/trip/<id>/bookings): demo flights, stays and tours. Every card carries a plain "Demo booking" label.
  • Trip settings (#/trip/<id>/settings, reached from the gear icon beside the trip name, not the main nav): the trip's name, dates, home zone and currency, the member list, and, for an organiser, removing the sample data or the trip itself.

Roles, and where each one is enforced

A trip has two kinds of member: an organiser and a member. Both can plan together (add and edit places, itinerary stops, packing items and expenses); only an organiser manages who is on the trip and the trip's bookings and settings.

CapabilityOrganiserMember
View the trip, plan places, the itinerary, packing and expensesYesYes
Add, edit or remove a place or an itinerary stopYesYes
Add or remove a packing item, tick one offYesYes
Add an expense or settle upYesYes
Remove an expenseYes, or the member who added itOnly their own
Add, edit or remove a bookingYesNo
Add, remove or change the role of a memberYesNo
Rename the trip, change its dates, zone or currencyYesNo
Remove the sample data or delete the tripYesNo

The demo's "Viewing as" switch (top bar, once a trip is open) simulates being signed in as the trip's organiser or as its first other member: it decides what the interface shows, and the same rule decides what the interface refuses. On a connected backend the same table is enforced twice more, independently of the interface:

  1. Row level security in schema.sql grants every table only to authenticated, then narrows it to a trip's own members (is_trip_member()), and bookings writes to an organiser only (is_trip_organiser()). A person who is not a member of a trip has no policy that matches them, so they see nothing of it, not even that the trip exists.
  2. SECURITY DEFINER functions (create_trip, add_trip_member, change_member_role, remove_trip_member, add_budget_entry, delete_budget_entry, record_settlement, remove_sample_data) check the caller's own role themselves and refuse exactly what the table above says they should. trips, trip_members, budget_entries, budget_shares and settlements hold no insert grant at all: creating a trip, adding or changing a member, and every expense and settlement, only ever happens through one of these functions. The demo rpc handlers in script.js mirror each function's checks and messages so the two never drift apart (docs/ops/LESSONS.md L35).

Signature: an itinerary that gets time zones right

The three things this template is built to prove:

  1. Every time is shown in the place it happens, not the visitor's own clock. Two functions carry the whole signature: zonedTimeToUtc(date, time, zone) turns what someone typed into a form into the one correct UTC instant, and utcPartsInZone(iso, zone) (with the display helpers built on it) reads that instant back out in any zone. Neither hardcodes a single daylight saving rule; both ask Intl.DateTimeFormat what a zone's offset actually is at a given moment, so they are correct for any IANA zone a customer's own trip ever names, not just the handful in the sample data. A stop that lands somewhere else (a flight, a long train or ferry) carries a second zone, end_timezone, so its arrival reads in the place it actually lands, not the place it left; an overnight departure showing an arrival the next calendar day falls straight out of formatting the same instant correctly in two zones, never a special case in the code.
  2. Reordering is a real time edit, and that is what can create or clear a clash. Dragging a stop (or the up and down buttons, for a keyboard) does not just change a list position: moveStopToIndex gives the stop a new start_at that sits between its new neighbours, keeping its own duration and zones. The itinerary is always shown in that real chronological order, so a stop whose neighbour changed can immediately clash, or stop clashing, with nothing re-run by hand.
  3. A clash names the shortfall, not just that there is one. Every stop carries min_gap_minutes, how long it genuinely needs after the stop before it; the itinerary compares that against the real gap (the later stop's own zone and the earlier one's end time, whatever zones either is in) and, if it falls short, says by how much ("Only 45 minutes to get here; needs at least 90"). The sample trip seeds one on purpose: a farewell dinner in Osaka ends at 19:30, the flight to Da Nang needs boarding by 20:15 and asks for a 90 minute buffer, and the itinerary flags it the moment the page opens.

Art direction

Seven photographs, one shoot: sydney-harbour-morning, tokyo-backstreet-lanterns, kyoto-moss-garden, kyoto-bamboo-path, osaka-riverside-evening, hoian-lantern-canal and halong-bay-limestone, each the photo for exactly one saved place; two further places (a ramen counter, a night market street) carry no photograph and show a plain typeset tile instead. Warm late day light across the set, real shadows, fine film grain, true to life colour, no airbrushing, no readable text or signage in any frame.

Two of the seven took three attempts. The first pass for tokyo-backstreet-lanterns came back as a lantern lit alley with fake characters on the lanterns (docs/ops/LESSONS.md L29), and the first hoian-lantern-canal duplicated that same lantern subject (TEMPLATES.md, "one subject per photograph"), so both prompts were rewritten to drop lanterns entirely: a residential backstreet at blue hour, and a canal at dawn with a moored rowboat. The second attempt still carried the problem it was written to avoid, lanterns in one frame and a lettered sign in the other, so both were reframed a third time as tight close views, which leaves no surface for either fault to land on. tokyo-backstreet-lanterns is now a close view of a lit lattice doorway with two bicycles and the overhead power lines, cropped to remove a lettered plate on one of the poles (the crop is recorded in media.json); hoian-lantern-canal is a close view of a rowboat at worn stone steps below a sunlit plaster wall, with no lanterns and no lettering. The two place records these belong to (tokyoLane, canal in SAMPLE_PLACES) and their notes describe a lane and a canal in general terms and do not promise a wider scene than either photograph actually shows. Every caption and alt text on screen (PHOTO_ALT in script.js) describes what the photograph actually shows in general terms; none claims to be a specific real landmark, temple, bay or business.

Data model (schema.sql)

trips, trip_members, places, itinerary_stops, packing_items, budget_entries (with budget_shares, its per member split), settlements and bookings. Every table has row level security; anon has no access to anything, because a trip is only ever visible to its own members.

itinerary_stops.end_at is set by a trigger (nova_set_stop_end) from start_at and duration_minutes, never computed inline in a query: adding an interval to a timestamptz is only STABLE, not IMMUTABLE, so that arithmetic cannot sit in a constraint or index (docs/ops/LESSONS.md L31).

budget_entries and settlements are effectively append only: nothing holds an update grant on either, and no function updates one in place. A mistake is corrected by removing the entry (delete_budget_entry, the entry's own creator or an organiser) and adding a new one, never by editing amounts after the fact (GENERATED-APPS.md, "Money and counters are append-only"); every balance on screen is recomputed fresh from budget_entries, budget_shares and settlements each time, so there is no stored running total a stray write could corrupt.

claim_trip_invite() links a freshly signed in person to the trip_members row an organiser already added for their email, matched against their own verified JWT email, never a value they type in. Nothing in this template's interface calls it yet, because demo mode has no real sign in; wire it into your sign up flow once you connect a backend, the same pattern as the admin dashboard template's claim_invite.

remove_sample_data() is the only way the sample rows go away: nobody, at any role, holds a delete grant on places, itinerary_stops, packing_items, budget_entries, settlements or bookings other than through this function, and it only ever removes rows marked is_sample, never anything a real visitor added.

Going live

Set CONFIG.backend in script.js to { mode: 'supabase', url: 'https://<project>.supabase.co', anonKey: '<publishable key>' } once schema.sql is applied to a real Supabase project. Everything else, every screen, every role check, every write, works unchanged: the kit's data layer switches from localStorage to PostgREST with no other code change. Never put a service_role key or a sb_secret_... key here; the kit refuses to start with one and falls back to demo mode.

Sample data

Every sample row is marked is_sample. An organiser can remove it in one step from Trip settings, through remove_sample_data() (above), which keeps anything a real visitor has added or changed themselves; a sampleVersion bump (script.js) replaces stale sample rows in a returning visitor's browser without ever touching their own data (docs/ops/LESSONS.md L21). The sample trip's dates are generated relative to today, not hardcoded, so the itinerary and its one deliberate clash always sit a few weeks out, whenever the template is opened.