How samosusa/beumer-group-localchat works
BEUMER-GROUP-LocalChat is an offline document assistant: employees manage documents and projects, ask questions, and receive answers grounded in locally stored documents. Its primary workflow runs from the desktop interface through the Python API, where uploads are parsed, chunked, embedded, and indexed; queries retrieve relevant material and invoke the active local language model. Separate capabilities cover conversation history, model selection, evaluation and benchmarking, and the Electron shell. Some subsystem paths and connections are supported by the README rather than inspected source excerpts.
Main entry points: app.py FastAPI application · pipeline.py Ingestion pipeline · rag_service.py Answer orchestration · db.py SQLite database
Components 22
Desktop client
- Desktop interface
apps/renderer/src/features/chat/ChatPage.tsx - Electron shell
apps/desktop/src/main/ipc.ts - HTTP contracts
packages/contracts/src/api.ts
Python API
- FastAPI application
src/app.py - Upload and status API
src/api/ingest.py - Query API
src/api/query.py - Project management
src/api/projects.py - Conversation API
src/api/conversations.py - Health endpoint
apps/health-service/src/routes/health.js
Document ingestion
- Ingestion pipeline
src/ingest/pipeline.py - Document parsing
src/ingest/loader.py - Text chunking
src/ingest/chunker.py - Embedding models
src/ingest/embedder.py - FAISS index
src/ingest/vector_store.py
RAG answering
- Answer orchestration
src/rag_service.py - Document retrieval
src/retriever.py - Local language model
src/llm_adapter.py
Local state and evaluation
- SQLite database
src/db.py - Model management
src/api/models.py - RAG evaluation
src/api/rag_eval.py - Embedding evaluation
src/api/embeddings.py
Other components
- Employee
Connections 30
- Employee → Desktop interface: uses
- Desktop interface → Electron shell: runs in
- Desktop interface → FastAPI application: calls API
- Desktop interface → HTTP contracts: uses contract
- FastAPI application → Upload and status API: registers routes
src/app.py - FastAPI application → Query API: registers routes
src/app.py - FastAPI application → Project management: registers routes
src/app.py - FastAPI application → Conversation API: registers routes
src/app.py - Upload and status API → Ingestion pipeline: queues processing
src/api/ingest.py - Ingestion pipeline → Text chunking: chunks files
src/ingest/pipeline.py - Ingestion pipeline → Embedding models: embeds chunks
src/ingest/pipeline.py - Ingestion pipeline → FAISS index: writes vectors
src/ingest/pipeline.py - Ingestion pipeline → Document parsing: parses documents
- Query API → Answer orchestration: requests answer
src/api/query.py - Answer orchestration → Document retrieval: retrieves context
src/rag_service.py - Answer orchestration → Local language model: generates answer
src/rag_service.py - Document retrieval → Embedding models: embeds query
src/retriever.py - Document retrieval → FAISS index: searches index
src/retriever.py - Query API → Project management: checks project
src/api/query.py - Project management → FAISS index: deletes indexes
src/api/projects.py - Conversation API → Answer orchestration: answers messages
- Conversation API → SQLite database: persists threads
- Upload and status API → SQLite database: tracks jobs
src/api/ingest.py - Project management → SQLite database: stores projects
src/api/projects.py - Model management → Local language model: selects model
- Embedding evaluation → Embedding models: manages models
src/api/embeddings.py - RAG evaluation → Answer orchestration: evaluates answers
src/api/rag_eval.py - RAG evaluation → SQLite database: stores results
src/api/rag_eval.py - Embedding evaluation → SQLite database: stores evaluations
src/api/embeddings.py - Employee → Health endpoint: checks service