Entreprises Map : Interactive Business Map
Projet personnel
Technologies
- TypeScript
- React
- Vite
- Leaflet
- MapLibre GL
- French Open Data APIs (SIRENE
- API Géo
- IGN Géoplateforme)
- OpenStreetMap
À propos du projet
Description disponible en anglais uniquement.
Entreprises Map is a web application that shows every business around a given location on an interactive map. Each business is a colored marker for its sector, and opens a detailed card with its contact information.
The goal was to build a fast, free prospecting and discovery tool that needs no API key and runs only on public French open data, while staying smooth with thousands of points on screen.
Key Contributions:
Open Data Integration: Combined four free public sources into one consistent data model: the SIRENE business registry (API Recherche d'entreprises), API Géo for towns (department, region, population), the IGN Géoplateforme for address geocoding, and OpenStreetMap through Overpass for phone numbers, websites and opening hours. Each business is placed at the address of its local establishment, not its head office. A distance filter removes any point outside the search radius.
Smart Paginated Loading: Wrote a custom React hook that loads up to 1,000 businesses at once (40 pages, 4 requests in parallel) without going over the API's limit of about 7 requests per second. It supports request cancellation and shows a live progress bar. Markers appear as data arrives. When a zone holds more results, a contextual panel offers to load the next batch or to reduce the radius.
High-Performance Rendering: Drew all markers on a single canvas layer instead of thousands of DOM elements. Each sector icon is drawn once per size and cached as a sprite, so the map stays fluid with thousands of businesses. The base map uses free vector tiles (MapLibre GL + OpenFreeMap), with map detail layers you can turn on and off. The sidebar list is virtualized: only visible rows are in the DOM.
Sector Classification & Accessible Palette: Mapped French NAF activity codes to 13 business sectors, each with its own color and icon. The palette was chosen by calculation: a perceptual distance (CIEDE2000) of at least 15 between any two colors, and a contrast of at least 3:1 with the white icons. Unit tests enforce these rules. The legend works as a filter and shows a live count per sector.
Unified Search (Place, Company, SIREN/SIRET): Built one search bar with debounced autocomplete, keyboard navigation and accent-insensitive highlighting. Results are grouped into companies, towns and addresses. The bar recognizes SIREN (9 digits) and SIRET (14 digits) numbers and handles towns that share the same name. Choosing a company flies the map to it, opens its card, and loads the businesses around it.
Same-Address Grouping: Merged businesses that share the same location (same building, business-hosting addresses) into a single marker with a count badge. Hovering shows "N businesses at this address", and clicking opens a list of all of them. Closed businesses are loaded but hidden by default, and can be shown faded with no new request.
Animated, Accessible UX: Animated flight to the chosen place, a pulsing center marker, an animated radius circle, markers that appear in sequence, and a floating status bar. All animations turn off when the system asks for reduced motion, and in dense mode (more than 400 points).
Privacy & Compliance: Sole proprietors (individual entrepreneurs) are hidden by default and counted separately, in line with GDPR and the CNIL's rules for B2B prospecting.
Quality: About 2,600 lines of strictly typed TypeScript, organized into API, hooks, components and pure logic modules. About 50 Vitest unit tests cover data mapping, grouping, search parsing and the palette rules.
What's next:
- CSV export of the filtered businesses in the current zone.
- Contact tracking saved in the browser (contacted, to call back, not interested), to follow up without an external CRM.
- Smart clustering at low zoom levels to read very dense areas better.
- More contact data, by improving the OpenStreetMap coverage and adding other open sources.
- Public deployment so it can be used without installing anything.