A production path from RAG demo to multi-tenant SaaS
This demo runs entirely in the browser. The production build keeps the same answer and citation contract, then adds real embeddings, a Python API, tenant isolation and evals.
6 weeks
MVP timeline
$6.4k–9.4k
MVP estimate
4 LLM steps
Answer path
SOC 2 ready
Security
Reference architecture
Stateless API, queue-based ingestion and a versioned retrieval contract.
Client
Next.js 14 · React · TypeScript · Tailwind
API
FastAPI (Python) · Pydantic · Node worker
Orchestration
LangGraph agent · retrieval · rerank · citations
Data layer
Postgres 16 · pgvector · Redis · S3
Model providers
OpenAI · Anthropic · fallback routing
MVP delivery plan
Six weekly milestones. Each week ends with a deployed, testable increment.
Cost estimate
Estimate assumes 1,000 queries per day and a single-region AWS deployment.
Phase 2 scope
- Stripe billing and plan limits
- Multi-tenant roles and SSO
- Eval dashboard and regression gates
- Observability and alerting
- Queue-based ingestion at scale
- SOC 2 readiness evidence
How I use AI tools
Claude Code
Scaffolding, tests, migrations and repetitive refactors. Runs the full test suite before every PR.
Cursor
Faster UI iteration and safe renames across the workspace. Review each diff before commit.
Codex
Parallel spikes such as eval harnesses and provider adapters, kept on short-lived branches.
This demo was built with the same workflow.
Answer contract
Shared by demo and productionGrounded
Every answer sentence carries at least one chunk citation. No citation, no claim.
Refuses low confidence
A top rerank score below 0.08 returns a refusal instead of a guess.
Measured
Tokens, cost, latency and retrieval scores are logged for every request.