Select any Formula 1 race from 1950 to 2026, and get an instant AI-generated race report written like a professional journalist β complete with lap charts, podium display, full results table, and championship standings.
Powered by:
- π Jolpica F1 API β race data, lap times, standings
- π€ Groq AI (llama-3.3-70b-versatile) β journalist-style race reports
- ποΈ Neon PostgreSQL β persistent storage for races and reports
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MONOREPO β
β f1-race-report/ β
β ββββββββββββ¬βββββββββββ β
β β frontend β backend β β
β ββββββ¬ββββββ΄βββββ¬ββββββ β
βββββββββββββββββββββΌβββββββββββΌβββββββββββββββββββββββββββββββ
β β
Vercel β β Render
ββββββββββββββββ βββββββββββββββ
React + Vite Spring Boot
Tailwind CSS Java 21
Recharts PostgreSQL (Neon)
β β
β HTTPS / JSON β
βββββββββββββββββββββββββββββ
β β
βββββββββββ ββββββββββββ
β β
Jolpica F1 API Groq AI API
(Race Data) (Report Generation)
User selects race
β
βΌ
React (Vercel) ββGET /api/race-dataβββΊ Spring Boot (Render)
β
βββββββββββ΄βββββββββββ
β β
Check Neon DB Jolpica API
(cached?) (if not cached)
β β
βββββββββββ¬βββββββββββ
β
Assemble RaceDataDTO
β
βββββββββββ
Return to React
β
User clicks "Generate AI Report" β
β β
βΌ β
POST /api/generate-report β
β β
βΌ β
Groq AI βββββββββββββββββββββββββββββββββββΊ β
(llama-3.3-70b-versatile) β
β β
Report stored in Neon DB β
β β
Returned to React βββββββββββββββββββββββββ β
| Technology | Purpose |
|---|---|
| Spring Boot 3.2.5 | REST API framework |
| Java 21 | Runtime |
| Gradle | Build tool |
| Spring Data JPA + Hibernate | ORM / Database layer |
| PostgreSQL (Neon) | Cloud database |
| HikariCP | Connection pooling |
| Caffeine Cache | In-memory caching |
| OpenPDF | PDF report export |
| Groq API | AI text generation |
| Jolpica F1 API | Race data source |
| Lombok | Boilerplate reduction |
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| Vite | Build tool & dev server |
| Tailwind CSS | Styling |
| Recharts | Data visualisation |
| React Router v6 | Client-side routing |
| Axios | HTTP client |
| react-markdown | AI report rendering |
| react-hot-toast | Notifications |
| lucide-react | Icons |
- Java 21
- Node.js 18+
- PostgreSQL (or a Neon free account)
- Groq API key (free)
git clone https://github.com/venomyzer/f1-race-report.git
cd f1-race-reportcd backend
# Copy and configure properties
cp src/main/resources/application.properties.example \
src/main/resources/application.properties
# Edit with your values
nano src/main/resources/application.propertiesSet these values:
spring.datasource.url=jdbc:postgresql://localhost:5432/f1reportdb
spring.datasource.username=your_pg_username
spring.datasource.password=your_pg_password
groq.api.key=gsk_your_groq_key_here# Create the database
createdb f1reportdb
# Run the backend
./gradlew bootRunBackend starts at http://localhost:8080
cd frontend
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env β set VITE_API_BASE_URL=http://localhost:8080
# Start dev server
npm run devFrontend starts at http://localhost:5173
All responses follow this shape:
{
"success": true,
"message": "OK",
"data": { ... },
"statusCode": 200
}| Method | Endpoint | Description |
|---|---|---|
GET |
/api/seasons |
All F1 seasons (1950β2026) |
GET |
/api/races?season=2024 |
All races for a season |
GET |
/api/race-data?season=2024&round=1 |
Full race data payload |
POST |
/api/generate-report |
Generate AI race report |
GET |
/api/reports |
Recent 10 reports |
GET |
/api/reports/{id} |
Specific report by ID |
GET |
/api/export-pdf/{id} |
Download report as PDF |
GET |
/actuator/health |
Health check |
curl -X POST https://your-backend.onrender.com/api/generate-report \
-H "Content-Type: application/json" \
-d '{"season": 2024, "round": 1, "forceRegenerate": false}'drivers β F1 driver profiles
races β Grand Prix events (season + round)
race_results β Per-driver finishing data (FK β races, drivers)
reports β AI-generated race reports (TEXT)| Cache | TTL | Reason |
|---|---|---|
seasons |
24 hours | Changes once a year |
races |
6 hours | Stable during season |
raceResults |
12 hours | Immutable after race |
lapData |
12 hours | Immutable after race |
standings |
6 hours | Updates each race |
| Service | Platform | URL |
|---|---|---|
| Frontend | Vercel | https://f1-race-report.vercel.app |
| Backend | Render | your-backend.onrender.com |
| Database | Neon | PostgreSQL (Singapore region) |
Backend (Render):
DB_URL=jdbc:postgresql://...
DB_USERNAME=...
DB_PASSWORD=...
GROQ_API_KEY=gsk_...
GROQ_MODEL=llama-3.3-70b-versatile
PORT=10000
Frontend (Vercel):
VITE_API_BASE_URL=https://your-backend.onrender.com
f1-race-report/
βββ backend/
β βββ src/main/java/com/f1report/
β β βββ config/ # CORS, Cache, RestTemplate
β β βββ controller/ # REST endpoints
β β βββ service/ # Business logic + AI + PDF
β β βββ repository/ # Spring Data JPA
β β βββ model/ # JPA entities
β β βββ dto/ # Request/Response objects
β βββ build.gradle
β βββ Dockerfile
β
βββ frontend/
β βββ src/
β β βββ components/ # UI components
β β βββ pages/ # Route pages
β β βββ hooks/ # Custom React hooks
β β βββ services/ # Axios API layer
β β βββ utils/ # Helpers, formatters
β βββ package.json
β βββ vite.config.js
β
βββ README.md
- Render free tier spins down after inactivity β first request may take ~50 seconds to wake up
- Lap data not available for races before ~2012 (Ergast API limitation)
- 2026 season races not yet completed (future rounds return no data)
- Jolpica F1 API β The open-source successor to Ergast
- Groq β Ultra-fast LLM inference
- Neon β Serverless PostgreSQL
Built with β€οΈ and too much coffee by venomyzer
Not affiliated with Formula 1, the FIA, or any F1 team.






