A real-time analytics dashboard for Toyota GR Cup race engineers, showcasing live lap data, telemetry, and pit strategy recommendations. Auth/login preview: (https://trackota.help/authentication/sign-in) Dashboard: (https://trackota.help/dashboard)
- Live Race Metrics: Current lap, position, tyre compound, fuel level
- Lap Time Analysis: Interactive charts showing lap-time degradation and trends
- Stint Metrics: Average lap, best lap, stint laps, tyre wear percentage
- Driver Consistency: Gauge and sparkline showing lap-time variance
- Section Pace: Bar chart of average sector times
- Telemetry Snapshot: Live speed, gear, throttle, brake data
- Pit Strategy: AI-computed recommendations based on lap-time degradation
- Top 3 Fastest Laps: Leaderboard from the active dataset
- Frontend: React 17, Material-UI 5, ApexCharts
- Backend: Vercel Serverless Functions (Node.js)
- Data: CSV datasets from Toyota GR Cup races (Sebring, Road America)
- Node.js 16+ and pnpm (or npm/yarn)
- Vercel CLI:
npm i -g vercel
-
Clone and install dependencies:
git clone <repo-url> cd Trackota pnpm install
-
Place datasets (if not already present):
- Datasets should be in
data/datasets/with structure:data/datasets/ ├── Sebring/ │ ├── Race 1/ │ │ ├── *.csv │ └── Race 2/ └── Road America/ ├── Race 1/ └── Race 2/ - The backend auto-selects the first available dataset folder.
- Datasets should be in
-
Run locally:
pnpm dev # or: vercel dev- This starts both the React app and the
/api/*serverless functions. - Open http://localhost:3000
- This starts both the React app and the
Create .env in the project root:
# API base URL (leave empty for same-origin in production)
REACT_APP_API_BASE=
# Use mock data instead of real datasets (default: false)
REACT_APP_USE_MOCKS=false
# Override dataset directory (Node API only)
TRACKOTA_DATASETS_DIR=- Push to GitHub/GitLab/Bitbucket
- Import project in Vercel dashboard
- Deploy:
- Vercel automatically detects the React build and serves
/api/*functions. - No additional configuration needed if datasets are committed.
- For large/private datasets, consider external storage (S3, Azure Blob) and set
TRACKOTA_DATASETS_DIRto a mounted path.
- Vercel automatically detects the React build and serves
vercel --prodTrackota/
├── api/ # Vercel serverless functions (Node.js)
│ ├── _utils.js # CSV parsing helpers
│ ├── datasets.js # /api/datasets
│ ├── strategy/
│ │ ├── summary.js # /api/strategy/summary
│ │ ├── recommendations.js
│ │ └── simulate.js
│ ├── race/
│ │ └── top3.js
│ ├── charts/
│ │ ├── tyre-degradation.js
│ │ └── sections.js
│ └── telemetry/
│ └── series.js
├── data/
│ └── datasets/ # CSV race data (Sebring, Road America)
├── src/
│ ├── layouts/
│ │ ├── dashboard/ # Main dashboard page
│ │ └── strategy/ # Race strategy page
│ ├── services/
│ │ └── api.js # API client
│ └── components/ # Reusable UI components
├── public/ # Static assets
├── vercel.json # Vercel routing config
└── package.json
All endpoints default to the first dataset folder if no file or folder query param is provided.
GET /api/datasets– List available datasetsGET /api/strategy/summary?folder=Sebring/Race%201– Race summary (lap, position, tyre, fuel)GET /api/strategy/recommendations– Pit strategy recommendationsGET /api/race/top3– Top 3 fastest lapsGET /api/charts/tyre-degradation?folder=...– Lap times arrayGET /api/charts/sections?folder=...– Per-section times (S1.a, S1.b, S2.a, etc.)GET /api/telemetry/series?folder=...&limit=500– Telemetry streams (speed, gear, throttle, brake)POST /api/strategy/simulate– Simulate pit-stop scenarios
- Vehicle ID format:
GR86-004-78(chassis: 004, car number: 78) - Lap counts: May contain erroneous values (e.g., lap #32768); filtered by backend
- Sections: Correspond to track map divisions (red lines + start/finish); each section has subsections
aandb - Units: Speed in mph, distances in miles, currency in £ (UK English)
- Cause: Running
npm startinstead ofvercel dev. - Fix: Use
pnpm devorvercel devto serve both React and API routes.
- Cause: Charts rendering before data arrives.
- Fix: Already handled with loading states and defensive guards in chart components.
- Check datasets: Ensure
data/datasets/contains at least one folder with.csvfiles. - Check console: Open browser DevTools → Console for API errors.
- Check API: Visit
http://localhost:3000/api/datasetsto verify the API is responding.
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Commit changes:
git commit -am 'Add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
See LICENSE.md
- Dashboard template: [Vision UI Dashboard React]
- Race data: Toyota GR Cup (Sebring, Road America)