Skip to content

jeiker26/f1-visor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages