A RAG (Retrieval-Augmented Generation) demo built with FastAPI + React. Ask questions about pre-loaded documents, get answers with source citations.
| Link | URL |
|---|---|
| Live demo | https://trydoq.com |
| API docs | https://trydoq.com/api/docs |
| Production branch | main |
| Staging branch | staging |
No account required. Guest mode with daily rate limiting.
| Layer | Technology |
|---|---|
| Frontend | React + TypeScript + Vite |
| Backend | FastAPI (Python 3.11) |
| Vector Search | Qdrant Cloud |
| LLM & Embeddings | Alibaba DashScope (Qwen / text-embedding-v3) |
| Rate Limiting | Redis |
| Container | Docker Compose |
- Docker & Docker Compose
- Node.js 18+
- Python 3.11 (for indexing documents)
Copy and fill in your API keys:
cd backend
cp .env.example .env
# Edit .env: fill in DASHSCOPE_API_KEY, QDRANT_URL, QDRANT_API_KEYPut your documents in backend/docs/, then run:
cd backend
python3.11 -m venv venv
source venv/bin/activate
pip install -r app/requirements.txt
python index_documents.pySupported formats: PDF, DOCX, TXT, XLSX, Markdown
cd backend
docker compose up --buildcd frontend
npm install
npm run dev| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| API docs | http://localhost:8000/docs |
User question
→ FastAPI checks Redis rate limit (20 msg/day per guest)
→ Stream an interactive RAG trace to the UI
→ Generate embedding (DashScope text-embedding-v3)
→ Search Qdrant for top-5 relevant chunks
→ Show matches, scores, and ranking details
→ Feed ranked chunks + question to Qwen-72B
→ Stream answer back with source citations
The demo shows each query as an inspectable flow: query preparation, embedding, vector search, ranking, prompt context, and final LLM answer.
- Live site: https://trydoq.com
- Server: Oracle Cloud Always Free (4 OCPU, 24GB RAM)
- Vector DB: Qdrant Cloud free tier
- Domain + CDN: Cloudflare
Production deployment files are included:
| File | Purpose |
|---|---|
docker-compose.prod.yml |
Runs API, Redis, frontend, and Caddy |
.env.production.example |
Domain and frontend build variables |
backend/.env.example |
Backend secrets and service variables |
deploy/Caddyfile |
HTTPS + /api reverse proxy |
frontend/Dockerfile |
Builds and serves the Vite app |
Quick start on the server:
cp .env.production.example .env
cp backend/.env.example backend/.env
# Edit .env and backend/.env
docker compose -f docker-compose.prod.yml --env-file .env up -d --buildFull instructions: deploy/README.md