Skip to content

Commit bfad935

Browse files
author
Clément VALENTIN
committed
feat(Simulator): Add period selection functionality with custom date range support
- Introduced a new PeriodSelector component for selecting date ranges. - Integrated date range selection into the Simulator page, allowing users to choose between predefined periods (rolling, 2024, 2025) and custom date ranges. - Updated simulation logic to recalculate based on selected date ranges. - Added date-fns and react-day-picker dependencies for date handling and UI. - Enhanced user experience with an information banner detailing the selected simulation period. - Updated Docker configuration to include environment variables for the web service.
1 parent 977870b commit bfad935

File tree

7 files changed

+975
-68
lines changed

7 files changed

+975
-68
lines changed

.claude/rules/dev.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
globs:
3+
- apps/**/*
4+
- docker-compose*.yml
5+
- Makefile
6+
---
7+
8+
# Developpement
9+
10+
## Agents specialises
11+
12+
**Utiliser les agents selon le contexte :**
13+
14+
- **Frontend** (`apps/web/`) : Utiliser l'agent `frontend-specialist`
15+
- **Backend** (`apps/api/`) : Utiliser l'agent `backend-specialist`
16+
17+
## Auto-reload actif
18+
19+
**Les services sont en auto-reload. NE PAS redemarrer apres modification de code.**
20+
21+
- **Backend** : Uvicorn `--reload` detecte les changements Python
22+
- **Frontend** : Vite HMR recharge instantanement les composants React
23+
24+
**Redemarrage necessaire uniquement si** :
25+
26+
- Modification `.env.api` ou `.env`
27+
- Ajout dependances (`pyproject.toml`, `package.json`)
28+
- Modification `docker-compose.yml` ou `Dockerfile`
29+
30+
## Commandes principales
31+
32+
```bash
33+
# Demarrage
34+
make dev # Start dev avec hot-reload
35+
make up # Start tous les services
36+
make down # Stop tous les services
37+
38+
# Logs
39+
make logs # Tous les logs
40+
make backend-logs # Logs backend uniquement
41+
42+
# Database
43+
make migrate # Appliquer migrations
44+
make migrate-revision # Generer nouvelle migration
45+
make db-shell # Shell PostgreSQL
46+
47+
# Backend (apps/api/)
48+
make lint # ruff + mypy
49+
make test # pytest avec coverage
50+
51+
# Frontend (apps/web/)
52+
npm run lint # ESLint
53+
npm run build # Build production
54+
```
55+
56+
## Validation
57+
58+
**En fin de traitement, toujours verifier les logs Docker pour valider que tout est OK :**
59+
60+
```bash
61+
make backend-logs # Verifier pas d'erreurs backend
62+
make logs # Ou tous les logs
63+
```
64+
65+
## Documentation
66+
67+
**En cas de changement de fonctionnement, mettre a jour la documentation dans `docs/` :**
68+
69+
- `docs/features-spec/` : Specifications fonctionnelles
70+
- `docs/pages/` : Documentation des pages frontend
71+
- `docs/setup/` : Installation et configuration
72+
- `docs/architecture/` : Architecture systeme
73+
- `docs/enedis-api/` : API Enedis
74+
- `docs/troubleshooting/` : Resolution de problemes
75+
76+
## Acces
77+
78+
| Service | URL |
79+
| ----------- | ---------------------------- |
80+
| Frontend | <http://localhost:8000> |
81+
| Backend API | <http://localhost:8081> |
82+
| API Docs | <http://localhost:8081/docs> |
83+
| pgAdmin | <http://localhost:5050> |

0 commit comments

Comments
 (0)