· Research AI
Shipping Research AI: Vercel for UI, Fly for Worker + SQLite
UI는 한국어입니다. 글 본문은 아직 영어 또는 중국어만 있습니다.
Research AI reuses the Invest AI deployment shape:
| Layer | Where |
|---|---|
| Next.js | Vercel — repo root, auto-deploy on main |
| FastAPI + worker | Fly.io — xingai-research-ai-api |
| Cache + rate limits | Fly volume researchai_data → /data |
One Docker image starts both processes via scripts/fly-start.sh. GitHub Actions deploys when backend paths change.
Wiring the frontend
Vercel sets:
RESEARCH_API_URL=<RESEARCH_API_BASE_URL>
NEXT_PUBLIC_SITE_URL=https://research.xingai.app
Next.js /api/research* routes proxy to Fly. Trending chips hit /api/trending with timeout fallback to static seeds.
What we skipped
- Separate worker machine — colocated for MVP cost
- Redis — SQLite KV is enough at current scale (ADR-003)
Ops checklist
- Fly secrets:
OPENAI_API_KEY - Health:
/api/v2/health - Volume attached before first deploy
Same playbook as production runbook for Invest AI, different app name and cache keys.
Further reading: xingai-research-ai/docs/deploy/fly-io.md