
Live site: mandamus.pro - demo and case study live now
A local-first, AI-assisted evidence organization and retrieval architecture for document-heavy legal, administrative, and advocacy matters.
This system turns scattered PDFs, emails, screenshots, ledgers, notices, records, and notes into a structured matter workspace with document inventory, SHA-256 fingerprinting, searchable extracted text, timeline mapping, classification states, review queues, and AI-accessible retrieval through MCP/API layers.
The system is designed for solo attorneys, small firms, legal-adjacent consultants, self-advocates, and document-heavy operators who need faster matter review without losing source control.
See it in action: Case Study Zero - live matter deployment, real contradictions surfaced →
Founding Operator Program - 5–8 deployments, done-for-you, founding rate →
Start here: View the sample matter transformation →
This repository documents the architecture and reusable deployment pattern. It should not contain real client evidence, private keys, protected health information, privileged legal material, or production credentials. See SECURITY.md before pushing any content.
Document-heavy matters often fail at the information architecture layer before they fail at the legal or strategic layer.
Common failure points:
- Files scattered across downloads, email, cloud folders, screenshots, and PDFs
- No canonical source of truth
- Duplicate or superseded records mixed with active documents
- Critical dates buried inside long records
- No reliable exhibit index
- No clear distinction between verified facts, claims, assumptions, and missing evidence
- AI tools unable to reason reliably because the underlying file system is chaotic
This project solves that by creating an AI-operable evidence command layer.
| Output | Description |
|---|---|
| Document Inventory | Every file fingerprinted, named, and tracked with SHA-256 |
| Classification States | Canonical, copy-exact, superseded - nothing ambiguous |
| Full-Text Search | Sub-second retrieval across all extracted text via FTS5 |
| Timeline Extraction | Key dates and actors surfaced from document content |
| Contradiction Map | Conflicting facts across documents flagged for review |
| Exhibit Index | Attorney-ready, numbered, sourced |
| AI Query Layer | Claude and ChatGPT can query the vault directly |
| Chain of Custody | Hash checkpoints, audit log, tamper detection |
┌─────────────────────────────────────────────────────────┐
│ ACCESS LAYER │
│ Claude (MCP) · ChatGPT (FastAPI/Tunnel) │
│ Local search tools · CSV export │
├─────────────────────────────────────────────────────────┤
│ INDEX LAYER │
│ SQLite FTS5 · Chunked text · Metadata │
│ Semantic memory (Mem/Hindsight-style) │
├─────────────────────────────────────────────────────────┤
│ BLOB STORAGE LAYER │
│ Supabase private buckets (optional/remote) │
│ Verified PDFs · Split parts · Backup │
├─────────────────────────────────────────────────────────┤
│ PRIMARY STORAGE LAYER │
│ Local filesystem + SQLite (canonical source) │
│ SHA-256 fingerprinting · Vault_watch.py │
└─────────────────────────────────────────────────────────┘
Full architecture detail: ARCHITECTURE.md
| File / Folder | Purpose | Audience |
|---|---|---|
README.md |
System overview and quick orientation | All |
ARCHITECTURE.md |
Full four-layer technical architecture | Technical / Contractor |
SETUP.md |
Environment setup, credentials, dependencies | Technical |
OPERATIONS.md |
Day-to-day intake and maintenance workflow | Operator |
SCHEMA.md |
Database tables, fields, classification states | Technical |
SECURITY.md |
What never goes in Git. Full stop. | All |
CLIENT-DEPLOYMENT.md |
How to deploy this for an attorney or client | Service delivery |
CASE-STUDY.md |
Sanitized real-world deployment example | Attorneys / Prospects |
scripts/ |
Python and Node scripts for intake, search, watch | Technical |
mcp-server/ |
Claude Desktop MCP server | Technical |
docs/ |
Workflow guides, naming conventions, NDA template | Operator / Attorney |
examples/demo-matter/ |
Full synthetic matter transformation - start here | Attorneys / Prospects |
examples/ |
Sample CSV outputs and report format | Prospects / Attorneys |
.env.example |
Credential template (no real values) | Technical |
.gitignore |
Blocks secrets, databases, evidence files from Git | Technical |
This architecture was built and deployed under live litigation conditions for a multi-month housing discrimination and unlawful detainer matter in Los Angeles Superior Court.
At peak the system managed:
- 199 verified documents with intact SHA-256 chain of custody
- 1,181 indexed and searchable text chunks
- Live AI query access through Claude Desktop MCP and a ChatGPT Custom GPT
- Real-time change detection via
vault_watch.py - A court-ready exhibit index with classification states and source tracing
The opposing party dismissed the case without prejudice. The system was the infrastructure that made self-representation viable.
See CASE-STUDY.md for a sanitized walkthrough.
This system is available as a done-for-you build for attorneys, legal consultants, and document-heavy operators.
See CLIENT-DEPLOYMENT.md for service scope, delivery model, and engagement terms.