A web application that displays Formula 1 World Champions from 2005 to the present year, along with race winners and championship details.
- 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
- Docker and Docker Compose
- Node.js 20 or later (for local development)
-
Clone the repository:
git clone <repository-url> cd f1-app
-
Start the application using Docker Compose:
docker-compose up
This will start:
- Frontend (Next.js) on http://localhost:3000
- Backend (Express) on http://localhost:5001
- MongoDB on localhost:27017
-
For local development without Docker:
# Start the backend npm install npm run start # Start the frontend cd frontend npm install npm run dev
formula-1/
├── frontend/ # Next.js frontend application
├── backend/ # Express.js backend API
├── infrastructure/ # Infrastructure and deployment configs
└── docker-compose.yml # Docker Compose configuration
GET /api/seasons- Get all seasons from 2005 to presentGET /api/seasons/:season- Get details for a specific seasonGET /api/seasons/:season/races- Get all races for a season
The backend is built with:
- Express.js
- TypeScript
- MongoDB with Mongoose
- Swagger for API documentation
The frontend is built with:
- Next.js
- TypeScript
- Module CSS