Pink CRT showing the ArakIce home screenArakIce game prediction panelArakIce home: tonight's gamesArakIce bet slip with combined probability
ML product · iOS

ArakIce

NHL prediction app built end to end on my own: period-by-period game model across 40+ live markets, player props, bet-slip scanner, ~500 SEO pages regenerated daily, and an iPhone app.

NHL prediction app, on the web and on iPhone. arakiceML predicts how many goals each team should score, period by period, which gives the probability of 40+ markets — consistent with one another and recomputed during the game. Those probabilities are compared with bookmaker odds to isolate the gaps worth a look, and a community tracks its bet slips in real time.

arakiceML accuracy
58.95%
Walk-forward backtest. Baseline “the home team wins”: 54.0%.
markets, recomputed live
40+
SEO pages, regenerated daily
~500
person, end to end
1

Personal project, built end to end on my own. Product, design, front end, back end, database, data pipeline and ML models, the iOS app, deployment, billing and SEO. Live on arakice.com. The iOS app is finished and runs on iPhone through TestFlight, but Apple only accepts simulated-gambling apps from company accounts: its release is on hold, and the web is being commercialised first.

What was built

One app, many moving parts

Explainable rules engine

Log5, Poisson and Skellam across 40+ markets — moneyline, spreads, totals, player and goalie props. Each bet family has its own factors, whose weights the user can tune; unchecking a factor redistributes its weight proportionally.

Value-gap detection

The gap is measured against DraftKings odds stripped of the bookmaker’s margin, then filtered to the one band whose return the backtest actually validates. Beyond it, a gap signals missing information rather than an opportunity — so it is discarded.

Live predictions

During the game, every probability is recomputed from the pre-game view, the score and the time left, with score effects measured on real games. Nothing is switched on without a gain measured on replay: a power-play effect calibrated on 9,673 games and replayed on 3,890 others added nothing, so it is not in production.

Today’s best bets and parlays

Every day, the picks whose gap to the market falls inside the validated band are ranked, and parlays are assembled while ruling out legs that conflict with each other. Their leg-by-leg settlement feeds an internal tracker of the real return.

Bet-slip scanner

A screenshot of a sportsbook slip is read leg by leg and each bet gets its arakiceML probability — from screenshots only, with no paid vision model. Three free scans a day, unlimited with Pro.

Slips and automatic settlement

Parlay building with the probability recomputed on every leg, then automatic settlement the moment a game turns final — an event-driven job that only queries the API while a slip is pending. Results are kept leg by leg.

Real-time chat and moderation

Public and private rooms over WebSocket: replies, reactions, deleting your own messages, and a clean resync after a drop or a return to the foreground. Moderation: a language filter, live blocking and an admin queue.

Sharing a slip as an image

A 1080 × 1080 render in the app palette, shareable in a room or outside the app — on iPhone, through the native share sheet. The snapshot is built server-side from the slip id alone, then frozen.

Leaderboard and public profiles

Experience-based podium, player search and other users’ slips — behind three independent safeguards: the author’s consent, a cutoff date, and hiding selections until puck drop.

Guard-railed AI analysis

The LLM proxy only accepts a task type defined server-side, never a free-form prompt from the client — which bounds both abuse and cost. It writes an analysis for each bet; the monthly quota is counted and shown in settings.

Pro subscription, two payment rails

Stripe on the web, StoreKit 2 in-app purchase on iOS, and a single entitlement on the server. Apple transactions are verified with no third-party dependency — JWS signature, certificate chain pinned to Apple’s root — then deduplicated and applied in order.

Programmatic SEO

About 500 static pages generated from the data — head-to-heads and one page per game — regenerated every day by GitHub Actions, with a sitemap, permanent redirects for retired URLs and Search Console monitoring.

The vertical videos that promote the app come from a separate pipeline: the ArakIce Content Engine.

arakiceML

From raw game to validated prediction

arakiceML does not predict “who wins”: it predicts how many goals each team should score, period by period, with the empty net modelled explicitly. Those numbers give the matrix of every possible score, and therefore the probability of every market — moneyline, puck line, totals, exact score — with no contradiction between them. Odds never go in: they are a yardstick, not an input.

The delicate part is not the training, it is guaranteeing that no post-game information sneaks into the features. Everything is computed as of the eve of the game, and the train/test split is chronological — never random.

  1. Collection

    Official NHL schedule back to 2008, MoneyPuck advanced stats (expected goals, Corsi, high-danger chances, goalies and skaters game by game), historical odds and a live odds journal captured by a homegrown job.
  2. Feature engineering

    Exponentially weighted averages over two horizons, ELO with home-ice advantage and between-season regression, starting-goalie form, star power and absences weighted by the player’s real role, rest and congested schedules.
  3. Training

    XGBoost Poisson regression, one row per team per game, early stopping on a separate validation set. On top: a layer that recalibrates the win probability, and a goal-level recalibration recomputed every Monday during the season.
  4. Validation

    Walk-forward backtest across nine priced seasons, with honest baselines — home team, ELO alone, the market — and a simulated return per edge threshold, which set the value band used in production. Same method to hunt for hidden patterns: 3,517 conditions tested against the served chain — none survives Benjamini-Hochberg correction.

