Signed-in users can save their own places privately to their account. Private to the user only; the public dataset is unchanged.
Scope
- Saved custom places: a logged-in user can add/edit/delete their own places (name, type, lat/lng, address, note). These render as a private pin layer merged client-side on top of the public
getPlaces() set; only the owner sees them.
- Home location: user can save a home location (lat/lng, label). The existing "Nearest to you" / distance sort (
placesByDistance in src/lib/geo.ts) can then sort against saved home, not just live geolocation.
- Search over saved places: a search box scoped to the user's saved places (name match), separate from the public filter-panel search.
- City filter over saved places: filter the user's saved places by their saved cities.
Backend (Supabase + RLS)
user_places (user_id, name, type, lat, lng, address, note, created_at)
user_home (user_id, lat, lng, label)
- Row-Level Security: each row readable/writable only by its owner (
auth.uid() = user_id).
Behaviour
- Hydrate saved data on login; feature hidden when logged out.
- Degrade cleanly: no saved data => no private layer, public map unaffected.
Acceptance
- A logged-in user saves a place + a home location; both persist across reload.
- Saved places are searchable and filterable by city.
- Nearest-to-home ordering works off the saved home.
- A different account cannot see another user's saved places or home.
Signed-in users can save their own places privately to their account. Private to the user only; the public dataset is unchanged.
Scope
getPlaces()set; only the owner sees them.placesByDistanceinsrc/lib/geo.ts) can then sort against saved home, not just live geolocation.Backend (Supabase + RLS)
user_places(user_id, name, type, lat, lng, address, note, created_at)user_home(user_id, lat, lng, label)auth.uid() = user_id).Behaviour
Acceptance