A free-to-play Premier League football scores predictor game. Create or join leagues to compare your predictions in a league table with your friends.
https://www.desmondtwotwo.com/signIn/
Enter your predictions for the current gameweek and select a game to you feel confident in to double your points. Three points for a correct score. One point for a correct result. The deadline for a prediction is 90 minutes before kick-off.
Right away, once you have signed up. We use passwordless login, so all you need is your email.
Sure. Navigate to the "Create League" section and share the league code with your friends. If your friend has already created a league, go to the "Join League" section to join their league.
Fixtures are usually added two gameweeks in advance. Predictions for a match lock 90 minutes before kickoff, so enter your score in before then. If you forget, a default score of 0-0 will apply, so you won't miss out completely!
This project was initialised using one of the Next.js example projects:
- Populate fixtures: Uses the FPL fixtures API (thank you Premier League 🙏) to populate fixtures in the database.
- Update fixture results: Updates the score of a Premier League match. Evaluates the score of all predictions for this fixtures.
- Update predictions: Set the prediction to 0-0 for users that missed the deadline (In development...).
- Initially wanted to use Mongo, but data is highly relational which meant SQL was a better fit.
- Prisma's documentation isn't clear with regards to explicit many-to-many relationships. Followed the answer provided here as an implementation guide: prisma/prisma#2162
- Create database (Currently using Render.com)
- Update env variables in
.env
:DATABASE_URL
,RAW_DATABASE_URL
- Update env variables in Vercel
- Sign in to
cloud.prisma.io
and create a new environment with new db connection - Update
teamsDictionary
infplApi.ts
with updated teams for new season - Add trigger to database for prediction audit