feat(admin): add addresses + geocoding to organizations
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Description
Summary
Organizations need addresses so they can be placed on the community map alongside members. Addresses must be geocoded to lat/long so the map can render them without per-request lookups, mirroring the existing pattern on profiles (latitude/longitude + showOnMap).
Requirements
- Add address columns to
organizations(street/city/region/country/postalCode +latitudenumeric(9,6) +longitudenumeric(9,6) +showOnMapboolean) - Migration: backfill
latitude/longitudeas nullable; existing rows stay null until geocoded - Geocoding pipeline (Nominatim or Mapbox — pick one and document) triggered on address change in admin PATCH
- Admin UI: address fields on the org detail page Identity tab + a read-only "Geocoded to: ${lat}, ${lng}" preview with a re-geocode button
- Public map (
apps/webmap surface used by the directory) picks up org pins gated onshowOnMap -
showOnMaptoggle defaults tofalsefor legacy imports; orgs explicitly approved via admin can flip on
Context
The profiles table already has latitude, longitude, showOnMap, and publicLocation — the org-side schema should mirror those names so map rendering can stay type-uniform across actor kinds.
Implementation Notes
Geocoding is async and the admin shouldn't block on it: store address fields synchronously on PATCH, then enqueue a geocode job. For the v1 a single inline fetch to Nominatim on save is probably acceptable given org volume; we can move to a queued worker later if rate limits bite.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the organizations schema and admin flow with the existing profiles fields, then trace the admin PATCH and the Identity tab. Review the apps/web directory map surface and decide between Nominatim and Mapbox for geocoding. Done means organizations support persisted addresses and coordinates, admin re-geocoding, opt-in map visibility, and organization pins alongside member pins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100