Projects Hub
npm run dev
Tous les projets
Actif BIM / Revit

Daylight Factor (FLJ Tool)

Outil web de calcul du Facteur de Lumière du Jour (FLJ) conforme NF EN 17037 / RE2020 / RT2012. React (Vite) → FastAPI (Python 3.11) → Radiance 5.4 (via hone...

Activité récente (il y a 5 jours)

Ouvrir dans VS Code

Démarrer

  • $ cd flj-tool/backend
  • $ python -m venv venv
  • Windows

    $ venv\Scripts\activate
  • source venv/bin/activate # Linux/Mac

    $ pip install -r requirements.txt
  • $ cd flj-tool/frontend
  • $ npm install
  • $ uvicorn app.main:app --reload --port 8000
  • $ npm run dev
  • $ cd flj-tool
  • $ docker-compose up --build

Jalons

3/5 terminés · .agents/PROJECT.md
M1 Shading Surfaces & Exterior Masks (R1) DONE
M2 Sloped Roofs & Ceilings 3D (R2 / ANO-P1-11) DONE
M3 SQLite Persistence (R3 / ANO-P1-18) DONE
M4 Docker Production Bundle & SPA Static Serving (R4) IN_PROGRESS
M5 Global Zero-Regression & Final Verification (R5) PLANNED

Documentation

FLJ Tool — Facteur de Lumière du Jour

Outil web de calcul du Facteur de Lumière du Jour (FLJ) conforme NF EN 17037 / RE2020 / RT2012.

Architecture

React (Vite) → FastAPI (Python 3.11) → Radiance 5.4 (via honeybee-radiance)

Prérequis

  • Python 3.10 ou 3.11 (incompatibilité ifcopenshell avec 3.12+)
  • Node.js 18+ (frontend)
  • Radiance 5.4+ (installation)

Installation locale

Backend

cd flj-tool/backend
python -m venv venv
venv\Scripts\activate          # Windows
# source venv/bin/activate     # Linux/Mac
pip install -r requirements.txt

Frontend

cd flj-tool/frontend
npm install

Variables d'environnement

Copier .env.example.env et ajuster :

RADIANCE_PATH=C:\Radiance\bin      # Chemin vers rtrace, rpict, etc.
PROJECTS_DIR=C:\tmp\flj_projects   # Dossier de travail (persistant)
MAX_CONCURRENT_JOBS=2              # Limite jobs simultanés (CPU/RAM)
UPLOAD_MAX_SIZE_MB=500             # Taille max upload
MAX_TRIANGLES=500000               # Seuil géométrie complexe

Lancement (dev)

# Terminal 1 — Backend
cd flj-tool/backend
uvicorn app.main:app --reload --port 8000

# Terminal 2 — Frontend
cd flj-tool/frontend
npm run dev

→ Ouvrir http://localhost:5173

Lancement (Docker)

cd flj-tool
docker-compose up --build

→ Ouvrir http://localhost:8000

Tests

cd flj-tool/backend
pytest tests/ -v

API Endpoints

Méthode Endpoint Description
POST /api/upload Upload IFC, retour résumé
GET /api/spaces/{id} Liste des pièces
POST /api/calculate Lance le calcul async
GET /api/job/{id} Progression du job
GET /api/results/{id} Résultats + visualisations
GET /api/export/{id} Export PDF/CSV/JSON
GET /api/health Health check

Structure

flj-tool/
├── backend/
│   ├── app/
│   │   ├── main.py             # FastAPI — 6 endpoints
│   │   ├── config.py           # Pydantic settings
│   │   ├── schemas.py          # Modèles API
│   │   ├── ifc_reader.py       # Parse IFC (ifcopenshell)
│   │   ├── room_builder.py     # Modèle honeybee
│   │   ├── grid_generator.py   # Grille de mesure
│   │   ├── flj_engine.py       # Moteur Radiance
│   │   ├── results_parser.py   # Conformité + export
│   │   └── visualizer.py       # 3D pyvista + 2D matplotlib
│   ├── tests/                  # ~60 tests
│   └── requirements.txt
├── frontend/
│   ├── src/pages/              # 6 écrans React
│   └── src/index.css           # Design system
├── Dockerfile
└── docker-compose.yml