docs: ajout README, LICENSE MIT, mise à jour CLAUDE.md
- README.md : introduction, installation, configuration, mention vibe coding - LICENSE.md : licence MIT (Antoine Van-Elstraete) - CLAUDE.md : barème kilométrique, filtres Jinja2, gotcha tests de routes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ Flask app using the factory pattern (`create_app()` in `app/__init__.py`). The D
|
||||
- Types without journey: `TT, MALADE, CONGE, RTT, FERIE` (see `day_types_without_journey()`)
|
||||
- Work reference: 7h45 (465 min) for WORK/TT/FORMATION, 10h (600 min) for GARDE, 0 for absences
|
||||
- `total_minutes()` on `WorkEntry` sums `TimeSlot` durations, handles midnight crossing
|
||||
- Frais réels: uses `bareme_kilometrique` tranches from config.toml; `km_max = 0` means "no upper limit"
|
||||
- Frais réels: uses `bareme_kilometrique` tranches from config.toml; `km_max = 0` means "no upper limit". Keys: `cv_3`, `cv_4`, `cv_5`, `cv_6`, `cv_7plus`. Vehicles with `fuel = "electric"` get +20% applied in `compute_frais_reels(..., electric=True)`.
|
||||
|
||||
**Frontend:** Tailwind CSS CDN + HTMX in `base.html`. No build step. Design system defined via CSS variables (`--ink`, `--amber`, `--sage`, `--rust`, `--cream`) and custom classes (`.card`, `.card-*`, `.btn-primary`, `.field-input`, `.font-display`, `.font-data`) — all in `base.html <style>`. JS inline in `entry_form.html` only.
|
||||
|
||||
@@ -62,7 +62,7 @@ Flask app using the factory pattern (`create_app()` in `app/__init__.py`). The D
|
||||
- **Pas de migration de schéma** : l'app utilise `db.create_all()` uniquement (pas d'Alembic). Tout changement de modèle nécessite de supprimer `instance/worklog.db` en dev, ou une migration manuelle en prod.
|
||||
- **Barème kilométrique** : les tranches dans `config.toml` sont à mettre à jour manuellement chaque année (section `[bareme_kilometrique.YYYY]`).
|
||||
- **`datetime.utcnow()` deprecated** : les modèles utilisent `datetime.utcnow` (warning sur Python 3.14+). À remplacer par `datetime.now(UTC)` lors d'une prochaine évolution des modèles.
|
||||
- **Dates en français** : `strftime` utilise la locale système (anglais). Utiliser le filtre Jinja2 `{{ date | date_fr }}` défini dans `app/__init__.py`.
|
||||
- **Filtres Jinja2** (définis dans `app/__init__.py`) : `{{ date | date_fr }}` pour les dates en français ; `{{ day_type | day_type_fr }}` pour les libellés de types de jours (WORK→Travail, TT→Télétravail, etc.).
|
||||
- **`db.get_engine()` deprecated** en Flask-SQLAlchemy 3.x → utiliser `db.engine`.
|
||||
- **Migration `_migrate_db`** : vérifier l'existence de la table avant `ALTER TABLE` — SQLite peut avoir un fichier DB sans tables (ex: premier démarrage avec `instance/worklog.db` vide).
|
||||
- **Tests de routes** : `test_routes.py` vérifie des chaînes de la réponse HTML (ex: titre de page). Si une page est renommée, mettre à jour ces assertions en conséquence.
|
||||
- **Tests de routes** : `test_routes.py` vérifie des chaînes de la réponse HTML. Utiliser les libellés affichés (ex: `"Télétravail"` pas `"TT"`), et les noms de véhicules du TOML (pas les IDs). Mettre à jour si les libellés changent.
|
||||
|
||||
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Antoine Van-Elstraete
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
60
README.md
Normal file
60
README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Tableau de bord pro
|
||||
|
||||
Application web personnelle de suivi du temps de travail et des déplacements professionnels.
|
||||
|
||||
> Développée en vibe coding avec [Claude Sonnet 4.6](https://www.anthropic.com/claude) (Anthropic).
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- **Journal de bord** : saisie quotidienne avec type de journée (travail, télétravail, garde, astreinte, formation, RTT, congé, maladie, férié), plages horaires et commentaire
|
||||
- **Suivi des déplacements** : kilométrage par véhicule, estimation CO₂, calcul des frais réels selon le barème kilométrique fiscal
|
||||
- **Solde congés / RTT** : suivi des jours posés et du solde restant
|
||||
- **Rapports annuels** : kilométrage total, frais réels déductibles, répartition par type de journée
|
||||
- **Véhicules électriques** : majoration de 20 % appliquée automatiquement sur les frais réels
|
||||
|
||||
## Installation
|
||||
|
||||
### Prérequis
|
||||
|
||||
- Python 3.11+
|
||||
|
||||
### Développement
|
||||
|
||||
```bash
|
||||
# Cloner le dépôt
|
||||
git clone ssh://git.antoineve.me/AntoineVe/tableau-de-bord.git
|
||||
cd tableau-de-bord
|
||||
|
||||
# Créer l'environnement virtuel et installer les dépendances
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
|
||||
# Lancer le serveur de développement
|
||||
.venv/bin/python run.py
|
||||
```
|
||||
|
||||
L'application est accessible sur `http://localhost:5000`.
|
||||
|
||||
### Production (Gunicorn)
|
||||
|
||||
```bash
|
||||
SECRET_KEY=<votre-clé-secrète> ./start.sh
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Toute la configuration métier se trouve dans `config.toml` :
|
||||
|
||||
- **`[vehicles.*]`** : véhicules avec puissance fiscale, type de carburant et émissions CO₂
|
||||
- **`[journeys.*]`** : profils de trajet avec distances par véhicule
|
||||
- **`[bareme_kilometrique.YYYY.*]`** : barème fiscal par année et puissance (à mettre à jour chaque année)
|
||||
|
||||
### Tests
|
||||
|
||||
```bash
|
||||
.venv/bin/python -m pytest
|
||||
```
|
||||
|
||||
## Licence
|
||||
|
||||
[MIT](LICENSE.md) — Copyright (c) 2026 Antoine Van-Elstraete
|
||||
Reference in New Issue
Block a user