Player model

One model per stat — goals, assists, points, shots, hits, blocked shots, penalty minutes, power-play points — each with its own dispersion. A player’s history against tonight’s opponent is kept only where it holds up in both validation and test: hits and penalties, with the effect of the night’s referees added on top.
For AI agents

An API that agents pay for themselves

arakiceML’s predictions are also sold to AI agents, with no account and no human in the loop. The API speaks x402: a request without payment gets an HTTP 402 Payment Required; the agent pays in USDC on Base, then gets the data.

x402 on Base

Live on Base mainnet through the PayAI facilitator. Payment is the authentication: no API key to issue, no invoice to chase.

MCP server

Published on npm as arakice-nhl-mcp and listed in the official MCP registry, so assistants can call the predictions as a tool.

Listed and auditable

Listed in x402 directories (x402scan, agent402). A public repository keeps the predictions’ track record — accuracy and calibration, no promise of winnings.
iOS app

The same product, native on iPhone

The React client is wrapped with Capacitor, and whatever a website cannot do is written natively. No Mac involved: every build is compiled, signed and shipped to TestFlight by a cloud macOS CI.

Session in the Keychain

Inside the WebView the refresh cookie would have been blocked — a logout every 15 minutes. On iOS the token travels in the response body and lives in the Keychain; the web keeps its httpOnly cookie, untouched.

Push notifications (APNs)

A settled bet triggers a notification in the user’s language; tapping it opens the bet. Delivery goes over HTTP/2 with an ES256 token, written without a library. Value-bet alerts are for Pro subscribers.

Home Screen widget

SwiftUI and WidgetKit, in three sizes: pending bets with their live probability. The app hands the widget a read-only token through an App Group, and the widget calls a route that serves nothing else.

Universal Links

An arakice.com link — a team page, a player’s slips, the schedule — opens the matching screen in the app instead of Safari. SEO pages stay on the web.

One codebase, two targets

The iOS build fails if a bookmaker link slips into the bundle, and adapts the copy to Apple’s rules. Every change is shared and tested on both.

macOS CI, no Mac

GitHub Actions on a macOS runner: certificates and provisioning profiles for the app and the widget decoded from secrets, signed build, upload to TestFlight. The first build went up on October 9 and ran on an iPhone the next day.
Architecture

Three services, one database

The Python service is deliberately kept apart from the Node API: it deploys, restarts and retrains without touching anything else, and if it ever goes down the rules engine keeps serving probabilities. The same principle applies throughout — every external call has a fallback.

Node.js API

Express on Railway, behind Cloudflare. Socket.io + Redis for chat and presence.

ML service

Python, FastAPI, XGBoost — arakiceML, deployed and retrained on its own.

PostgreSQL

Neon, numbered SQL migrations applied one at a time — never a hand-edited schema.

React client

Vite on Vercel, mobile-first; the iOS app wraps the same client (Capacitor, SwiftUI).

Around it

Cloudflare R2 for avatars, Stripe and StoreKit 2 for subscriptions, APNs for notifications, Sentry for errors and health.
Security and operations

What keeps the app standing

  • Sessions — short-lived access token in memory, refresh token in an httpOnly cookie with atomic rotation and a grace window.
  • Google sign-in — fails closed when the address is unverified; the token never travels through a visible URL.
  • Validation — strict schemas on every input, including the WebSocket path that bypasses HTTP middleware.
  • Rate limiting and hard timeouts on every expensive route and every external call.
  • Encryption of sensitive data, verified by a startup probe, with a documented secret-rotation procedure.
  • Bilingual FR / EN across the whole interface, the terms and the privacy policy.
  • Privacy — slip publishing is opt-out rather than forced opt-in, in line with Quebec’s Law 25.
  • Account deletion from inside the app, as Apple requires, plus database-restore and deployment-rollback drills.
Preview

On the web

Tech stack

What it runs on

  • React 18 · Vite
  • TypeScript
  • Tailwind CSS
  • Node.js · Express
  • PostgreSQL · Neon
  • Socket.io · Redis
  • Python · FastAPI
  • XGBoost · pandas
  • Stripe · StoreKit 2
  • Vercel · Railway
  • Cloudflare R2
  • Capacitor
  • Swift · SwiftUI
  • GitHub Actions
  • x402 · MCP