Link: https://stock-radar-9t24-ppcrvodu4-darshans-projects-84a52e39.vercel.app/
Pay-per-use financial intelligence APIs with blockchain-native payments, async AI analysis jobs, and an operator-ready dashboard.
Stock-Radar is built for developers who want production-style market intelligence without subscription lock-in:
- Query only what you need, pay only for what you call.
- Expose discoverable machine-to-machine endpoints (
/api/agent/discover,/api/agent/message). - Support payment-gated routes through x402 + Aptos.
- Keep analysis state in Supabase and run compute in a dedicated Python backend.
- Next.js app (
web) with dashboard + public API routes. - FastAPI backend (
backend) for heavy analysis workloads. - Async job flow for long-running analysis (
/api/analyze+/api/analyze/status). - Agent endpoints for momentum, scoring, sentiment, fundamentals, and orchestration.
- On-chain agent identity/reputation integration on Aptos testnet.
flowchart LR
U[User / Client] --> V[Vercel: Next.js Web]
V -->|X-Backend-Api-Key| R[Railway: FastAPI Backend]
V --> S[(Supabase)]
R --> S
R --> L[LLM Providers]
R --> M[Market Data Providers]
V --> A[Aptos Testnet / x402]
web/: Next.js 16 app, UI, public API routes, x402 enforcement/proxybackend/: FastAPI service used bywebfor analysis/agent computesrc/: Python analysis engine, agents, storage, orchestration logicmove-agent-registry/: Move contracts for agent registry/reputationdemo-client/: CLI demo for payment flowdocs/deploy-vercel-railway.md: Production deployment runbook
- Node.js 20+
- Python 3.11+
- npm
- Supabase project (URL + keys)
From repo root:
cp .env.example .envFrom web/:
cp .env.example .env.localMinimum required values:
Backend (.env):
BACKEND_API_KEY(optional for localhost-only dev; required for shared/prod environments)SUPABASE_URLSUPABASE_KEY- one of
ZAI_API_KEYorGROQ_API_KEYorGEMINI_API_KEY
Web (web/.env.local):
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYPY_BACKEND_URL=http://localhost:8000PY_BACKEND_API_KEY=<same as BACKEND_API_KEY>(optional when the backend is running on localhost)
# Python deps
pip install -r requirements.txt
# Web deps
cd web
npm installFrom repo root:
uvicorn backend.app:app --host 0.0.0.0 --port 8000 --reloadHealth check:
curl http://localhost:8000/healthIn a second terminal:
cd web
npm run devOpen:
http://localhost:3000http://localhost:3000/x402-demo
curl -s http://localhost:3000/api/health | jq .curl -s http://localhost:3000/api/agent/discover | jq .curl -s -X POST http://localhost:3000/api/analyze \
-H "Content-Type: application/json" \
-d '{"symbol":"AAPL","mode":"intraday"}' | jq .curl -s "http://localhost:3000/api/analyze/status?jobId=<JOB_ID>" | jq .curl -s -X POST http://localhost:3000/api/ask \
-H "Content-Type: application/json" \
-d '{"question":"Summarize AAPL momentum","symbol":"AAPL"}' | jq .Without payment header, paid routes return HTTP 402:
curl -i "http://localhost:3000/api/agent/momentum?symbol=AAPL"For internal/testing bypass flows, configure INTERNAL_API_KEY and pass:
-H "X-Internal-Key: <INTERNAL_API_KEY>"Use split deployment:
webon Vercelbackendon Railway (Dockerfile:Dockerfile.backend)