Let players search for other players by location

Open
#384 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
openapi, python

Research direction

First resolve the location-search definition, privacy and age rules, location-only search policy, and paging behavior before implementing. Then inspect the GET /api/v1/players/search endpoint, the relevant ADR and openapi/openapi.json, and existing player-search tests. Done means the agreed rules are applied in the query, the API specification and privacy documentation are updated, and tests cover hidden locations, minors, and made-up players and places.

Written by the indexing model from the issue text.

Description

area:api area:players enhancement needs-decision

Context

The app's Players tab (openpickleball/frontend#348) lets a player search other players by name. Players also want to find players near them, for example everyone in their city.

GET /api/v1/players/search matches only the start of a word in the display name. There is no way to filter by location.

This needs a decision before work starts. Location is personal data with its own privacy setting (city_region_visibility). Search by location must not reveal a location the player hid. For example, if a hidden player still showed up when searching "Springfield", the search would tell the viewer where they live.

Questions to decide

  • What "location" means for search: city and region as stored at signup, or distance from the viewer (which needs coordinates and more privacy work)?
  • Only players whose city and region the viewer may see can match a location search. Confirm this, and the rule for players aged 13 to 17 (see #323).
  • Is a name required, or can a player search by location alone? A location-only search lists everyone in a place, which is much easier to scrape. ADR 0018's limits may need to change.
  • Paging, since a city can have more than 20 players.

Draft scope, after the decision

  • ADR, or an amendment to ADR 0018
  • Location parameters on GET /api/v1/players/search, and the regenerated openapi/openapi.json
  • Privacy and age rules applied in the query, not after it
  • Update docs/privacy/personal-data-inventory.md if what is searchable changes
  • Tests with made-up players and places
Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.