Rework entry types: merge hotel into stay, transport with modes, auto-transport

- Type set is now activity/stay/transport/flight/rental/note; hotel, travel
  and immigration are removed with idempotent startup data migrations
  (hotel->stay, travel->transport, immigration->activity with flag prefix)
- Transport entries carry an optional mode (train/bus/ferry/taxi/drive/other)
  that drives the chip/map icon; route stops expose transport_mode
- Creating a stay auto-creates a bridging transport to its neighbouring
  stays unless a transport/flight already covers the gap (one-shot)
- Summary: transports count replaces hotels/travelLegs
This commit is contained in:
2026-07-19 17:47:21 +07:00
parent b066e7b885
commit d393e16ae1
17 changed files with 469 additions and 62 deletions
+9 -7
View File
@@ -4,7 +4,7 @@ A self-hosted, multi-user web tool for collaboratively planning trips. Runs as a
## Core Idea
Multiple people log in to the same instance. Anyone can create a trip by picking a name and a date range. The tool generates a day-by-day calendar for that range, and every member of the trip can fill in what happens on each day — flights, hotel stays, border crossings, drives, activities. The trip is visualized on an interactive map with the route drawn between stops, distances per leg, and an overall summary (days, nights, flights, total km).
Multiple people log in to the same instance. Anyone can create a trip by picking a name and a date range. The tool generates a day-by-day calendar for that range, and every member of the trip can fill in what happens on each day — flights, stays, transports, activities. The trip is visualized on an interactive map with the route drawn between stops, distances per leg, and an overall summary (days, nights, flights, total km).
## Features
@@ -24,13 +24,15 @@ Multiple people log in to the same instance. Anyone can create a trip by picking
| Entry type | Typical fields |
|---|---|
| ✈️ Flight | flight no., from/to airports, departure/arrival time |
| 🛂 Immigration / border | location, notes (visa, documents) |
| 🚗 Travel / transfer | mode (car/train/bus/boat), from → to |
| 🏨 Hotel stay | hotel name, check-in/check-out, booking ref |
| 📍 Activity / sightseeing | place, time, notes |
| 🏙️ Stay (area block / accommodation) | location, from → until dates, hotel name in title, price |
| 🚆 Transport | mode (train/bus/ferry/taxi/drive), from → to; auto-created between consecutive stays |
| ✈️ Flight | flight no., from/to airports, departure/arrival time, multi-leg segments |
| 🚙 Rental car | pickup/dropoff, included km |
| 📝 Note | free text |
(Legacy `hotel`/`travel`/`immigration` entries are migrated automatically at startup: hotel → stay, travel → transport, immigration → activity with a 🛂 title prefix.)
- Every entry can have a **location** (searched via OpenStreetMap geocoding — type "Chiang Mai" and pick from suggestions; lat/lng stored automatically).
- Entries show as compact chips inside the day cell; multiple entries per day, ordered.
@@ -41,7 +43,7 @@ Multiple people log in to the same instance. Anyone can create a trip by picking
- **Distance per leg** (km, great-circle) shown on the route and in a leg-by-leg list.
### 5. Costs & Splitting
- Every entry can carry a **price** (flights, hotels, car rental, train tickets, activities…), in the trip's currency (one currency per trip, no FX conversion).
- Every entry can carry a **price** (flights, stays, car rental, train tickets, activities…), in the trip's currency (one currency per trip, no FX conversion).
- Each priced entry records **who paid** and how it's **split**:
- `equal` — total split equally among selected participants (e.g. rental car 50/50)
- `own` — price is per person, everyone pays their own (e.g. flights)
@@ -50,7 +52,7 @@ Multiple people log in to the same instance. Anyone can create a trip by picking
### 6. Summary
- Total days and nights.
- Number of flights, hotel stays, travel legs.
- Number of flights, stays, transports.
- **Total distance in km** across the whole trip.
- Countries/locations visited (from entry locations).