feat(api): geocode member city/region to lat/long on save
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- typescript
- Domínio
- backend-api-design, databases
Direção de pesquisa
Read packages/api/src/routes/me.ts and packages/api/src/routes/admin/users/byId.ts, then inspect packages/api/src/db/schema/users.ts:103-115. Coordinate the Nominatim or Mapbox choice with #1969 before shaping the shared pipeline. Done means address changes and the backfill script populate coordinates, preserve existing values on failure, log failures, and record successful geocoding.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
profiles already has city, region, countryId, latitude, longitude, and showOnMap columns, but latitude/longitude are never populated automatically — they exist only because someone manually wrote to them. A geocoding pipeline should run on profile address changes so map placement just works.
Requirements
- On
PATCH /me/profile(packages/api/src/routes/me.ts): whencity,region, orcountryIdchanges, enqueue or inline-call a geocoder - On
PATCH /admin/users/:id(packages/api/src/routes/admin/users/byId.ts): same trigger when an admin edits the address fields - Geocoded values write to
profiles.latitude/profiles.longitude; if the geocode fails (no result, rate-limited, network error) the existing lat/long stays put and we log the failure - A nullable
profiles.geocoded_attimestamp records the last successful geocode — distinguishes "never tried" from "tried, no result" - Backfill script
packages/api/scripts/geocode-profiles.tsfor the existing roster: iterate over profiles with city + country and no lat/long - Geocoder choice (Nominatim vs Mapbox) decided in coordination with #1969 — orgs and members should use the same one
Context
profiles.{city, region, countryId, latitude, longitude} already exist (packages/api/src/db/schema/users.ts:103-115). The map plumbing on the web app reads these — populating them is the missing link.
Pairs with #1969 (org-side addresses + geocoding) — same pipeline serves both.
Implementation Notes
Nominatim has a 1 req/sec public rate limit + a User-Agent header requirement; that's plenty for an admin PATCH but means the backfill script needs a setTimeout delay between calls. Mapbox is faster but needs an API key + budget. Decide once for both #1969 and this issue and reuse the same lib/geocode.ts.
- Linguagem predominante
- HTML
- Estrelas
- 33
- Forks
- 107
- Merge médio
- 14h 6min
- PRs com merge (30d)
- 19
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de USRSE/usrse.github.io
-
update community awardsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
USRSE/usrse.github.io#2117 ·
Mantenedores costumam responder em até 1 dia
-
Update conference link from USRSE'26 to USRSE'27.Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 63/100
USRSE/usrse.github.io#2115 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Broken URLs on the websiteAbertabroken-links
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
USRSE/usrse.github.io#2099 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
USRSE/usrse.github.io#2085 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
USRSE/usrse.github.io#2001 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de USRSE/usrse.github.io
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
genfeedai/genfeed.ai#11828 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue help wanted
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 83/100
NOAA-OWP/ngen#1110 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
-
llama.cpp: streamed tool call arguments get cut off when a chunk has several tool call deltasAbertaintegration: llama_cpp
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
home-assistant/core#195670 · 2 comentários ·
Mantenedores costumam responder em até 1 dia