How rencelibrando/vectraforge works
VectraForge is a multi-tenant RAG and knowledge-base platform: users manage workspaces and knowledge bases, upload documents, then retrieve grounded answers through chat or retrieval. The frontend uses the Express gateway for workspace and product APIs; the gateway calls the FastAPI RAG service for model tests and RAG operations. Python ingestion parses and chunks documents into vector storage, while retrieval embeds queries, searches and reranks context, and generation builds responses. Connections are grounded in the supplied excerpts, SOURCE INDEX references, or README; broader feature links without direct evidence are omitted.
Main entry points: ingestion_worker.py Ingestion worker · index.js Express gateway · main.py FastAPI service · pgvector_store.py Vector search
Components 24
Workspace console
- Web console
frontend/app/(dashboard)/knowledge-bases/[kbId]/page.tsx - Chat experience
frontend/context/chat-context.tsx - API client
frontend/lib/api-client.ts
Gateway and tenancy
- Workspace APIs
backend-node/src/routes/workspaces.js - Knowledge base APIs
backend-node/src/routes/knowledgeBases.js - Document handling
backend-node/src/services/documentService.js - Model connections
backend-node/src/routes/llmConnections.js - Express gateway
backend-node/index.js - RAG HTTP client
backend-node/src/utils/ragClient.js
RAG service
- FastAPI service
service-rag-python/main.py - RAG contracts
service-rag-python/schemas/contracts.py - Postgres access
service-rag-python/core/db.py
Ingestion and indexing
- Ingestion worker
service-rag-python/services/ingestion_worker.py - Document parsers
service-rag-python/services/adapters/parsers - Chunk strategies
service-rag-python/services/adapters/chunkers - Embedding catalog
service-rag-python/services/adapters/embeddings/registry.py
Retrieval and generation
- Embedding router
service-rag-python/services/adapters/embeddings/router.py - Vector search
service-rag-python/services/adapters/pgvector_store.py - RAG context loader
service-rag-python/services/rag_context_loader.py - Chat pipeline
service-rag-python/services/pipeline/base.py - LLM provider factory
service-rag-python/services/adapters/llm_providers/factory.py - LLM providers
service-rag-python/services/ports/llm.py
Other components
- Workspace user
- Model APIs
Connections 30
- Workspace user → Web console: uses
- Web console → API client: requests
- Chat experience → API client: requests
- API client → Express gateway: calls
- Express gateway → Workspace APIs: routes
backend-node/index.js - Express gateway → Knowledge base APIs: routes
backend-node/index.js - Express gateway → Document handling: routes
- Express gateway → Model connections: routes
backend-node/index.js - Document handling → RAG HTTP client: nudges worker
backend-node/src/services/documentService.js - Model connections → RAG HTTP client: tests models
backend-node/src/routes/llmConnections.js - RAG HTTP client → FastAPI service: HTTP requests
backend-node/src/utils/ragClient.js - FastAPI service → Ingestion worker: starts worker
service-rag-python/main.py - FastAPI service → Embedding catalog: composes
service-rag-python/main.py - Ingestion worker → Document parsers: parses files
service-rag-python/services/ingestion_worker.py - Ingestion worker → Chunk strategies: chunks text
service-rag-python/services/ingestion_worker.py - Ingestion worker → Embedding router: embeds chunks
service-rag-python/services/ingestion_worker.py - Ingestion worker → Vector search: indexes chunks
service-rag-python/services/ingestion_worker.py - Ingestion worker → Postgres access: claims jobs
service-rag-python/services/ingestion_worker.py - Embedding catalog → Postgres access: loads catalog
service-rag-python/services/adapters/embeddings/registry.py - FastAPI service → RAG contracts: validates payloads
- FastAPI service → Vector search: composes
service-rag-python/main.py - Embedding router → Embedding catalog: resolves models
service-rag-python/services/adapters/embeddings/router.py - Embedding router → Model APIs: calls providers
- Vector search → Postgres access: queries vectors
service-rag-python/services/adapters/pgvector_store.py - RAG context loader → Postgres access: loads settings
service-rag-python/services/rag_context_loader.py - RAG context loader → LLM provider factory: creates providers
service-rag-python/services/rag_context_loader.py - LLM provider factory → LLM providers: instantiates
service-rag-python/services/adapters/llm_providers/factory.py - LLM providers → Model APIs: generates
- Chat pipeline → RAG context loader: uses context
service-rag-python/services/rag_context_loader.py - Chat pipeline → Vector search: retrieves context