How sailaja2016/f1-tyre-optimizer works
This is an interactive F1 tyre-degradation and race-strategy simulator. Users configure a race, inspect simulated tyre wear and ranked pit strategies, then request an AI-generated briefing. The README describes the browser-side simulation and dashboard, while the sampled backend shows Flask serving the page and forwarding briefing prompts to Groq. The README calls the AI Claude, but the sampled code uses Groq; the frontend implementation was not sampled, so its internal wiring is represented only where documented.
Main entry points: index.html Interactive dashboard · app.py Briefing endpoint · strategy.py Serverless briefing handler
Components 15
Race dashboard
- Interactive dashboard
templates/index.html - Race parameters
templates/index.html - Wear simulator
templates/index.html - Charts and strategy table
templates/index.html - Briefing display
templates/index.html
Race simulation
- Tyre degradation model
templates/index.html - Compound curves
templates/index.html - Lap pace analysis
templates/index.html - Pit strategy search
templates/index.html - Strategy ranking
templates/index.html
Web backend
- Flask application
app.py - Briefing endpoint
app.py - Serverless briefing handler
api/strategy.py
Other components
- Race user
- Groq chat API
Connections 20
- Race user → Interactive dashboard: configures and views
README.md - Interactive dashboard → Race parameters: collects
README.md - Race parameters → Tyre degradation model: sets simulation inputs
README.md - Tyre degradation model → Compound curves: calculates tyre life
README.md - Tyre degradation model → Lap pace analysis: calculates lap deltas
README.md - Pit strategy search → Strategy ranking: ranks by race time
README.md - Race parameters → Pit strategy search: defines race scenario
README.md - Compound curves → Pit strategy search: informs strategy evaluation
README.md - Compound curves → Wear simulator: shows wear state
README.md - Compound curves → Charts and strategy table: plots degradation
README.md - Lap pace analysis → Charts and strategy table: plots lap deltas
README.md - Strategy ranking → Charts and strategy table: populates strategy table
README.md - Race user → Briefing display: requests briefing
README.md - Interactive dashboard → Flask application: requests page
app.py - Flask application → Interactive dashboard: serves page
app.py - Interactive dashboard → Briefing endpoint: posts simulation results
README.md - Briefing endpoint → Groq chat API: sends prompt
app.py - Groq chat API → Briefing endpoint: returns briefing text
app.py - Briefing endpoint → Briefing display: returns briefing
README.md - Serverless briefing handler → Groq chat API: sends prompt
api/strategy.py