Skip to content
All projects

Pique Club

A 2026 World Cup prediction game for groups of friends, with picks, a bracket and live results.

Role
Developer (own product)
Period
Jun – Jul 2026
Stack
Next.js, Drizzle, PostgreSQL, TanStack Query
Pique Club home page: “The ultimate prediction game for the 2026 World Cup”.

What I built

  • A 2026 World Cup prediction game for private groups: everyone predicts the matches, fills in their bracket and competes on a leaderboard.
  • Live results: the server syncs matches around kickoff times and the app refreshes every 30 seconds while a match is being played.
  • Scoring: 3 points for an exact score, 1 for the right winner or draw, a joker that doubles points in the group stage, and a bonus for picking who goes through in the knockouts.
  • Predictions lock 15 minutes before each match, enforced on the server.
  • Sign-in with Google or email, group invitations, an activity feed and predictions you can share as an image.

Technical decisions

Sync only when it's needed
A cron job on Render calls the sync endpoint every 10 minutes (Vercel's free plan doesn't allow crons that frequent), and a scheduler decides whether to update based on the match phase: before kickoff, live or finished, each with its own cooldown. That keeps it within the APIs' free quotas.
Several providers, one format
Data comes from TheSportsDB and, optionally, API-Football with a daily request budget. Everything is normalized into a single match format before being merged.
The leaderboard is computed on read
Points aren't stored: the leaderboard is computed from predictions and results every time it's requested.
The 2026 World Cup tie-break rules
The ranking of the best third-placed teams and the round-of-32 slot assignment follow FIFA's Annex C.
Switching tabs without waiting
Visited tabs stay mounted and data is prefetched. Team crests are served with a one-year immutable cache.