Technical docs

OmniPredict foundation

A judge- and contributor-friendly overview of the current MVP scope.

Current milestone

Milestone 8 adds Anchor/Solana toolchain bootstrap, contract build/test commands, expanded settlement validation tests, and a documented devnet deployment path.

Architecture

The app is organized into app routes, reusable components, pure analytics utilities, AI insight helpers, a TxLINE adapter layer, portfolio logic, settlement helpers, shared types, and data fixtures.

Mock data

Mock matches, odds snapshots, and events live in /data. They model score, status, odds, fair probabilities, event hashes, AI insights, positions, and settlement receipts.

API routes

POST /api/insights with a matchId to receive a structured AIInsight object containing title, summary, sentiment, confidence, drivers, risk notes, and recommendation.

TxLINE routes

GET /api/txline/status reports the active adapter mode. GET /api/txline/stream emits a snapshot event with status, matches, odds, and events for SSE-ready demos.

Settlement route

GET /api/settlement returns the default simulated settlement. POST /api/settlement with matchId, outcome, proofHash, stake, odds, and asset to receive a devnet-ready receipt.

Submission assets

README, ARCHITECTURE, SUBMISSION, DEMO, DEPLOYMENT, Codespaces config, API routes, and the Anchor-shaped settlement stub are included in the public repo.

Next milestone

Next technical step is running the toolchain in a full Anchor environment, deploying to devnet, wiring real validate_stat CPI fixtures, and replacing simulated signatures.

Demo flow

1Overview
2Dashboard
3Match Intel
4Portfolio
5Settlement
6Docs

API smoke tests

Health

curl http://127.0.0.1:4173/api/health

TxLINE status

curl http://127.0.0.1:4173/api/txline/status

TxLINE stream

curl -N http://127.0.0.1:4173/api/txline/stream

AI insight

curl -X POST http://127.0.0.1:4173/api/insights -H "Content-Type: application/json" -d '{"matchId":"eng-bra"}'

Settlement

curl -X POST http://127.0.0.1:4173/api/settlement -H "Content-Type: application/json" -d '{"matchId":"eng-bra","outcome":"England win","proofHash":"0x8d4a7e0cb782c14f19a5e3bcd91fae72942d7b32","stake":250,"odds":1.75,"asset":"USDC"}'