USRSE / USRSE/usrse.github.io

feat(admin): add addresses + geocoding to organizations

Open
#1,969 0 comments 0 reactions 0 assignees View on GitHub

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 + latitude numeric(9,6) + longitude numeric(9,6) + showOnMap boolean)
  • Migration: backfill latitude/longitude as 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/web map surface used by the directory) picks up org pins gated on showOnMap
  • showOnMap toggle defaults to false for 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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.