Ask anything about your documents in plain English. Upload PDF, DOCX, Excel, CSV, PPT, or images — get answers with page-level citations.
- 🔐 Google OAuth — secure login with your Google account
- 💬 Multiple chat sessions — each chat has its own isolated document context
- 📄 10+ file formats — PDF · DOCX · XLSX · XLS · CSV · PPTX · TXT · MD · PNG · JPG
- 🔍 Page-level citations — every answer cites exact source and page number
- 🤖 Smart fallback — if answer isn't in documents, uses general knowledge (clearly labeled)
- 🔄 Multi-document comparison — upload JD + Resume, ask "does my resume match?"
- 📊 User activity logging — every login, query, and upload tracked per user
- 🗂️ Chat history — persisted across sessions, auto-deleted after 7 days
- 🎨 Light + dark theme — adapts to system preference
app.py # Streamlit UI (thin shell)
│
└── src/
└── rag_docqa/
├── pipeline.py # Orchestrates the complete RAG pipeline (per session)
├── ingestor.py # Parses PDF, DOCX, XLSX, CSV, PPTX, TXT, MD, and images
├── vectorstore.py # ChromaDB vector store (session-isolated collections)
├── llm.py # Groq / Llama 3.3 70B inference with fallback support
├── sessions.py # SQLite-based chat session management
├── auth.py # Google OAuth authentication (Streamlit OIDC)
├── logger.py # User activity and audit logging
└── config.py # Application configuration (Pydantic Settings)
Tech stack:
| Layer | Technology |
|---|---|
| LLM | Groq · LLaMA 3.3 70B Versatile |
| Embeddings | HuggingFace all-MiniLM-L6-v2 (free, local) |
| Vector DB | ChromaDB (per-session isolation) |
| UI | Streamlit |
| Auth | Google OAuth (Streamlit native OIDC) |
| Sessions | SQLite |
| Package manager | uv |
- Python 3.10+
- uv
- Free Groq API key
- Google OAuth credentials (setup guide)
git clone https://github.com/codewithleo1/docurag-intelligence
cd docurag-intelligence
uv synccopy .env.example .envFill in .env:
GROQ_API_KEY=gsk_your_key_here
Create .streamlit/secrets.toml:
[auth]
redirect_uri = "http://localhost:8501/oauth2callback"
cookie_secret = "your_random_secret"
[auth.google]
client_id = "your_client_id"
client_secret = "your_client_secret"
server_metadata_url = "https://accounts.google.com/.well-known/openid-configuration"uv run streamlit run app.py# Run tests
python -m pytest
# Lint
uv run ruff check --fix src/rag_docqa app.py
# Format
uv run ruff format- Fork this repo
- Go to share.streamlit.io
- Connect repo, entry point:
app.py, Python:3.12 - Add secrets in Advanced Settings
- Deploy → get live URL
docurag-intelligence/
├── app.py # Streamlit application entry point
├── pyproject.toml # Project dependencies and uv configuration
├── .env.example # Environment variables template
├── .streamlit/
│ └── config.toml # Streamlit configuration and theme
├── src/
│ └── rag_docqa/
│ ├── auth.py # Google OAuth authentication
│ ├── config.py # Application settings (Pydantic)
│ ├── ingestor.py # Document parsing and chunking
│ ├── llm.py # Groq Llama 3.3 interface and fallback logic
│ ├── logger.py # User activity logging
│ ├── pipeline.py # RAG orchestration pipeline
│ ├── sessions.py # SQLite chat session management
│ └── vectorstore.py # ChromaDB vector store management
├── tests/
│ └── test_ingestor.py # Unit tests for document ingestion
└── .github/
└── workflows/
└── ci.yml # GitHub Actions CI workflow
- No secrets committed to git
- Google OAuth for authentication
- Per-user, per-session document isolation
- Activity logs stored locally only
- ChromaDB collections auto-scoped per session
MIT — feel free to fork and build on this.
Built with ❤️ using Groq, LLaMA 3.3, ChromaDB, and Streamlit