┌────────────────────────┐
│ apps/web │ Next.js 15 + Reown AppKit + HeroUI v3
paste tweet → │ /create /m/[address] │
└─────────┬──────────────┘
│ HTTP
┌─────────▼──────────────┐
│ apps/api │ Bun + Hono
X post fetch via │ /posts/evaluate │ ├─ X-posts service (RapidAPI)
twitter241, │ /markets, /price/0g │ ├─ gatekeeper (0G Compute TEE)
CoinGecko 0G price │ /users/:addr/positions│ └─ SQLite cache (proposals, posts, USD)
└─────────┬──────────────┘
│ contract calls (viem)
┌─────────▼──────────────┐
│ 0G Chain (mainnet) │ EVM, sub-second finality
│ MarketFactory ─────┬──┤ EIP-1167 clones
│ AIResolver │ │ ECDSA-verifies TEE receipts
│ PredictionMarket × N │ Parimutuel YES/NO
│ ├─ Treasury × N │ ├─ reserve floor + adapter allowlist
│ └─ GimoAdapter × N │ └─ st0G liquid staking
└─────────▲──────────────┘
│ submitResolution()
┌─────────┴──────────────┐
│ apps/judge-worker │ Bun cron worker
│ discover → judge │ ├─ paginates factory
│ → sign → submit │ ├─ judge runs in 0G Compute TEE
└────────────────────────┘ └─ signs domain-separated digest