Cross-exchange analytics for Solana perpetuals (Phoenix and Jupiter):
- Overview — side-by-side volume and open-interest comparison
- /phoenix, /jupiter — per-exchange stats, OI/volume charts, markets table
- /discover — surfaced wallets: volume/PnL leaderboards, liquidation feed, whale fills, most active takers, largest open positions, PnL leaders
- /trader/[pubkey] — cross-platform trader profile with inferred traits (bot vs human, likely timezone, trading style, size tier)
Data is queried live from read-only Postgres replicas; heavy aggregates are cached server-side.
cp .env.example .env.local # fill in both connection strings
npm install
npm run devServer-only (no NEXT_PUBLIC_ prefix — never shipped to the client bundle;
the browser only ever talks to the /api/* routes):
DATABASE_URL— read-only Postgres connection string for the Phoenix perps database (RDS Proxy; TLS withrejectUnauthorized: false)JUPITER_DATABASE_URL— read-only Postgres connection string for the Jupiter perps database (Aurora reader endpoint)
- Import the repo as a Next.js project (auto-detected, no build settings).
- Under Settings → Environment Variables, add
DATABASE_URLandJUPITER_DATABASE_URLfor Production + Preview. Do not prefix them withNEXT_PUBLIC_. - Deploy. API routes run as serverless functions; DB pools are capped at 3
connections per function instance. Some Jupiter routes declare
maxDuration = 300for the heavy open-interest reconstruction, which requires a plan/function config that allows 300s execution.