Skip to content

Online games

TotoMondiale

The free football prediction game I have run for every major tournament since 2008, rebuilt in Node.js for the 2026 World Cup.

TypeOnline games

The problem

TotoMondiale is a free prediction game I have run for the big football tournaments since the mid-2000s. Its hall of fame lists TotoEuropeo 2008, TotoEuropeo 2012, TotoMondiale 2014 and TotoEuropeo 2016. The rules never changed much: for each match you fill in a slip, points follow the odds, and every slip is made public before kick-off so nobody can cheat. The old classic ASP site could not give players what they now expect: private leagues with friends, a phone-friendly layout and live scores. For the 2026 World Cup I rewrote it completely.

What I built

A new Node.js platform that keeps the old rules and adds leagues, live data and some fun.

  • 9-coupon slip: final result, half time, goal/no goal, under/over, penalties, half-time/full-time, odd/even, exact score, total goals. Odds come from API-Football, with default odds when none are available.
  • Private and public leagues: each league has its own standings, banner, news ticker and chat.
  • Special cards: Sesto Senso gives a bonus on the exact score, Malocchio takes points from another player, Cornicello cancels a Malocchio.
  • Fair play in the code: other players’ slips and cards stay hidden until the match locks. That rule applies to platform admins too. If someone forgets a slip, the system fills one at random, just like the original rules said.
  • Live matches: a job checks API-Football every 30 seconds and updates scores during the game.
  • AI features: Claude writes a daily set of suggested predictions; league admins can create a banner with DALL-E 3 and a short league newspaper with OpenAI.
  • Tournament pages and languages: teams, stadiums, history, group stage and knockout bracket, in five languages, with Google login.

Built with

Node.js 20, Express 4, EJS, MySQL 8, Passport with Google OAuth, Nodemailer and ImapFlow, running on Phusion Passenger on cPanel. I release in small steps and bump the version every time: the code is at version 5.1.642, build 665. Earlier editions ran on classic ASP with Access databases.

Why it was done this way

Kick-off times are stored in UTC with a separate display offset. API-Football needs the real UTC time to find a fixture, while players want to read Italian time. Keeping the two apart stops a whole class of bugs where a match locks an hour early or late.

Got an idea?
Let's talk.

Whether it is a website, an app, a video, a song or something bigger, I am ready to help you make it.

Get in touch
  • Naples
  • Ideas
  • Projects
  • People
  • Always forward