- Config ruff dans pyproject.toml : règles E/W/F/I/UP/B, whitelist des appels
d'injection FastAPI (Depends/File/Form/Query) pour B008, B904 ignoré
(traduction volontaire des exceptions en réponses HTTP)
- Auto-fixes : tri des imports, suppression d'imports inutilisés, annotations
PEP 604, f-strings sans placeholder, modes open redondants
- Suppression de variables inutilisées (config.reset_setting, parser locataires)
ruff check . : All checks passed ; 61 tests OK
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- connection: création de l'engine centralisée dans _build_engine (source
unique de config) ; init_db réutilise reset_connection + get_engine au lieu
de dupliquer create_engine
- service: _normalize_amount garantit qu'un montant non numérique issu de
l'extraction (string, dict…) n'entre jamais en base dans une colonne Float ;
appliqué à solde_montant
- tests: couverture de _normalize_amount et du solde sous forme de string
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- sql_executor: remplace le filtre regex fragile par une autorisation SQLite
(set_authorizer) en complément de mode=ro ; rejette les instructions multiples
- uploads: lecture bornée des PDF (helper read_upload_limited, limite 20 Mo,
HTTP 413) branchée sur /extract et /save-with-pdf
- tests: suite pytest (54 tests) couvrant amounts, dates, storage, sql_executor,
uploads et DatabaseService.save_document ; pytest ajouté en dépendance dev
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Empêche le path traversal du catch-all SPA (vérif is_relative_to dist)
- Migre on_event("startup") vers le handler lifespan de FastAPI
- Masque les exceptions internes des erreurs 500 (log au lieu de str(e))
- Remplace datetime.utcnow déprécié par un helper UTC timezone-aware
- Simplifie except (ValueError, Exception) redondant
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add ConfigPage.vue with two sections: Ollama configuration (URL, model,
timeout) with source badges and per-field reset, and tag management with
inline rename and creation. Add /config route and nav link.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a key-value settings table (Setting model) with DB > env > default
resolution chain. Replace hardcoded Ollama constants in ollama_service
with dynamic _get_config() lookups. Add /api/config/ endpoints for
settings CRUD and tag management (create, rename).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clicking the pencil icon in revenus/depenses tables now passes query
params to identify the source row. The edit page auto-expands the
matching section, scrolls to the element, and briefly highlights it
with a blue ring that fades after 2 seconds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch save endpoint from JSON to multipart upload so the PDF file is
sent alongside extracted data and tags.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove pdfjs-dist dependency and simplify PdfPreview component to use
a native browser iframe, reducing bundle size and complexity.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add backend and frontend Dockerfiles, docker-compose setup with nginx
reverse proxy, .dockerignore files and Makefile for dev/prod workflows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add new /api/revenus endpoints for rental income data
- GET /summary: KPIs, monthly trends, breakdown by property, top unpaid
- GET /details: detailed rental records with filtering
- GET /by-lot: revenue aggregation by unit
- GET /immeubles: properties list with revenue stats
- Add RevenusPage with full dashboard layout
- 6 KPI cards: total revenue, payments, unpaid, collection rate, active tenants, occupied units
- Monthly evolution chart (rent, payments, unpaid)
- Property breakdown donut chart
- Top unpaid tenants list
- Detailed revenue table with pagination and CSV export
- Add filters panel (property, type, dates, unpaid only, history months)
- Display property address instead of code in all components
- Add navigation link in header (Revenus)
- Add dashboard API endpoints for financial summary, recent revenus, monthly trends, and immeuble shortcuts
- Create new dashboard components: FinancialSummary with sparklines, QuickActions, RecentRevenus, MiniTrendChart, ImmeubleShortcuts
- Refactor HomePage with prominent drag & drop zone and data-driven cards
- Financial cards now show last document data with 6-month trend sparklines in background
- Remove redundant import button, keep single upload zone at top
- Add EditableField component for inline editing of any field
- Update DataRow, LocataireCard, OperationCard to support inline editing
- Add CRUD operations for locataires and operations (add/remove)
- Update JsonViewer to propagate changes via v-model
- Add TagAutocomplete component with search/filter functionality
- Replace select dropdown with autocomplete in TaggingStep
- Backend Python (uv + click + FastAPI)
- CLI: plesna-gerance extract <pdf> pour extraire les donnees
- CLI: plesna-gerance serve pour lancer le serveur API
- API REST: POST /api/extract pour upload et extraction de PDF
- Parsers modulaires: metadata, locataires, operations
- Utilise pdftotext (poppler-utils) pour l'extraction de texte
- Frontend Vue.js + Tailwind CSS
- Interface split-screen: PDF a gauche, donnees a droite
- Preview PDF avec zoom et navigation pages (pdf.js)
- Visualisation structuree des donnees extraites
- Sections depliables: metadata, locataires, operations
- Drag & drop pour upload de PDF
- Extraction automatique a la selection du fichier