How matdesbois/openretailmap works
OpenRetailMap is a French commerce observatory: its main user workflow is viewing and filtering a map, inspecting or editing a shop, and optionally validating its OSM–SIRENE match. Nightly jobs refresh source data, match records, and regenerate commercial poles; API routes serve tiles, exports, quality information, and edits. README capabilities also include press monitoring and RTK field validation, but the supplied tree has no clearly dedicated implementation for them, so those are not presented as verified runtime components.
Main entry points: main.py FastAPI application · osm_edit.py Shop edit API · tiles.py Vector tile API · nightly_pipeline.py Nightly orchestrator
Components 22
Map and workflows
- Commerce map
js/main.fusion.js - Search and filters
js/search.js - Shop editor
js/shop_edit.js - Pole views
js/poles_realtime.js - Quality dashboard
js/quality_dashboard.js
Application API
- FastAPI application
backend/main.py - Access gate API
backend/routes/auth_gate.py - Shop edit API
backend/routes/osm_edit.py - Vector tile API
backend/routes/tiles.py - SIRENE matching API
backend/routes/sirene.py - Data exports
backend/routes/export.py - Quality API
backend/routes/quality.py
Data and analysis
- Shop data model
backend/models/shop.py - Similarity scoring
backend/matching/similarity.py - Pole generation
backend/poles_generator.py - PostgreSQL / PostGIS
backend/db_pool.py - Redis tile cache
backend/cache.py
Data refresh
- OSM import
backend/osm_import.py - Nightly orchestrator
backend/scripts/nightly_pipeline.py
Other components
- Territorial users
- OSM service
- SIRENE source
Connections 24
- Territorial users → Commerce map: views
- Commerce map → Vector tile API: requests tiles
- Search and filters → Commerce map: filters map
- Territorial users → Shop editor: edits shops
- Shop editor → Shop edit API: submits edits
- Territorial users → Pole views: explores poles
- Territorial users → Quality dashboard: reviews quality
- FastAPI application → Access gate API: registers routes
backend/main.py - FastAPI application → Shop edit API: registers routes
backend/main.py - FastAPI application → Vector tile API: registers routes
backend/main.py - FastAPI application → SIRENE matching API: registers routes
backend/main.py - FastAPI application → Data exports: registers routes
backend/main.py - FastAPI application → Quality API: registers routes
backend/main.py - Shop edit API → Shop data model: validates edits
backend/routes/osm_edit.py - Shop edit API → Redis tile cache: invalidates tiles
backend/routes/osm_edit.py - Vector tile API → PostgreSQL / PostGIS: reads features
backend/routes/tiles.py - Vector tile API → Redis tile cache: caches tiles
backend/routes/tiles.py - SIRENE matching API → Similarity scoring: scores matches
backend/routes/sirene.py - Pole generation → PostgreSQL / PostGIS: reads and writes
backend/poles_generator.py - OSM import → PostgreSQL / PostGIS: imports records
backend/osm_import.py - Nightly orchestrator → Similarity scoring: runs matching job
backend/scripts/nightly_pipeline.py - Nightly orchestrator → Redis tile cache: flushes tile cache
backend/scripts/nightly_pipeline.py - OSM service → OSM import: provides OSM data
- SIRENE source → Nightly orchestrator: supplies updates