Skip to content

feat: saved custom places + home location (signed-in, private) #60

Description

@AnayDhawan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions