Skip to content

Repository files navigation

MatchBrief — TxLINE AI Insights

AI-powered football insights for the TxODDS Consumer & Fan Experiences hackathon.

Browse live, today's, and upcoming fixtures from TxLINE, open any match for stats and odds context, and generate a Gemini MatchBrief — analysis, not betting advice.

Stack

  • Next.js 16 (App Router)
  • TypeScript, Tailwind CSS, shadcn/ui
  • TxLINE API (fixtures, scores, odds)
  • Google Gemini (AI insights)

Requirements

  • Node.js 20+
  • pnpm only
corepack enable
pnpm install

Environment

cp .env.example .env.local
Variable Required Description
TXLINE_API_TOKEN yes Activated API token from free-tier subscribe + activate
TXLINE_API_ORIGIN no Default https://txline-dev.txodds.com
TXLINE_NETWORK no devnet (default) or mainnet
GEMINI_API_KEY yes for AI Google AI Studio
NEXT_PUBLIC_APP_URL no Public URL for metadata (Vercel URL in production)

See TxLINE World Cup Free Tier for credential setup.

Quick activation (devnet)

  1. Fund a devnet wallet (devnet-wallet.json)
  2. Subscribe via tx-on-chain subscription_free_tier.ts
  3. Activate in this repo:
TXLINE_TX_SIG=<subscribe_signature> \
TXLINE_WALLET=./devnet-wallet.json \
pnpm activate:devnet
  1. Paste TXLINE_API_TOKEN and GEMINI_API_KEY into .env.local

Run locally

pnpm dev

Open http://localhost:3000.

pnpm build
pnpm start
pnpm lint

Smoke test

curl -s http://localhost:3000/api/health/txline | jq

Features (MVP)

Phase Feature
1 pnpm setup, TxLINE client, env, activation script
2 Homepage — nav, hero, search, match cards (live / today / upcoming)
3 Match detail — stats, form, odds from TxLINE
4 AI MatchBrief — POST /api/matches/[id]/insight (Gemini)
5 Responsive layout, skip link, loading skeletons, about/disclaimer
6 Vercel-ready (vercel.json)

Routes

Route Description
/ Homepage with TxLINE fixtures
/matches/[id] Match detail + generate insight
/about Methodology & disclaimer
/api/health/txline Credential smoke test
/api/matches/[id]/insight Generate AI insight (POST)

Deploy to Vercel

  1. Push to GitHub
  2. Import project on vercel.com
  3. Set environment variables: TXLINE_API_TOKEN, GEMINI_API_KEY, TXLINE_API_ORIGIN, NEXT_PUBLIC_APP_URL
  4. Deploy — build command pnpm build, install pnpm install

For hackathon submission, ensure judges can use the deployed URL without paying for TxLINE access.

Project layout

src/
├── app/              # routes + API handlers
├── components/       # UI (home, layout, match)
├── lib/              # env, TxLINE helpers
├── services/         # matches, match-detail, insights
└── types/            # Match, TxLINE types

Hackathon notes

  • No FIFA branding or implied affiliation
  • AI output is fan analysis — not betting guarantees
  • Do not redistribute raw TxLINE data
  • TxLINE is the primary data source
  • Live scores stream via SSE (/api/matches/[id]/live) polling TxLINE snapshots
  • Fan pick + shareable brief on match pages

See PROJECT_PLAN.md for the full roadmap.

Demo video script (Solana / TxLINE callout)

Record ~3–5 minutes. Say this when you open a match:

  1. Hook (15s) — “MatchBrief is a fan app built on TxLINE for the Consumer & Fan Experiences track.”
  2. Landing → Explore (45s) — Show Intelligence Feed pulling real fixtures from TxLINE.
  3. Live differentiator (60s) — Open a match. Point at the SSE · TxLINE badge: “Scores refresh live over Server-Sent Events from our API, which polls TxLINE score snapshots.” Make a fan pick and tap Share brief.
  4. On-chain angle (45s) — Zoom the Verifiable on Solana card: “TxLINE doesn’t just give us JSON — packets are cryptographically signed and Merkle roots are anchored on Solana, so the same feed that powers MatchBrief can be validated on-chain.” Link verbally to txline.txodds.com.
  5. AI brief (60s) — Generate insight. Stress: analysis for fans, not betting advice.
  6. Close (20s) — Deployed URL + public repo. “Built specifically for this hackathon on Solana-anchored sports data.”

Optional B-roll: Superteam Earn listing, TxLINE World Cup free-tier docs, /api/health/txline returning { ok: true }.

About

AI-powered sports insights platform using TxLINE.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages