F1 Simulator Leaderboard - Real-Time Competition Platform

F1 Simulator Leaderboard - Real-Time Competition Platform

ReactTypeScriptExpress.jsPostgreSQLDrizzle ORMTailwind CSSGSAPTanStack QueryServer-Sent EventsPassport.jsPhotoRoom APIShadcn UIWouterSupabase

A dynamic, real-time competition management platform built to transform how racing events are organized, tracked, and experienced. The platform delivers live leaderboard updates via Server-Sent Events (SSE), sophisticated GSAP animations, and role-based management tools, creating an engaging experience for participants, organizers, and spectators alike. Built with modern web technologies, the platform handles multiple concurrent events, processes real-time ranking updates with sub-second latency, and features AI-powered avatar processing through PhotoRoom API integration—all while maintaining excellent performance on mobile devices.

Key Features

  • Real-time leaderboard updates with sub-second latency using Server-Sent Events
  • Sophisticated GSAP animation system with position change highlights and podium celebrations
  • AI-powered avatar processing with PhotoRoom API for professional background removal
  • Multi-event management supporting concurrent competitions with independent leaderboards
  • Role-based access control with Admin, Ambassador, and User permission tiers
  • Mobile-first responsive design optimized for all screen sizes
  • ISO timestamp-based animation sequencing for synchronized multi-client experiences
  • Team-based and individual participant tracking with flexible event configuration
  • Protected API endpoints with session-based authentication and secure session storage
  • Touch-optimized interactions and mobile-specific routes for streamlined experiences
  • Intelligent request deduplication and cache invalidation with TanStack Query
  • Automatic reconnection logic with exponential backoff for SSE connections
  • Cross-event analytics and comprehensive reporting capabilities
  • Context-aware UI that dynamically adapts to user permissions
  • End-to-end type safety from database to UI with shared schema definitions

Implementation Details

This real-time competition platform showcases advanced full-stack development with React, TypeScript, and Express.js. The architecture uses Server-Sent Events (SSE) over WebSockets for efficient unidirectional server-to-client updates, reducing server overhead while maintaining reliable connections with automatic reconnection logic. The animation system, built with GSAP, coordinates multiple concurrent animations using ISO timestamp-based sequencing for synchronized experiences across all connected clients. Avatar processing integrates PhotoRoom API, reducing processing time from 45+ seconds with client-side ML models to just 5-10 seconds with configurable removal strength settings. The platform implements a three-tier role-based access control system with Passport.js authentication and PostgreSQL session storage. Type safety is maintained end-to-end through Drizzle ORM schema definitions as the source of truth, with Zod schemas for runtime validation and TypeScript types inferred for compile-time checks. TanStack Query provides intelligent caching with proper query key hierarchies and optimistic UI updates, while the mobile-first design uses GSAP for smooth animations across all device types.