The F1 Event Dashboard is a lightweight application that displays Formula 1 event schedules, team standings, and live race updates. This project consists of a PHP backend service, a Vue.js frontend, and is deployed using a basic Kubernetes setup.
The project is structured as follows:
- Backend: PHP service (Laravel framework)
- Frontend: Vue.js
- Deployment: Kubernetes (Minikube for local setup)
- CI/CD: GitHub Actions
- Display F1 event schedules
- Show team standings
- Provide live race updates using Server-Sent Events (SSE)
- Docker
- Kubernetes (Minikube for local setup)
- Node.js and npm
- PHP 8.x
- Composer
-
Clone the repository:
mkdir f1-dashboard cd f1-dashboard git clone https://github.com/3m-abro/f1-event-dashboard.git . -
Set up the backend:
cd backend cp .env.example .env composer install php artisan key:generate -
Set up the frontend:
cd ../frontend npm install -
Run the development servers:
- Backend:
php artisan serve - Frontend:
npm run serve
- Backend:
-
Start Minikube:
minikube start -
Apply Kubernetes configurations:
kubectl apply -f k8s/ -
Enable Ingress in Minikube:
minikube addons enable ingress -
Update Hosts with Virtual Domains:
sudo nano /etc/hosts // Add following in the hosts file 127.0.0.1 f1-dashboard.local 127.0.0.1 f1-backend.local -
Start Minikube Tunnel to access Virtual Domains:
minikube tunnel -
Start Minikube Dashboard (Optional):
// Start Minikube Dashboard to view Kubernetes Panel for pods and services. P.S. Use a new terminal. minikube dashboard
GET /api/schedule: Retrieve F1 event scheduleGET /api/standings: Get team standingsGET /api/live-updates: Server-Sent Events endpoint for live race updates
To run the backend tests:
cd backend
php artisan test
The project uses GitHub Actions for CI/CD. The pipeline is configured in .github/workflows/ci-cd.yaml and includes:
- Running backend tests
- Building Docker images
- Deploying to Kubernetes (when merged to main branch)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.