Files
zooqueenandHanzo Dev 4367112d4f Lux Quest: build a scavenger hunt out of real places and send it to a friend
The repo was a "coming soon" page. This is the game.

A quest is a VALUE, not a database row — name, prize and every stop encode into
the share link, so making one and sending it needs no account, no server and no
storage. The code rides in the URL FRAGMENT, never the query string: a fragment
is not sent to the server and does not appear in a Referer header, so the places
someone chose stay out of access logs and off any site they click through to.
`?q=` would quietly publish every quest anyone shares.

Arriving is the one rule worth getting right. A stop is found when the device
reports a position inside its radius, and the browser's own accuracy estimate is
ADDED to that radius — a phone between tall buildings reports ±50 m, and holding
it to the bare radius tells someone standing at the right door they are not
there. Wildly inaccurate readings are capped, so a device claiming ±50 km cannot
unlock a city from the sofa.

Google is confined to one module. With no NEXT_PUBLIC_GOOGLE_MAPS_KEY every stop
falls back to a list with a Maps link and the hunt is still playable, and "no key
configured" is kept distinct from "Google refused" — collapsing those is how a
missing env var gets mistaken for an outage.

Prizes are the maker's own words, settled between the two people. Nothing here
holds money or hands anything out; an escrow would be a custody problem and
saying otherwise in the UI would be a lie about what happens when someone wins.

Proven, not asserted: 28 unit tests over the pure core (unicode place names,
truncated and hand-edited links returning null instead of throwing, coordinate
precision against a 45 m radius, corrupt localStorage) and 7 Playwright tests
driving the real static export at phone size with FAKED GPS — walk to Clarion
Alley and the point lands, stand three blocks away and it does not, refuse
location and the screen says so rather than doing nothing silently.

Also fixes a pre-existing break: Tailwind was configured with no stylesheet
importing it, so every utility class in the app was inert.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 16:27:59 -07:00
..