# elodie-sevestre/ada-projet-adataviz architecture

> Architecture diagram of the GitHub repository elodie-sevestre/ada-projet-adataviz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elodie-sevestre/ada-projet-adataviz
- Repository: https://github.com/elodie-sevestre/ada-projet-adataviz

## Overview

adataviz is a web app for finding Nantes Métropole public Wi-Fi hotspots. Its main workflow starts with initial loading or a commune search, requests matching records, then synchronizes result cards, map markers, and the result count; pagination appends further results. The README also identifies interactive card details and Mapbox as product capabilities. The excerpts show the loader coordinating these updates; unsampled page markup and styling are not modeled, and no separate inspection of unsampled modules is assumed.

Main entry points: [`src/loader.js`](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/loader.js) (Load coordinator), [`src/state.js`](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/state.js) (Query and counts), [`src/search.js`](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/search.js) (Commune search), [`src/pagination.js`](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/pagination.js) (Load more)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Search and loading"]
  node_entry["App entry<br/>[main.js]"]
  node_search["Commune search<br/>[search.js]"]
  node_loader["Load coordinator<br/>[loader.js]"]
  node_api["Open Data API<br/>[api.js]"]
end

subgraph group_results["Results and pagination"]
  node_cards["Result cards<br/>[render.js]"]
  node_pagination["Load more<br/>[pagination.js]"]
end

subgraph group_mapview["Map view"]
  node_map["Map and markers<br/>[map.js]"]
end

subgraph group_shared["Shared state"]
  node_state["Query and counts<br/>[state.js]"]
end

node_visitor(("User"))
node_open_data[("Nantes Open Data")]
node_mapbox["Mapbox GL"]

node_entry -->|"starts loading"| node_loader
node_entry -->|"reads query"| node_state
node_entry -->|"initializes"| node_map
node_visitor -->|"enters commune"| node_search
node_search -->|"updates query"| node_state
node_search -->|"requests refresh"| node_loader
node_search -->|"checks visibility"| node_pagination
node_visitor -->|"requests more"| node_pagination
node_pagination -->|"advances offset"| node_state
node_pagination -->|"requests next page"| node_loader
node_loader -->|"requests records"| node_api
node_api -->|"reads page size"| node_state
node_api -->|"fetches records"| node_open_data
node_loader -->|"renders results"| node_cards
node_loader -->|"updates markers"| node_map
node_loader -->|"stores total"| node_state
node_map -->|"fetches initial markers"| node_open_data
node_map -->|"creates map markers"| node_mapbox

click node_entry "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/main.js"
click node_search "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/search.js"
click node_loader "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/loader.js"
click node_api "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/api.js"
click node_cards "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/render.js"
click node_pagination "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/pagination.js"
click node_state "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/state.js"
click node_map "https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/map.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_search,node_loader,node_api,node_visitor toneBlue
class node_cards,node_pagination,node_open_data toneAmber
class node_map toneMint
class node_state toneRose
class node_mapbox toneIndigo
```

## Components

### Search and loading

- [App entry](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/main.js): `src/main.js`
- [Commune search](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/search.js): `src/search.js`
- [Load coordinator](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/loader.js): `src/loader.js`
- [Open Data API](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/api.js): `src/api.js`

### Results and pagination

- [Result cards](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/render.js): `src/render.js`
- [Load more](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/pagination.js): `src/pagination.js`

### Map view

- [Map and markers](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/map.js): `src/map.js`

### Shared state

- [Query and counts](https://github.com/elodie-sevestre/ada-projet-adataviz/blob/main/src/state.js): `src/state.js`

### Other components

- **User**
- **Nantes Open Data**
- **Mapbox GL**

## Connections

- App entry → Load coordinator: starts loading (evidence: `src/main.js`)
- App entry → Query and counts: reads query (evidence: `src/main.js`)
- App entry → Map and markers: initializes (evidence: `src/main.js`)
- User → Commune search: enters commune (evidence: `src/search.js`)
- Commune search → Query and counts: updates query (evidence: `src/search.js`)
- Commune search → Load coordinator: requests refresh (evidence: `src/search.js`)
- Commune search → Load more: checks visibility (evidence: `src/search.js`)
- User → Load more: requests more (evidence: `src/pagination.js`)
- Load more → Query and counts: advances offset (evidence: `src/pagination.js`)
- Load more → Load coordinator: requests next page (evidence: `src/pagination.js`)
- Load coordinator → Open Data API: requests records (evidence: `src/loader.js`)
- Open Data API → Query and counts: reads page size (evidence: `src/api.js`)
- Open Data API → Nantes Open Data: fetches records (evidence: `src/api.js`)
- Load coordinator → Result cards: renders results (evidence: `src/loader.js`)
- Load coordinator → Map and markers: updates markers (evidence: `src/loader.js`)
- Load coordinator → Query and counts: stores total (evidence: `src/loader.js`)
- Map and markers → Nantes Open Data: fetches initial markers (evidence: `src/map.js`)
- Map and markers → Mapbox GL: creates map markers (evidence: `src/map.js`)
