Skip to content

Repository files navigation

F1 Visor 🏎️

🤖 AI-Powered Project — This is a proof of concept built entirely with AI assistance in just 2-3 hours as a learning exercise and technology demonstration.

A real-time Formula 1 race viewer with 2D circuit visualization, telemetry data, and comprehensive race statistics powered by the OpenF1 API.

Preview

preview.mov

Features

🗺️ Circuit Visualization

  • Interactive 2D circuit map with real GPS coordinates
  • Live car positions rendered on the track
  • Zoom and pan capabilities for detailed viewing
  • Circuit layout dynamically generated from race data

📊 Telemetry Dashboard

  • Real-time speed, throttle, brake and gear information
  • Speed graphs with historical data
  • DRS status indicator
  • Driver-specific telemetry selection

🏁 Race Positions

  • Live position table with all drivers
  • Lap times and best lap tracking
  • Interval times between drivers
  • Team color-coded display

🎮 View Modes

  • Relive Mode: Watch the race unfold with real-time playback, circuit visualization and telemetry
  • Results Mode: View final standings, lap times and race statistics

⏯️ Playback Controls

  • Timeline scrubber for race navigation
  • Play/pause functionality
  • Variable playback speed (1x, 2x, 5x, 10x)
  • Jump to specific race moments

📅 Session Selection

  • Browse historical races and sessions
  • Filter by season, circuit, and session type
  • Support for Practice, Qualifying, and Race sessions

Tech Stack

  • Frontend Framework: React 18 + TypeScript 5
  • Build Tool: Vite 5
  • Styling: TailwindCSS 3
  • State Management: Zustand 4
  • Data Fetching: Axios + TanStack Query 5
  • Charts: Recharts 2
  • Date Utilities: date-fns 3

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/f1-visor.git
cd f1-visor

# Install dependencies
npm install

# Start development server
npm run dev

The application will be available at http://localhost:5173

Build for Production

npm run build
npm run preview

Project Structure

f1-visor/
├── src/
│   ├── components/        # React components
│   │   ├── circuit/       # Circuit map and driver visualization
│   │   ├── layout/        # Layout components (Header, etc.)
│   │   ├── playback/      # Playback controls and timeline
│   │   ├── positions/     # Position table
│   │   ├── session/       # Session selector and view mode
│   │   ├── telemetry/     # Telemetry panel
│   │   └── ui/            # Reusable UI components
│   ├── services/          # API services
│   │   └── openf1/        # OpenF1 API integration
│   ├── hooks/             # Custom React hooks
│   ├── stores/            # Zustand stores
│   ├── types/             # TypeScript definitions
│   └── utils/             # Utility functions
├── docs/                  # Documentation
└── public/                # Static assets

API Integration

This project uses the OpenF1 API for all Formula 1 data:

  • Historical Data: Free access to past races and sessions
  • Real-time Data: Requires paid account (not yet implemented)

Key Endpoints Used

  • /v1/sessions - Session metadata
  • /v1/location - GPS coordinates
  • /v1/position - Race positions
  • /v1/laps - Lap times
  • /v1/intervals - Time gaps
  • /v1/pit - Pit stops
  • /v1/car_data - Telemetry
  • /v1/stints - Tire strategy

Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

Code Conventions

All code follows strict TypeScript standards. See AGENTS.md for detailed coding conventions and AI agent instructions.

Documentation

Roadmap

  • Project setup and configuration
  • OpenF1 API integration
  • Session selector component
  • 2D circuit visualization with car positions
  • Playback system with timeline controls
  • Telemetry dashboard
  • Position table with timing data
  • View mode selection (Relive / Results)
  • Pit stop indicators on timeline
  • Performance optimization
  • Real-time data support (future)

Contributing

Contributions are welcome! Please read AGENTS.md for coding standards before submitting PRs.

License

MIT License - see LICENSE file for details

Acknowledgments

  • Data provided by OpenF1
  • Inspired by the Formula 1 community

Contact

For questions or suggestions, please open an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages