Gala ran a branded Fantasy Premier League challenge with cash prizes, and asked me to build the platform for it. Overall, weekly and monthly leaderboards are worked out live from the public FPL data, and real money is attached to the standings, so the numbers had to be right and fresh.
I first built it on Node.js. Their hosting was cPanel shared hosting with no Node support, so I rebuilt it in PHP 8.1 and MySQL to run where they already were.
What I built
FPL has no login for outside apps, so I verify team ownership by asking managers to rename their team to a code I generate. Nobody hands over a password.
Standings are never served from cache. The app shell works offline, but anything under /api/ always comes fresh, because stale numbers on a cash leaderboard would mislead people.
Tiebreaks (captain points, then vice-captain, then season rank) only run on the entries actually tied around a paid position.
Three timed daily mini-games (trivia, guess the player, word match), with one counted attempt per day enforced in the database.
Bank details for payouts are stored encrypted. Cron jobs send deadline reminders and winner announcements.
Google sign-in, Web Push, shareable result cards, a compare page for any two teams and an admin payout tracker.