20 Commits

Author SHA1 Message Date
Yvv
92fb60c114 ci : ajoute Eau2018.xls au dépôt (requis pour la seed Docker)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- .gitignore : exception !Eau2018.xls dans la règle *.xls
- Eau2018.xls : données tarifaires Saoû 2018, nécessaires à seed.py
  pour créer les 363 foyers et la courbe de référence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:51:51 +01:00
Yvv
532cc1a0e3 ci: déclenche pipeline seed prod
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-03-24 04:39:50 +01:00
Yvv
c1a9548bd7 ci : step seed après deploy (idempotent)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Lance python seed.py dans le conteneur backend après chaque deploy.
Idempotent : crée Saoû + votes si absent, ajoute les fixtures dev sinon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:37:34 +01:00
Yvv
8341a050d3 fix prod : Eau2018.xls dans l'image Docker + build context racine
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- backend.Dockerfile : COPY Eau2018.xls /app/ (contexte = racine projet)
- docker-compose.yml : section build: pour backend et frontend (context: ..)
- seed.py : XLS_PATH cherche d'abord /app/Eau2018.xls, fallback ../

Sans ça python seed.py échoue dans le conteneur (fichier absent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:15:06 +01:00
Yvv
90b069cb88 fix seed : fixtures dev idempotentes, indépendantes de l'early-return
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- DEV_FIXTURES défini au niveau module (constante partagée)
- seed principal (commune + 363 foyers + votes) sous `if commune is None`
- fixtures toujours vérifiées/insérées après, quel que soit l'état de la DB
- résout le cas prod avec DB déjà seedée

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 03:58:31 +01:00
Yvv
19ac64c856 Seed : foyers fixture dev + codes stables dans dev hints
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- seed.py : 3 foyers avec codes fixes (DEVTEST2/3/4, RS/RP/PRO)
  insérés avant les 363 réels ; existing_codes pré-chargé → zéro collision
- page citizen : dev hint mis à jour avec les 3 mêmes codes + profils
- CLAUDE.md : reformaté en guide de session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 03:45:12 +01:00
syoul
017806025c fix: redirect_slashes=False pour éviter les 307 avec IPs Docker internes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
FastAPI redirige /communes → /communes/ avec l'IP container dans le
Location header, inaccessible depuis le navigateur via Fabio.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:41:10 +01:00
syoul
c9bb437695 fix: régénérer package-lock.json (désynchronisé avec package.json)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:19:59 +01:00
syoul
f314998ca5 fix: npm ci --legacy-peer-deps pour pinia 3 / @pinia-nuxt 0.9 (peer dep conflict)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:17:39 +01:00
syoul
e05d081cac ci: exclure tests dépendant de Eau2018.xls (données dev, absent en CI)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:14:12 +01:00
syoul
4951e20099 ci: réécriture pipeline Woodpecker next + migration Fabio
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Format liste steps (Woodpecker next)
- Séparation from_secret / volumes (bug Woodpecker next)
- Suppression $\{VAR\} → $VAR dans les commands
- Ajout security-check, validate, test-backend
- Ajout SBOM : syft + trivy + dependency-track
- Ajout write-env / test-env / test-deploy / healthcheck
- Remplacement SSH+registry → build local + deploy via Docker socket
- docker-compose : Traefik → Fabio/Registrator (labels SERVICE_*)
- docker-compose : build: → image: pré-construites

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 12:09:40 +01:00
Yvv
683035dc31 Add README.md — full technical documentation for open-source sharing
Stack, API reference, dependencies, database schema, Bézier model,
installation, environment variables, project structure, CI/CD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:22:15 +01:00
Yvv
330726dcb3 Add CLAUDE.md project guide
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:54:30 +01:00
Yvv
4ba5e78e58 Add dark mode palettes + Woodpecker CI pipeline
- Add 2 dark palettes (Nuit, Ocean) to DisplaySettings with full SVG
  theme tokens — all hardcoded SVG colors (grids, legends, text fills,
  pills, dot strokes, drag handles) replaced with reactive bindings
- Update scoped CSS to use var(--color-*) and var(--svg-*) throughout
- Add Woodpecker CI pipeline (.woodpecker.yml): build → docker push → deploy
- Add multi-stage Dockerfiles for backend (Python) and frontend (Nuxt)
- Add production docker-compose with Traefik labels + dev override
- Remove old single-stage Dockerfiles and root docker-compose.yml
- Update Makefile with docker-dev target
- Exclude data files (pdf, xls, ipynb) from git

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:36:31 +01:00
Yvv
5dc42af33e Add interactive citizen page with sidebar, display settings, and adaptive CSS
Major rework of the citizen-facing page:
- Chart + sidebar layout (auth/vote/countdown in right sidebar)
- DisplaySettings component (font size, chart density, color palettes)
- Adaptive CSS with clamp() throughout, responsive breakpoints at 480/768/1024
- Baseline charts zoomed on first tier for small consumption detail
- Marginal price chart with dual Y-axes (foyers left, €/m³ right)
- Key metrics banner (5 columns: recettes, palier, prix palier, prix médian, mon prix)
- Client-side p0/impacts computation, draggable median price bar
- Household dots toggle, vote overlay curves
- Auth returns volume_m3, vote captures submitted_at
- Cleaned header nav (removed Accueil/Super Admin for public visitors)
- Terminology: foyer for bills, électeur for votes
- 600m³ added to impact reference volumes
- Realistic seed votes (50 votes, 3 profiles)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:00:22 +01:00
Yvv
6caea1b809 Restructure citizen vote page + add vote deadline
Reorganize the citizen page (/commune/[slug]) for voters: full-width
interactive chart with "Population" zoom by default, separate auth and
vote sections, countdown timer for vote deadline.

Backend: add vote_deadline column to communes with Alembic migration.
Admin: add deadline configuration card with datetime-local input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 00:46:48 +01:00
Yvv
2af95ebcf1 Add markdown editor toolbar and data year display on import page
CMS editor: formatting toolbar with H1-H3, bold, italic, strikethrough,
links, images, lists, blockquotes, code blocks, horizontal rules.
Keyboard shortcuts (Ctrl+B/I/D/K). Improved markdown preview rendering.

Import page: shows current data summary with year badge, stats grid,
last import date. Year input for new imports. Preview with sample table.

Backend: added data_year and data_imported_at fields to TariffParams,
returned in stats endpoint. Import sets data_imported_at automatically.
Seed sets data_year=2018.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:05:18 +01:00
Yvv
1365f4c86c Fix critical bugs + add zoom/overlay for citizen chart
Bugs fixed:
- Auth middleware now works on page refresh (plugin restores
  auth from localStorage before middleware runs)
- Bezier drag no longer snaps back: removed client-side p0
  recalculation during drag, only server computes p0 on mouseUp
- Removed redundant /login.vue page (homepage already has links)

New features:
- Interactive zoom on Bezier chart (buttons + mouse wheel +
  tier 1/tier 2 presets)
- Toggle to display outlier vote curves (public overlay endpoint)
- Tier 1 curve visually emphasized (thicker stroke)
- Dev credentials file at data/DEV-CREDENTIALS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:50:37 +01:00
Yvv
39b2d7c9fd Fix TypeScript errors in toPolyline function
Accept undefined arrays and use non-null assertions for
array indexing after length check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:28:00 +01:00
Yvv
b30e54a8f7 Initial commit: SejeteralO water tarification platform
Full-stack app for participatory water pricing using Bezier curves.
- Backend: FastAPI + SQLAlchemy + SQLite with JWT auth
- Frontend: Nuxt 4 + TypeScript with interactive SVG editor
- Math engine: cubic Bezier tarification with Cardano solver
- Admin: commune management, household import, vote monitoring, CMS
- Citizen: interactive curve editor, vote submission
- Docker-compose deployment ready

Includes fixes for:
- Impact table snake_case/camelCase property mismatch
- CMS content backend API + frontend editor (was stub)
- Admin route protection middleware
- Public content display on commune page
- Vote confirmation page link fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:26:02 +01:00