cd backend
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
cp ../.env.example .env # set OPENAI_API_KEY as per the instruction
mkdir -p data/uploads data/chroma
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000API: http://localhost:8000
Docs: http://localhost:8000/docs
cd frontend
npm install
npm run devApp: http://localhost:3000 (proxies /api to backend).
From project root:
cp .env.example .env
# Optionally set OPENAI_API_KEY in .env
docker compose up --build- Backend: http://localhost:8000
- Frontend: http://localhost:3000 (nginx serves the SPA and proxies
/apito backend)
Data is persisted in the rag_data volume.
- Backend: Run the backend container on any host (e.g. Render, Railway, ECS). Set env vars (
OPENAI_API_KEY,UPLOAD_DIR,CHROMA_PERSIST_DIR,SQLITE_PATH). Use a persistent volume or external DB/vector store for production. - Frontend: Build with
npm run buildand serve thedist/folder (e.g. Vercel, S3+CloudFront). SetVITE_API_BASEor equivalent to the backend URL if not using same-origin proxy. - Vector DB: For scale, replace ChromaDB with Pinecone/Weaviate/Qdrant via the existing abstraction in
VectorStoreServiceandEmbeddingService. - Auth: Add API keys or OAuth in frontend and backend; protect
/documents/uploadand/queryendpoints.