Feature: Proper GEO Coding and Maps #1
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
JackPrince/GoBDLogBook#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background & Problem
The current geocoding and map tile implementation is basic and lacks flexibility. More importantly, research and community feedback suggest that our current usage does not strictly adhere to the OpenStreetMap Foundation's Usage Policy.
If we continue to use the public OSM endpoints without proper rate limiting, caching, and identifiable User-Agents, our server IP risks being permanently blocked. This needs to be addressed immediately to ensure the stability of the application.
Proposed Solution
We will refactor the geocoding and map tile logic by implementing a robust Manager pattern combined with caching and usage guards. This architecture will support a multi-tenant setup, allowing organization admins (or a super admin) to configure their preferred commercial or self-hosted map provider.
Architecture Highlights
GeoManager): Dynamically resolves the correct driver based on tenant settings (with a fallback to system defaults).GeoUsageGuard): Acts as a middleware/throttler to ensure we never hit API limits (e.g., strictly enforcing Nominatim's 1 req/s rule) and tracks usage metrics.CachedGeocoder): Prevents redundant API calls by caching coordinates. Coordinates will be rounded (e.g., to 4 decimals) to significantly increase cache hit rates for recurring parking spots/routes.Architecture Flow
Tasks
Implementation Summary & Architecture Evolution
During implementation in
feat/geo-provider-pools, the architecture evolved beyond a basic manager pattern into a full Multi-Tenant Provider Pool System to properly address data isolation and security:GET /api/geo/tile-config(withosm_publicas default).companies.map_settings_secret.Merged into
devvia GitLab CI with full unit and feature test coverage. Detailed architecture documented indocs/geo-provider-pools.md.✅ Resolved and Merged into
mainThe geocoding and map tile provider management feature has been fully implemented, tested, and merged into the production
mainbranch (commit174fb224).📦 Deliverables Summary
Provider Pools & Fallback Chains
map_settings_secret).Security & Privacy Safeguards
/api/geo/tile/{z}/{x}/{y}) prevents client-side third-party API key exposure.geo_usage_metrics.Frontend & User Experience
/admin/geo-settings) with live provider connectivity test buttons.Testing & Quality Gates
docs/openapi.yaml).Closing this issue as complete.