How lyesprojet/hydroclair works
HydroClair is a Flask site for consulting drinking-water quality in France. Users browse departments or the regional map, select a commune, and view its water network, recent analyses, and conformity alerts. The application delegates lookups to the data model, which queries SQLite. Separate importers populate static geographic/network metadata and network-linked analyses from Hub’eau; the README documents these as the database preparation workflow. The database file is generated locally and is not in the tree, so its node has no source path. Routes and importer links reflect the sampled code; unsampled page behavior is not expanded.
Main entry points: import_analyses.py Analysis import · app.py Flask routes · import_static.py Static data import · update_database.py Parameter updates
Components 9
Web experience
- Flask routes
app.py - Page templates
Vue/templates
Water data access
- Queries and regions
models/models.py - SQLite water database
Data ingestion
- Static data import
models/Back/import_static.py - Analysis import
models/Back/import_analyses.py - Parameter updates
models/Back/update_database.py
Other components
- Site visitor
- Hub’eau API
Connections 11
- Site visitor → Flask routes: sends requests
- Flask routes → Page templates: renders pages
- Flask routes → Queries and regions: requests lookups
- Queries and regions → SQLite water database: queries
- Static data import → Hub’eau API: fetches reference data
- Static data import → SQLite water database: writes metadata
- Analysis import → SQLite water database: reads communes
- Analysis import → Hub’eau API: fetches analyses
- Analysis import → SQLite water database: writes analyses
- Parameter updates → Hub’eau API: fetches updates
- Parameter updates → SQLite water database: updates metadata