Project not found.

Phase 7a: Location Discovery + Navigation

phase-mcd-tracker-7a-location-discovery Phase

phase
Goal: New users see nearby McDonald's immediately. Each location has a profile page with notes and a "Guide me there" button that opens native maps.
Owner: Dev agent (API + SvelteKit) + Lucas (UX iteration via dev overlay)
Repo: forgejo_admin/mcd-tracker-api, forgejo_admin/mcd-tracker-app, forgejo_admin/mcd-tracker-playground
Depends on: phase-mcd-tracker-7-sveltekit (dev overlay operational)

Scope

User Stories

Key Story Acceptance
discover I open the app and see McDonald's near me, even with zero saved locations Home page shows nearby results from GET /locations/nearby on mount
profile I tap a McDonald's and see its full profile — address, distance, my codes, my notes Location detail page renders for both saved and unsaved locations
navigate I tap "Guide me there" and get turn-by-turn directions Opens Apple Maps (iOS) or Google Maps (web) via deep link
notes I leave a personal note on a location (e.g. "ice cream machine works here") CRUD notes on location detail page

API (mcd-tracker-api)

  • GET /locations/nearby — already exists. May need to work for users with no saved locations (currently returns saved_match data).
  • POST /locations/{id}/notes — NEW. Create a personal note. Fields: text, created_at.
  • GET /locations/{id}/notes — NEW. List user's notes for a location.
  • DELETE /locations/{id}/notes/{note_id} — NEW. Remove a note.
  • DB: new location_notes table (id, keycloak_sub, location_id, text, created_at)

Playground (mcd-tracker-playground)

  • Update home.html — add "Nearby" section showing discovered (unsaved) locations
  • Update location-detail.html — add notes section, "Guide me there" button
  • Update @-comment specs to reflect new API endpoints and state

SvelteKit (mcd-tracker-app)

  • Update /home — fetch nearby on mount (GPS → GET /locations/nearby), show results
  • Update /locations/[id] — render notes, "Guide me there" link
  • Notes CRUD on location detail page

"Guide me there" — no API key needed

Deep link, not an API call. Capacitor detects platform:

Deliverables

PR #8 merged (2026-03-17): GPS-based location discovery on home page + "Guide me there" on location detail. Home page calls GET /locations/nearby on mount, renders results as location cards with distance in miles. Location detail has Google Maps deep link button.
Remaining: Location notes (CRUD), profile page for unsaved locations, Apple Maps detection for iOS.
  • plan-mcd-tracker — parent plan
  • phase-mcd-tracker-7-sveltekit — depends on dev overlay
  • sop-capacitor-mobile-lifecycle — follows Vite-on-host local dev pattern