How abdelhafid-cloud/knovera works
Knovera is a multi-organization RAG platform: users access assigned assistants, ask questions, and receive answers grounded in organization knowledge bases. Administrators manage organizations, members, assistants, documents, and platform settings. Document indexing is asynchronous: the API queues uploads for a separate worker, which extracts and chunks content, creates embeddings, and indexes them for retrieval. The README documents the main service boundaries; sampled backend code confirms chat-to-RAG and document-storage behavior. Some worker and UI connections are shown only at the documented architectural level.
Main entry points: process.py Indexing worker · routes Flask API · chat/service.py Chat orchestration · documents/service.py Document management
Components 25
User experience
- Next.js interface
frontend/app - Assistant chat
frontend/app/chat/[assistantId]/page.tsx - Admin workspaces
frontend/app/(dashboard)
Identity and management
- Flask API
backend/app/routes - Authentication
backend/app/services/auth/service.py - Tenant access control
backend/app/utils/security.py - Organizations and roles
backend/app/services/organizations/service.py - Document management
backend/app/services/documents/service.py
Chat and retrieval
- Chat orchestration
backend/app/services/chat/service.py - Query embeddings
backend/app/services/rag/embeddings.py - Vector retrieval
backend/app/services/rag/vectorstore.py - Result reranking
backend/app/services/rag/rerank.py - Answer generation
backend/app/services/rag/llm.py
Document indexing
- Indexing worker
pipeline/app/process.py - Text extraction and OCR
pipeline/app/extract/parsers.py - Text chunking
pipeline/app/chunking.py - Document embeddings
pipeline/app/embeddings.py
Infrastructure
- Redis job queue
- PostgreSQL
- MinIO object storage
- Qdrant vector store
- Cohere
- LLM provider
- Mistral OCR
Other components
- User
Connections 27
- User → Next.js interface: uses
- Next.js interface → Flask API: calls API
- User → Assistant chat: asks question
- Assistant chat → Chat orchestration: submits chat
- Admin workspaces → Flask API: manages platform
- Flask API → Authentication: handles identity
- Flask API → Tenant access control: checks access
- Flask API → Organizations and roles: manages organizations
- Flask API → Document management: manages documents
- Chat orchestration → Query embeddings: embeds query
backend/app/services/chat/service.py - Chat orchestration → Vector retrieval: searches chunks
backend/app/services/chat/service.py - Chat orchestration → Result reranking: reranks results
backend/app/services/chat/service.py - Chat orchestration → Answer generation: generates answer
backend/app/services/chat/service.py - Document management → MinIO object storage: stores uploads
backend/app/services/documents/service.py - Document management → Redis job queue: enqueues indexing
- Redis job queue → Indexing worker: dispatches jobs
- Indexing worker → MinIO object storage: downloads documents
- Indexing worker → Text extraction and OCR: extracts text
- Text extraction and OCR → Mistral OCR: optional OCR
- Indexing worker → Text chunking: chunks text
- Indexing worker → Document embeddings: creates embeddings
- Document embeddings → Cohere: uses embeddings
- Indexing worker → Qdrant vector store: writes vectors
- Vector retrieval → Qdrant vector store: queries vectors
- Answer generation → LLM provider: requests generation
- Flask API → PostgreSQL: stores business data
- Indexing worker → PostgreSQL: updates indexing state