Case study
2026 World Cup Prediction Pool Platform
A full-stack platform for creating and managing 2026 FIFA World Cup prediction pools, built with Next.js, TypeScript, Prisma, and MySQL. The application provides authentication, private pools with invitations, predictions hidden until kickoff, automatic match synchronization through an external API, and a custom scoring and ranking system.
Technologies
The problem
Managing a prediction pool requires more than simply storing match predictions. The platform needs to manage participants, prevent predictions from being modified after kickoff, hide predictions beforehand, keep match results synchronized, and consistently calculate rankings based on custom scoring rules. The goal was to centralize and automate this process while allowing independent groups to manage their own pools and leaderboards.
The solution
A full-stack application was developed using Next.js with the App Router and API routes within the same application. Users can register, authenticate, create prediction pools, and invite other participants through invitation codes. Each pool maintains its own members, predictions, and leaderboard. World Cup matches are synchronized from an external football API. Incoming data is normalized and persisted using Prisma, allowing match dates, statuses, and results to be automatically updated. Predictions can only be created or modified before kickoff. Other participants' predictions remain hidden until the match begins. Once matches are completed, the application applies custom scoring rules and automatically recalculates each pool's leaderboard.
Responsibilities
Responsible for the end-to-end development of the application, including product rules, database modeling, authentication, pool creation and management, invitation flows, membership management, and prediction functionality. Also responsible for external match API integration, match synchronization and normalization, prediction locking rules, scoring calculation, leaderboard updates, and the Next.js user interface.
Technical decisions
Next.js was selected as a full-stack framework, allowing the frontend and application endpoints to live in the same project and reducing the operational complexity of maintaining separate applications. TypeScript is used throughout the application for type safety, while Zod provides input validation. Prisma was selected as the ORM and database access layer, using MySQL/MariaDB as the relational database. The schema uses relationships and compound constraints to maintain consistency across users, pools, matches, predictions, and scores. Authentication uses JWT and bcrypt password hashing. Match synchronization was implemented through a dedicated service consuming an external football API. Upsert operations allow new matches to be created while existing matches are updated idempotently. Scoring logic was isolated into its own service, supporting different point values for exact scores, correct winners, goal differences, and other prediction outcomes. Predictions are locked according to match time and status and remain hidden from other participants before kickoff, preserving competitive integrity.
Results
The project resulted in a functional platform capable of managing multiple independent prediction pools, participants, invitations, matches, predictions, and leaderboards. External synchronization reduces the need for manual result updates, while automated scoring keeps each pool ranking current. Prediction visibility and locking rules also ensure users cannot change predictions after kickoff or inspect competitors' predictions prematurely.