How jashankish/local-legal-ai works
Local Legal AI is a self-hosted legal-document assistant. Lawyers and staff use the Streamlit UI to authenticate, upload legal files, and ask questions; the FastAPI service processes uploads for indexing and handles queries that retrieve document context for an answer. The README also describes document management, analytics, audit/access controls, and n8n automation. The query pipeline and vector-store interactions are shown where documented or sampled; exact wiring between some backend modules and automation flows is not established by the excerpts.
Main entry points: app.py FastAPI service · rag_pipeline.py RAG pipeline · simple_embedder.py Document embedder · chromadb_setup.py Vector store manager
Components 18
User experience
- Streamlit UI
frontend/streamlit_app.py
API and access
- FastAPI service
backend/app.py - JWT access control
backend/auth.py - User records
data/users.json - Usage analytics
backend/analytics.py
Document and search
- Legal file processor
rag/enhanced_document_processor.py - Document embedder
rag/simple_embedder.py - Query embedder
backend/embedder.py - RAG pipeline
rag/rag_pipeline.py - Vector store manager
vector_store/chromadb_setup.py - ChromaDB collection
data/chroma_db
Inference
- vLLM inference
model/vllm_launcher.sh - Private GPU host
Audit and automation
- Audit logging
security/audit_log.py - Workflow automation
workflows/n8n/workflows.json
Other components
- Lawyer or staff
- File drop
- Slack alerts
Connections 17
- Lawyer or staff → Streamlit UI: asks or uploads
- Streamlit UI → FastAPI service: sends requests
- FastAPI service → JWT access control: checks identity
- JWT access control → User records: reads and writes
- FastAPI service → Legal file processor: processes uploads
- Legal file processor → Document embedder: provides text
- FastAPI service → Document embedder: requests chunks
- Document embedder → Vector store manager: stores chunks
- FastAPI service → RAG pipeline: handles questions
- RAG pipeline → Vector store manager: searches documents
- Vector store manager → ChromaDB collection: reads and writes
- RAG pipeline → vLLM inference: requests completion
- vLLM inference → Private GPU host: runs inference
- FastAPI service → Usage analytics: serves reports
- FastAPI service → Audit logging: records activity
- File drop → Workflow automation: triggers flow
- Workflow automation → Slack alerts: sends alerts