Fanta F1 – Full-Stack F1 Fantasy League Platform

🌍 Live Demo → fanta-f1.web.com

A full-stack web application to manage a Formula 1 fantasy league among friends — real-time standings, automatic points calculation via REST API, sprint race support, advanced admin tools, PWA installability, and push notifications.

Fanta F1 – Home Page

Home page — quick access to submissions, F1 hub, race history, and standings

🎮 How It Works

Before each Grand Prix, every player submits a formation before qualifying starts. Points are calculated automatically once official results are fetched from the Ergast F1 API.

🏆 Scoring System

Main Race

  • 1st correct → 12 pts · 2nd → 10 · 3rd → 8
  • Joker on podium → +5 pts

Sprint Race

  • 1st correct → 8 pts · 2nd → 6 · 3rd → 4
  • Sprint Joker on podium → +2 pts
Formation Submission

Submit page — formation submission with driver selection

F1 Calendar

F1 Calendar — admin race calendar management

Personal Profile

Personal profile — participant detail and formation history

Personal Statistics

Personal statistics — performance metrics and points breakdown

📱 App Features

Race Statistics

Race statistics — per-race results and scoring

🔌 REST API Integration – Ergast F1 API

⚙️ Admin Panel

Secured via Firebase Custom Claims — no shared passwords, no client-side bypass. Privileges are granted via a server-side Node.js script.

📝 Formation Management

  • Submit or edit any user's formation, bypassing the deadline
  • Apply or override late submission penalty
  • Manage sprint formations separately

📅 Calendar Management

  • Edit race, qualifying, and sprint deadlines
  • Add/remove sprint weekends
  • Cancel races/sprints (skips points calc)

🧮 Points Calculation

  • Auto-fetch results from Ergast API or manual entry
  • One-click calculation with 29→30 and double-points auto-detection
  • Ranking snapshot saved after every calculation

💾 Backup & Restore

  • Auto-backup before every critical operation
  • Browse, preview, and one-click restore from any snapshot
  • Export as JSON; destructive ops require typing "RESTORE"

🔐 Authentication & 📲 PWA

  • Email/Password and Google Sign-In
  • Account linking: same email → merged profile
  • Unique nickname enforcement at registration
  • Password reset via Firebase secure email
  • Route guards: ProtectedRoute + AdminRoute
  • Installable on Android, iOS, and desktop
  • Offline-capable via Workbox service worker
  • Auto-update on next launch
  • FCM push notifications: qualifying reminders 1 h and 5 min before (night sessions → 21:00 the day before)
  • Delivered by Firebase Cloud Functions on cron schedule
F1 Hub

F1 Hub — real-time standings and season leaderboard

🎨 Customization

🛠️ Tech Stack

Frontend

React 19 · React Router v7 · React Bootstrap · React-Select · Recharts · Vite 6 · vite-plugin-pwa

Backend & Database

Firebase Firestore · Firebase Auth · FCM · Cloud Functions (Node.js 20) · Firebase Hosting · Ergast F1 REST API

Deployment

GitHub Actions CI/CD · Firebase Hosting auto-deploy · Firestore Security Rules · GitHub Secrets

← Back to ProjectsView Source Code on GitHub →