FastAPI · RAG · Multimodal AI
🎥 Demo 1 · 🎥 Demo 2 · 📝 Kaggle Writeup · 🔗 DOI
|
🏠 Landing Page · Watch Demo |
💬 Chat Interface · Watch Demo |
The core API for CorpusAI — an AI-powered document intelligence platform. It handles ingestion, vector search, authentication, and chat so users can upload documents and get grounded, multimodal answers.
Works with the CorpusAI Frontend for the full experience.
| Repo | Description |
|---|---|
| CorpusAI Frontend | React client — chat UI, document management, Creative Space |
| CorpusAI Backend (this repo) | FastAPI API — RAG pipeline, auth, storage, LLM routing |
- 🎛️ Dynamic Chat Modes — Hybrid · AI-Only · Document-Only
- 📚 Advanced RAG — Intent routing with vector search & hierarchical summaries
- ⚡ Summary Caching — Instant repeat retrievals
- 👁️ Vision & Multimodal — Images from docs passed to vision LLMs
- 🌐 Web Search — Real-time context augmentation
- 🤖 Multi-LLM — Groq · GitHub Models · Azure AI · Hugging Face
- 🎨 Creative Space — AI text & image generation
- 📄 Multi-format Docs — PDF · DOCX · PPTX · OCR
- 🔐 Secure Auth — Appwrite + JWT · OAuth (Google · GitHub)
- 🚦 Rate Limiting — Redis-backed protection
- ⏰ Background Tasks — APScheduler
| ⚡ | FastAPI · Uvicorn · Pydantic |
| 🐘 | PostgreSQL · SQLAlchemy |
| 🔍 | Qdrant — vector search |
| 🚀 | Redis — cache & rate limits |
| 🔐 | Appwrite · Python-JOSE |
| 🤖 | Groq · Azure AI · Hugging Face |
| 📄 | PyPDF · python-docx · python-pptx · Tesseract |
- Python 3.11+
- PostgreSQL database
- Qdrant Cloud (or local instance)
- Redis instance
- Appwrite project with storage bucket
- API keys for at least one LLM provider (Groq recommended)
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS / Linux
pip install -r requirements.txtCreate a .env file in the project root with your credentials, then start the server:
uvicorn api.main:app --reload🌐 API → http://localhost:8000
📖 Docs → /docs · /redoc
Run the frontend on http://localhost:8080 and set FRONTEND_URL=http://localhost:8080 in your .env.
| Variable | Description |
|---|---|
ENV |
development or production |
DATABASE_* |
PostgreSQL connection (host, port, name, user, password) |
QDRANT_URL · QDRANT_API_KEY |
Qdrant vector store |
REDIS_* |
Redis host, port, credentials |
APPWRITE_* |
Appwrite endpoint, project, API key, bucket |
GROQ_API_KEY |
Groq LLM provider |
JWT_SECRET |
Secret for access & refresh tokens |
FRONTEND_URL · BACKEND_URL |
URLs for CORS and OAuth redirects |
GOOGLE_* · GITHUB_* |
OAuth client credentials (optional) |
Never commit .env files or API keys to version control.
If you find this project useful or interesting, please consider giving it a ⭐ on GitHub! Your support helps make the project more visible and encourages further development.
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Copyright © 2026 Ameya Sanjay Chopade · See LICENSE for details.