ML-driven sports betting product: predictions, Kelly-based bet sizing, live odds, and a real subscription surface. Live at aiadvantagesports.com.
Most "AI betting" projects stop at a notebook. This one ships.
AI Advantage turns model output into a decision a user can actually act on:
- Predict — model-driven picks across NBA, NFL, and MLB
- Size — Kelly-based stake recommendations that protect bankroll
- Time — live odds and line-movement views to catch value before the market adjusts
- Monetize — premium tier with real Stripe checkout, not a fake paywall
It's the product layer of a larger sports-analytics stack — the modeling lives in adjacent repos, this is where it meets a user.
| Area | What it does |
|---|---|
| Game analyzer | Enter a matchup, get an analysis and a recommendation |
| Live odds | Track lines and movement across the slate |
| Kelly sizing | Translate edge + bankroll into a stake |
| Multi-sport | NBA, NFL, MLB workflows |
| Premium | Stripe subscription + one-time checkout |
| Newsletter | Notion-backed capture wired into Substack |
React · TypeScript · Vite · Tailwind CSS · shadcn/ui
Netlify Functions handle Stripe checkout, newsletter capture, and the shared execution ledger so previews and production stay fully functional.
git clone https://github.com/ianalloway/ai-advantage.git
cd ai-advantage
npm install
npm run devOpen http://localhost:8080.
netlify.toml— Netlify SPA deploy + serverless functions (netlify/functions)api/— shared server-side handlers (Stripe checkout, newsletter capture, execution ledger) wrapped bynetlify/functions
STRIPE_SECRET_KEY=sk_...
STRIPE_PREMIUM_PRICE_ID=price_...
STRIPE_ONE_TIME_PRICE_ID=price_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_TRIAL_DAYS=7
PUBLIC_APP_URL=https://aiadvantagesports.com
AUTH_SECRET=...Webhook endpoint: https://aiadvantagesports.com/.netlify/functions/stripe-webhook
Events: checkout.session.completed, checkout.session.async_payment_succeeded, customer.subscription.created|updated|deleted.
Paid access is server-truth only (/api/entitlements/me). localStorage is a cache and cannot unlock Pro.
Checkout includes a STRIPE_TRIAL_DAYS trial on Pro Monthly. Customer Portal: /api/create-portal-session (enable in Stripe Dashboard → Settings → Billing → Customer portal). Funnel events: checkout_started → checkout_paid → d7_retained → cancel_reason via /api/funnel. Hourly edge-alert emails: send-edge-alerts (needs RESEND_*).
Check readiness: curl -s https://aiadvantagesports.com/api/billing-status | jq
Production does not fall back to Payment Links when Checkout Sessions fail (that orphaned access).
The homepage form posts to /api/newsletter-subscribe, which creates a Notion entry, emails a notification, and redirects into the Substack subscribe flow.
NOTION_API_KEY=***
NOTION_PARENT_PAGE_ID=...
RESEND_API_KEY=re_...
RESEND_FROM_EMAIL="AI Advantage <onboarding@yourdomain.com>"
NOTIFY_EMAIL=ian@allowayllc.com
SUBSTACK_PUBLICATION_URL=https://allowayai.substack.com| Repo | Role |
|---|---|
| sports-betting-ml | Models — logistic regression, XGBoost, ensembles |
| nba-ratings | Ratings + win-probability library |
| kelly-js | Kelly / odds / bankroll math (TS) |
Ian Alloway — Portfolio · LinkedIn · Writing
Proprietary. All rights reserved.

