La Liga Forecaster

Inspiration

The passion and excitement of Spanish football, La Liga, was the core inspiration for this project. We wanted to go beyond simple score predictions and create a tool for fans that combines statistical likelihoods with qualitative, AI-powered insights to provide a richer understanding of upcoming matches.

What it does

La Liga Forecaster is a web application that predicts the outcome of football matches in Spain's top division. Users can:

  • Select a home and an away team from a list of current La Liga clubs.
  • Receive a prediction for the match outcome (Home Win, Draw, or Away Win).
  • View the percentage probabilities for all three possible results.
  • See a "confidence" score, indicating the model's certainty in its prediction.
  • Read a unique, AI-generated analysis that explains the potential factors that could influence the match, such as team rivalries, playing styles, and home-field advantage.

How we built it

This project was built using a modern, server-centric web stack:

The prediction logic is currently simulated within a Next.js Server Action, which then calls a Genkit flow to generate the qualitative analysis of the matchup.

Challenges we ran into

One of the main challenges was integrating a complex predictive model. We initially explored building a custom machine learning model to predict detailed stats like goal scorers and possession, but we ran into the limitations of the development environment. We learned that integrating pre-trained models or external data science workflows is a significant undertaking.

Another minor but persistent challenge was ensuring the correct icons were used from the lucide-react library, which taught us the importance of verifying library-specific details during development.

Accomplishments that we're proud of

We are proud of creating a fully functional and responsive web application with a clean, modern user interface. The successful integration of Genkit to provide dynamic, AI-generated content for each prediction is a key accomplishment. It transforms the app from a simple calculator into an engaging tool for football fans.

What we learned

This project reinforced the power of a component-based architecture using React and ShadCN for building UIs quickly and consistently. We also gained valuable experience with Next.js Server Actions for handling form submissions and learned about the capabilities and limitations of integrating generative AI for specific, structured tasks. The project highlighted the importance of scoping features to what is achievable within the available toolset.

What's next for LaLiga Game Predictor

The next logical step is to move beyond the simulated prediction. We plan to integrate a real machine learning model hosted on a service like Google Cloud's Vertex AI. This would allow the app to make predictions based on actual historical data, significantly improving its accuracy and utility.

Built With

Share this project:

Updates