Skip to content

LovelyFox-code/f1-app

Repository files navigation

Formula 1 World Champions

A web application that displays Formula 1 World Champions from 2005 to the present year, along with race winners and championship details.

Mermaid diagram

Features

  • View Formula 1 World Champions from 2005 to present
  • See all grand prix winners for each season
  • Highlighted race winners who are also season champions
  • Responsive design for both desktop and mobile
  • Real-time data from the Ergast Developer API
  • Local data persistence with MongoDB

Prerequisites

  • Docker and Docker Compose
  • Node.js 20 or later (for local development)

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd f1-app
  2. Start the application using Docker Compose:

    docker-compose up

    This will start:

  3. For local development without Docker:

    # Start the backend
    npm install
    npm run start
    
    # Start the frontend
    cd frontend
    npm install
    npm run dev

Project Structure

formula-1/
├── frontend/           # Next.js frontend application
├── backend/           # Express.js backend API
├── infrastructure/    # Infrastructure and deployment configs
└── docker-compose.yml # Docker Compose configuration

API Endpoints

  • GET /api/seasons - Get all seasons from 2005 to present
  • GET /api/seasons/:season - Get details for a specific season
  • GET /api/seasons/:season/races - Get all races for a season

Development

Backend

deployed on Render

The backend is built with:

  • Express.js
  • TypeScript
  • MongoDB with Mongoose
  • Swagger for API documentation

Frontend

deployed on Vercel

The frontend is built with:

  • Next.js
  • TypeScript
  • Module CSS
Screenshot 2025-06-20 at 14 57 39

About

Full‑Stack F1 World Champions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages