✨ Features: - Backend FastAPI complete (25 Python files) - 5 SQLAlchemy models (Device, HardwareSnapshot, Benchmark, Link, Document) - Pydantic schemas for validation - 4 API routers (benchmark, devices, links, docs) - Authentication with Bearer token - Automatic score calculation - File upload support - Frontend web interface (13 files) - 4 HTML pages (Dashboard, Devices, Device Detail, Settings) - 7 JavaScript modules - Monokai dark theme CSS - Responsive design - Complete CRUD operations - Client benchmark script (500+ lines Bash) - Hardware auto-detection - CPU, RAM, Disk, Network benchmarks - JSON payload generation - Robust error handling - Docker deployment - Optimized Dockerfile - docker-compose with 2 services - Persistent volumes - Environment variables - Documentation & Installation - Automated install.sh script - README, QUICKSTART, DEPLOYMENT guides - Complete API documentation - Project structure documentation 📊 Stats: - ~60 files created - ~5000 lines of code - Full MVP feature set implemented 🚀 Ready for production deployment! 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
6.1 KiB
6.1 KiB
Structure du projet Linux BenchTools
Arborescence complète
linux-benchtools/
│
├── backend/ # Backend FastAPI
│ ├── app/
│ │ ├── api/ # Endpoints API
│ │ │ ├── __init__.py
│ │ │ ├── benchmark.py # POST /api/benchmark
│ │ │ ├── devices.py # CRUD devices
│ │ │ ├── docs.py # Upload/download documents
│ │ │ └── links.py # CRUD liens constructeur
│ │ │
│ │ ├── core/ # Configuration & sécurité
│ │ │ ├── __init__.py
│ │ │ ├── config.py # Variables d'environnement
│ │ │ └── security.py # Authentification token
│ │ │
│ │ ├── models/ # Modèles SQLAlchemy
│ │ │ ├── __init__.py
│ │ │ ├── device.py # Table devices
│ │ │ ├── hardware_snapshot.py # Table hardware_snapshots
│ │ │ ├── benchmark.py # Table benchmarks
│ │ │ ├── manufacturer_link.py # Table manufacturer_links
│ │ │ └── document.py # Table documents
│ │ │
│ │ ├── schemas/ # Schémas Pydantic (validation)
│ │ │ ├── __init__.py
│ │ │ ├── benchmark.py # Schémas payload benchmark
│ │ │ ├── device.py # Schémas device
│ │ │ ├── hardware.py # Schémas hardware
│ │ │ ├── document.py # Schémas document
│ │ │ └── link.py # Schémas liens
│ │ │
│ │ ├── db/ # Base de données
│ │ │ ├── __init__.py
│ │ │ ├── base.py # Déclaration base SQLAlchemy
│ │ │ ├── session.py # Session & engine
│ │ │ └── init_db.py # Initialisation tables
│ │ │
│ │ ├── utils/ # Utilitaires
│ │ │ ├── __init__.py
│ │ │ └── scoring.py # Calcul scores
│ │ │
│ │ ├── main.py # Point d'entrée FastAPI
│ │ └── __init__.py
│ │
│ ├── data/ # Base SQLite (gitignored)
│ ├── Dockerfile # Image Docker backend
│ ├── requirements.txt # Dépendances Python
│ └── README.md
│
├── frontend/ # Interface web
│ ├── index.html # Dashboard
│ ├── devices.html # Liste devices
│ ├── device_detail.html # Détail device
│ ├── settings.html # Configuration
│ │
│ ├── css/
│ │ ├── main.css # Styles principaux (Monokai)
│ │ └── components.css # Composants réutilisables
│ │
│ └── js/
│ ├── api.js # Appels API
│ ├── dashboard.js # Logique Dashboard
│ ├── devices.js # Logique liste devices
│ ├── device_detail.js # Logique détail device
│ ├── settings.js # Logique settings
│ └── utils.js # Fonctions utilitaires
│
├── scripts/ # Scripts clients
│ └── bench.sh # Script de benchmark client
│
├── uploads/ # Documents uploadés (gitignored)
│
├── tests/ # Tests
│ └── data/ # Données de test
│ ├── bench_full.json # Payload complet
│ ├── bench_no_gpu.json # Sans GPU
│ └── bench_short.json # Mode court
│
├── docker-compose.yml # Orchestration Docker
├── .env.example # Exemple variables d'env
├── .gitignore # Fichiers ignorés par Git
├── install.sh # Script d'installation
├── STRUCTURE.md # Ce fichier
└── README.md # Documentation principale
├── 01_vision_fonctionnelle.md # Spécifications (existants)
├── 02_model_donnees.md
├── 03_api_backend.md
├── 04_bench_script_client.md
├── 05_webui_design.md
├── 06_backend_architecture.md
├── 08_installation_bootstrap.md
├── 09_tests_qualite.md
└── 10_roadmap_evolutions.md
Description des composants
Backend (Python/FastAPI)
- Port : 8007
- Base de données : SQLite (
backend/data/data.db) - Auth : Token Bearer simple
- Upload : Documents stockés dans
uploads/
Frontend (HTML/CSS/JS)
- Port : 8087 (via nginx)
- Style : Monokai dark theme
- Framework : Vanilla JS (pas de framework lourd)
Script client (Bash)
- Nom :
bench.sh - OS cibles : Debian, Ubuntu, Proxmox
- Outils : sysbench, fio, iperf3, dmidecode, lscpu, smartctl
Docker
- 2 services :
backend: FastAPI + Uvicornfrontend: nginx servant les fichiers statiques
Flux de données
[Machine cliente]
│ exécute bench.sh
↓
[Collecte hardware + Benchmarks]
│ génère JSON
↓
[POST /api/benchmark]
│ avec token Bearer
↓
[Backend FastAPI]
│ valide + stocke SQLite
↓
[SQLite DB]
│ devices, hardware_snapshots, benchmarks
↓
[Frontend]
│ GET /api/devices, /api/benchmarks
↓
[Dashboard web]
│ affiche classement + détails
Prochaines étapes
- ✅ Arborescence créée
- ⏳ Développement frontend
- ⏳ Développement backend
- ⏳ Script bench.sh
- ⏳ Configuration Docker
- ⏳ Script d'installation