How mehulmathodia/compliance-sentinel-pro works
Compliance-Sentinel Pro is a local-first contract auditing application. A user uploads a PDF through the Streamlit dashboard; the backend extracts and chunks its text, indexes it, retrieves relevant contract passages for a policy-based audit, and returns findings and evidence. The dashboard can request a PDF report and compare two contract versions. The README documents local Ollama inference and ChromaDB storage; the sampled backend shows their use, but does not establish session isolation. Components share the two source files because the implementation is concentrated there.
Main entry points: app.py Streamlit dashboard · main.py Ingest endpoint
Components 14
User interface
- Streamlit dashboard
frontend/app.py
Document processing
- Ingest endpoint
backend/main.py - PDF extraction
backend/main.py - Text chunking
backend/main.py - Ollama embeddings
- Chroma index
backend/main.py
Audit and reporting
- Audit endpoint
backend/main.py - Passage retrieval
backend/main.py - Ollama language model
- Compare endpoint
backend/main.py - Version contexts
backend/main.py - PDF endpoint
backend/main.py - Report renderer
backend/main.py
Other components
- Contract reviewer
Connections 19
- Contract reviewer → Streamlit dashboard: uses
README.md - Streamlit dashboard → Ingest endpoint: uploads PDF
frontend/app.py - Ingest endpoint → PDF extraction: loads PDF
backend/main.py - Ingest endpoint → Text chunking: splits text
backend/main.py - Ingest endpoint → Chroma index: indexes chunks
backend/main.py - Ingest endpoint → Ollama embeddings: provides embeddings
backend/main.py - Streamlit dashboard → Audit endpoint: submits audit
frontend/app.py - Audit endpoint → Passage retrieval: retrieves passages
backend/main.py - Passage retrieval → Chroma index: searches
backend/main.py - Audit endpoint → Ollama language model: requests findings
backend/main.py - Streamlit dashboard → PDF endpoint: requests report
frontend/app.py - PDF endpoint → Report renderer: renders report
backend/main.py - Streamlit dashboard → Compare endpoint: submits versions
frontend/app.py - Compare endpoint → Version contexts: builds contexts
backend/main.py - Version contexts → PDF extraction: loads PDFs
backend/main.py - Version contexts → Text chunking: splits text
backend/main.py - Version contexts → Ollama embeddings: requests embeddings
backend/main.py - Version contexts → Ollama language model: retrieves passages
backend/main.py - Compare endpoint → Ollama language model: analyzes changes
backend/main.py