|
Download README.md from interactAi-inc/Pit-Lane-Project: direct link, hf CLI and curl.
- Browser
- Download file 3.48 kB
-
https://huggingface.co/interactAi-inc/Pit-Lane-Project/resolve/main/README.md
- Command line
-
hf download hf://interactAi-inc/Pit-Lane-Project/README.md
-
curl -L -o README.md https://huggingface.co/interactAi-inc/Pit-Lane-Project/resolve/main/README.md
3.48 kB
| # F1 Live Race & Winner Prediction Platform | |
| Full-stack application for live Formula 1 race tracking, lap-level telemetry ingestion, and real-time winner prediction using machine learning (XGBoost). | |
| ## Project Structure | |
| ```text | |
| f1-live-backend/ | |
| βββ backend/ # FastAPI backend service | |
| β βββ app/ # Application code (routes, services, providers) | |
| β βββ models/ # XGBoost model pickle & feature schema | |
| β βββ tests/ # Automated pytest suite | |
| β βββ testing_pipeline/ # FastF1 historical replay & probe test harness | |
| β βββ test_backend.py # Standalone replay test runner | |
| β βββ requirements.txt # Python dependencies | |
| β βββ pytest.ini # Pytest discovery config | |
| β βββ .env # Backend environment configuration | |
| β βββ docs/ # Feature contract & architecture docs | |
| β | |
| βββ frontend/ # React + TypeScript + Vite Dashboard | |
| βββ Dashboard/ # F1 live telemetry & prediction dashboard | |
| βββ src/ | |
| β βββ components/ # Track map, leaderboard, vitals, telemetry panels | |
| β βββ hooks/ # usePredictions (WebSocket & REST live connection) | |
| β βββ types/ # TypeScript schemas & contracts | |
| β βββ App.tsx # Main application layout | |
| βββ package.json | |
| βββ vite.config.ts # Dev server with proxy to backend | |
| ``` | |
| --- | |
| ## Quick Start | |
| ### 1. Backend Setup & Run | |
| ```powershell | |
| # Navigate to backend | |
| cd backend | |
| # Setup virtual environment (if not already created) | |
| python -m venv .venv | |
| .\.venv\Scripts\Activate.ps1 | |
| pip install -r requirements.txt | |
| # Run FastAPI backend with Uvicorn (port 8000) | |
| uvicorn app.main:app --reload --host 127.0.0.1 --port 8000 | |
| ``` | |
| - API Docs / Swagger UI: `http://127.0.0.1:8000/docs` | |
| - Health check: `http://127.0.0.1:8000/health` | |
| - Frontend snapshot: `http://127.0.0.1:8000/live/frontend` | |
| - WebSocket stream: `ws://127.0.0.1:8000/live/ws` | |
| ### 2. Frontend Setup & Run | |
| ```powershell | |
| # Navigate to frontend dashboard | |
| cd frontend\Dashboard | |
| # Install dependencies (Node 18+) | |
| npm install | |
| # Run Vite dev server (port 5173 with proxy to backend) | |
| npm run dev | |
| ``` | |
| Open `http://localhost:5173` in your browser. | |
| --- | |
| ## Live Features & Wiring | |
| - **WebSocket Stream (`/live/ws`)**: Streams real-time snapshot every second directly to the dashboard. | |
| - **REST Snapshot (`/live/frontend`)**: Provides zero-delay initial load and automatic polling fallback if the socket disconnects. | |
| - **Live Leaderboard & Win Probabilities**: Real-time XGBoost winner probabilities updated lap-by-lap. | |
| - **Live Driver Vitals**: Speed (km/h), RPM, Gear, Throttle %, Brake, DRS status. | |
| - **Live Track & Weather Strip**: Dynamic track temperature, air temperature, rain probability, and track status flags (Clear, Caution, Safety Car). | |
| - **Interactive Controls**: Header includes live connection status indicator, "Simulate Lap" action to trigger test predictions, and race reset. | |
| --- | |
| ## Running Tests | |
| ### Backend Tests | |
| ```powershell | |
| cd backend | |
| python -m pytest | |
| ``` | |
| ### Frontend Build & Typecheck | |
| ```powershell | |
| cd frontend\Dashboard | |
| npm run build | |
| ``` | |
| --- | |
| Copyright Β© 2026 NexInteract Systems Pvt. Ltd. All rights reserved. | |