Skip to content
ChrisNCreationsPublic

About

Prediction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

⚽ Socracle

AI-powered World Cup analytics and prediction platform built on Injective Testnet.

Predict match outcomes, compete on leaderboards, and earn native USDC rewards — all on-chain.

Injective Next.js Prisma


Quick start

npm install
npm run dev:backend   # http://localhost:4000
npm run dev:frontend  # http://localhost:3000

Requires: Node.js 22+, Docker (for PostgreSQL), Injective-compatible wallet (MetaMask or Keplr).


Workspaces

Package Purpose Stack
frontend/ Next.js dashboard (15 routes) Next.js 16, Tailwind v4, framer-motion
backend/ Express API (32 endpoints) TypeScript, Prisma v7, PostgreSQL
agent/ MCP server + Agent skills Injective analytics
docs/ Documentation SYSTEM_OVERVIEW, architecture, design, development

Features

Live on Injective Testnet

Feature Status Details
Predictions ✅ Submit match predictions, stake USDC
x402 staking ✅ On-chain USDC transfer verification
CCTP bridge ✅ 7 testnet chains, Circle CCTP v2
Leaderboard ✅ 24h / 3D / 7D with DB filtering
SVE oracle ✅ Verify results + score predictions
Rewards ✅ Weekly top-5 USDC distribution
Wallet connect ✅ MetaMask, Keplr, Leap, OKX
AI analysis ✅ H2H, recent form, CSV-backed
Player data ✅ TheSportsDB squads + photos

Pages (15 routes)

Route Description
/ Premium landing page (Cloudinary video bg)
/dashboard Live matches, news, trending
/analysis Match search + H2H analysis
/analysis/[id] Detailed match breakdown
/predictions Prediction form with stake
/predictions/confirm Confirmation + TX details
/predictions/mine Prediction history
/leaderboard Rankings + prize pool
/wallet Balance + CCTP + history
/matches Finished match results
/team/[id] Team profile + squad
/team/search Team search
/news/[id] News article detail

API (32 endpoints)

/api/health · /api/matches · /api/predictions · /api/leaderboard · /api/cctp · /api/injective/balance · /api/sve · /api/pool · /api/news · /api/analysis · /api/search · /api/agent


Architecture

User → Next.js (frontend) → Express (backend) → PostgreSQL (Docker/Neon)
                              ↕                         ↕
                         Circle CCTP v2           Prisma ORM
                         Injective Testnet        49k CSV data

See docs/architecture.md for full technical architecture.


Database

Development: Docker PostgreSQL (no pauses)

docker run -d --name socracle-db -e POSTGRES_PASSWORD=socracle123 -e POSTGRES_DB=socracle -p 5432:5432 postgres:16

Production: Neon serverless PostgreSQL with pooled connection.


Documentation

Doc Content
SYSTEM_OVERVIEW.md Full product overview
architecture.md Technical architecture
design.md Design system + components
Development.md Dev log + phases

About

Prediction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages