Skip to content
Start a project
All work

Esports Prediction Platform

A prediction platform for CS2 matches: an app for web and phone, AI agents that analyse every match, tournaments, a social feed and a separate admin panel for the team.

Type
Gaming platform · web and mobile app
Stack
React 18 / TypeScript / Vite 7 / PWA + Web Push / Supabase (PostgreSQL) / Deno Edge Functions / Inngest / DeepSeek / Perplexity / Gemini / Stripe / Sentry / Vitest + Playwright
System diagram, not a screenshot

The product is private, so this is a system diagram. Screenshots will appear once approved.

Problem

Esports fans want more than watching: they want to test their read of the game, compare themselves with others and win. That takes a product that lives at match pace: data refreshes by the minute, results are credited at once and without mistakes, and on a phone it feels like a native app.

Solution

A complete platform in three parts. The player app runs on the web and installs on a phone: predictions for virtual coins, tournaments, leaderboards, a community feed, copying the picks of the strongest players. AI agents prepare analysis for every match in three languages and check their own accuracy. The admin panel gives the team full control over the economy, content, traffic and security.

52
app screens
23
admin sections
90
server functions
406
database migrations
444
row-level access policies
216
test files
15
e2e specs
3
interface languages

Three parts of the product

The player sees a fast app. Behind it work the agents that prepare analysis and a panel from which the team runs everything without a developer.

  • Player app

    01
    • Live CS2 matches, team, league and tournament pages, the world team ranking
    • Predictions for coins, prediction history, automatic refunds for cancelled matches
    • Arena: weekly and monthly tournaments with four scoring modes
    • Community feed: posts, media, GIFs, comments, mentions, follows
    • Copying a strong player's pick in one tap
    • Achievements, streaks, daily rewards, tasks, a referral programme, collections
    • Installs on a phone, push notifications, an icon badge, works on a weak connection
  • AI agents

    02
    • Prediction agent: outcome probabilities, a confidence level, key factors and a 400–600 word breakdown
    • Analysis agent: a short pre-match review with a live web search for fresh data
    • Translation agent: every breakdown ships in Ukrainian, English and Polish
    • An orchestrator runs the agents on a schedule every two hours, with no human involved
    • A review agent checks predictions against results daily; model accuracy is open to players
    • A support agent answers players in chat
    • Service agents collect statistics and normalise team names and logos
  • Admin panel

    03
    • A separate app on its own domain with hardened security headers
    • Players, predictions, teams and leagues, tournaments, achievements, leaderboard
    • The coin economy and finances, the referral programme
    • Push campaigns, news, community moderation, support chat
    • Analytics: inbound traffic from ad accounts, in-app behaviour, outbound traffic
    • The background job schedule, logs, a security section
    • Admin and moderator roles; dangerous actions only after a second-factor check

Modules

Predictions and settlement
Coin deduction, settlement once a match ends, refunds for cancelled matches. Every payout carries an idempotency key, so it is never credited twice
Arena
Tournaments with a full lifecycle: launch, live scoring, finalisation, automatic creation of the next week. A result card made for sharing
Community
A feed, likes and comments on predictions, follows, pick copying, follower alerts about a new prediction
Economy
Virtual coins, daily rewards, tasks, referral bonuses, a store. Balances change only through atomic database operations, with an automatic reconciliation every night
Match data
Schedules, rosters, live scores, odds and rankings from several sources, merged into one picture and refreshed on a schedule
Notifications
Web Push, in-app notifications, email. A dead-letter queue for undelivered pushes with replay, plus pruning of stale subscriptions

Integrations

PandaScore
The main CS2 data source: matches, teams, live scores
Liquipedia, Valve VRS
Tournament brackets, rosters and the official world team ranking
DeepSeek
Match prediction and breakdown with structured output, translation
Perplexity Sonar
Analysis with web search; team name normalisation
Gemini
Support chat and processing of collected statistics
Stripe
Store purchases: webhook signature checks, protection against double crediting
Inngest
Durable background jobs: settlement, social events, pushes
Google, Apple, Telegram
One-tap sign-in next to email and password
Web Push (VAPID)
Phone notifications without an app store
Resend
Email with React Email templates
Google Ads, Meta, TikTok
Ad spend and results in the admin analytics
Sentry
Client and server errors; every request has its own id

Architecture

  • Two apps in one repository: client and admin, sharing a layer of types, the database client and components
  • React 18, TypeScript, Vite 7; data through React Query with a persisted cache and a service layer per domain
  • PWA: an auto-updating service worker, image caches, a dedicated push worker, install to the home screen
  • Supabase: about 114 tables, 406 migrations, 444 row-level policies, about 229 database functions
  • 90 server functions on Deno: data sync, agents, notifications, tournaments, payments
  • Realtime for matches, predictions, notifications, chat and support
  • Background work: Inngest for settlement and events, schedules in the database and on Vercel for syncs
  • CI: lint, typecheck, tests, e2e, migration checks; the schema reaches production only through the pipeline
  • Versions and the changelog are produced automatically; the admin panel deploys on its own

Engineering decisions

  • Settlement moved to a durable queue: every payout is atomic, carries an idempotency key and retries five times; before cutover the new path ran in shadow mode next to the old one
  • A player's balance never changes from app code: only atomic database operations plus a nightly reconciliation
  • The second factor for admins is checked by the database itself, not the interface: it cannot be bypassed from the client
  • The prediction agent answers in a strict structure, not free text: probabilities can be stored, compared with results and shown as model accuracy
  • Other people's data is read only through a public profile view: private fields never leave the database
  • Architecture rules live in the linter: forbidden imports and bypassing the service layer fail the check

What was delivered

  • An app for web and phone
  • Predictions with instant settlement
  • Arena tournaments
  • Community feed and pick copying
  • AI analysis in three languages
  • Open model accuracy
  • A 23-section admin panel
  • Push notifications and campaigns
  • Store and payments
  • Traffic analytics
  • Sign-in with Google, Apple, Telegram
Next case studyWICKTRIQ

Need something similar?

Start a project