A citation-grounded investigative system that converts raw evidence into actionable intelligence with complete source attribution. Built for detectives, analysts, and prosecutors who need court-ready evidence bundles.
- Multi-source Ingestion: CDR, ALPR, POS, CAD, Sensor, Narrative reports
- SHA-256 Hashing: Every artifact tracked with cryptographic verification
- Citation Tracking: Sentence-level source attribution for all extracted data
- Entity Extraction: Automatic extraction of phones, plates, names, devices, locations
- Event Timeline: Chronological ordering with clock drift correction and contradiction detection
- Relationship Linking:
- Co-presence detection (same location, same time)
- Co-travel patterns (consecutive tower connections)
- Rendezvous identification (repeated meetings)
- Fraud chains (suspicious transaction sequences)
- Crime Scene Mapping: Interactive map with movement routes and polylines
- Entity Graph: Network visualization with typed relationships
- Timeline Scrubber: Temporal analysis with citation popovers
- Lead Scoring: AI-powered ranking of investigative leads
- Court-ready ZIP bundles with:
- Original artifacts
- SHA-256 manifest
- Timeline JSON
- Graph slice
- One-page summary
- Verification hashes
Backend: FastAPI + SQLite + Neo4j + Weaviate
Frontend: React + TypeScript + Tailwind CSS (Glassmorphic UI)
AI Stack: LlamaIndex + OpenAI/Gemini/Friendli AI
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Artifacts βββββββΆβ Services βββββββΆβ Output β
β (Raw) β β (Process) β β (Intel) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β β β
ββ CDR ββ Ingest ββ Timeline
ββ ALPR ββ Extract Entities ββ Graph
ββ POS ββ Eventize ββ Leads
ββ CAD ββ Link (Rules) ββ Evidence Pack
ββ Sensor ββ Score Leads
ββ Narratives
- Python 3.9+
- Node.js 18+
- Neo4j 5.x
- Weaviate 1.x (or Docker)
git clone https://github.com/yourusername/sherlock-ai.git
cd sherlock-aicd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create .env file
cp .env.example .env
# Edit .env with your API keys and database credentials# Using Docker Compose (recommended)
docker-compose up -d neo4j weaviate
# Or start services manually:
# - Neo4j: http://localhost:7474
# - Weaviate: http://localhost:8080# Run demo with synthetic data
python demo/run_demo.py
# Or start API server
uvicorn app.main:app --reload --port 8000cd ../frontend
npm install
npm run devVisit http://localhost:5173 to see the dashboard!
The demo script generates a complete investigation with:
- 2 suspects with phone records (10 CDR entries)
- 2 vehicles tracked via ALPR (10 location hits)
- POS theft sequence (DoorOpen β Void transaction)
- 3 officer narratives with embedded contradictions
- CAD dispatch events
β 25+ artifacts ingested
β 20+ entities extracted
β 30+ events created
β 10-15 relationships found
β 2 contradictions detected
β 3+ high-confidence leads generated
β Evidence pack with SHA-256 verification
cd backend
python demo/run_demo.py- β Least privilege access control
- β Complete audit logging
- β SHA-256 verification on all artifacts
- β PII redaction with role-based reveal
- β Immutable evidence packs
- β No public internet access (configurable)
- Every entity must have β₯1 citation
- Every event must have β₯1 citation
- Every edge must have β₯2 citations
- Citations include: artifact_id, source_type, text span
POST /api/artifacts/ingest-json
{
"artifact_type": "CDR",
"raw_payload": "{...}",
"case_id": "CASE_001"
}POST /api/cases/{case_id}/analyze
# Returns: edge counts and top leadsGET /api/cases/{case_id}/timeline
GET /api/cases/{case_id}/routes # GeoJSONPOST /api/cases/{case_id}/export
GET /api/packs/{pack_id}/download
GET /api/packs/{pack_id}/verify- GlassCard: Frosted glass containers with backdrop blur
- GlassButton: Interactive buttons with hover effects
- GlassPanel: Titled panels for structured content
- GlassModal: Overlay modals with blur
- Background:
#0a0e27(dark navy) - Accent Cyan:
#00d9ff - Accent Purple:
#a855f7 - Glass:
rgba(255, 255, 255, 0.1)withbackdrop-blur
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# Integration test (full pipeline)
python backend/demo/run_demo.pyThe system tracks:
- Citation Coverage: % of entities/events with citations
- Edge Quality: Average confidence scores
- Contradiction Rate: Temporal impossibilities detected
- Hash Verification: 100% pass rate on evidence packs
- Processing Time: Ingest β Lead generation cycle
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 for Python
- Use ESLint/Prettier for TypeScript
- Write tests for new features
- Document API changes
- Maintain citation requirements
MIT License - see LICENSE for details
- FastAPI for the excellent web framework
- Neo4j for graph database capabilities
- React-Leaflet for mapping
- Cytoscape.js for graph visualization
- LlamaIndex for document processing
- Documentation: docs/
- Issues: GitHub Issues
- Email: support@sherlock-ai.example
Built with β€οΈ for law enforcement and investigative professionals