Nearby discovery
Nearby discovery lets people find and message others close to them — at an event, on a campus, in a neighbourhood — without having exchanged anything beforehand.
Opting in
Discovery is off by default. A user turns it on from the app, which:
- asks the browser for location permission,
- stores the location on the server (
PUT /api/profile/location), and - marks the profile as searchable (
PUT /api/profile/searchable).
Only users who have done both appear to others.
Automatic expiry
Discovery switches itself off DISCOVER_TTL_DAYS (14 by default) after the location was last refreshed, so nobody stays findable at an old location by accident. Using the feature again refreshes the location.
Searching
The Nearby screen lists searchable users sorted by distance:
- Distance — the search radius in kilometres (default 1 km).
- Labels — filter to people who have all of the selected labels.
Under the hood this is GET /api/discover/users?distance=<km>&label[]=<label>. Results include name, avatar, online status, last seen and distance — never the exact location.
Labels
Labels are short interest tags (up to 30 characters, at most 20 per user) shown on a profile and used as discovery filters. GET /api/labels returns the labels in use.