How hetpatel112390/docsentry works
DocSentry is a document-fraud intelligence application: an operator submits an identity document, the API scans it, looks up similar cases, stores the scan, and returns a verdict and risk score. A separate report endpoint asks the reflection agent for fraud-ring groupings. The Streamlit interface exposes scanning and ring-map views; synthetic-document generation and seeding initialize example cases. The sampled scanner shows DPI, compression-artifact, and metadata checks. README claims about 32×32 cloning and Groq-backed reflection are not confirmed by the sampled implementation, which uses a mock in-memory Hindsight client.
Main entry points: main.py DocSentry API · hindsight_client.py Hindsight client · seed_data.py Memory seeding · ingest_agent.py Case ingestion
Components 14
User interface
- Streamlit app
ui/app.py - Scan page
ui/pages/1_Scan_Document.py - Fraud-ring map
ui/pages/3_Fraud_Ring_Map.py
API workflow
- DocSentry API
api/main.py - Scan response
api/models.py
Forensic analysis
- Document scanner
agents/scanner_agent.py - Prior-case recall
agents/recall_agent.py - Case ingestion
agents/ingest_agent.py - Fraud-ring reflection
agents/reflect_agent.py - Synthetic documents
data/generate_docs.py - Memory seeding
data/seed_data.py
Case memory
- Hindsight client
memory/hindsight_client.py - In-memory records
memory/hindsight_client.py
Other components
- Operator
Connections 16
- Operator → Streamlit app: uses
ui/app.py - Operator → Scan page: submits document
ui/pages/1_Scan_Document.py - Scan page → DocSentry API: posts scan
ui/pages/1_Scan_Document.py - DocSentry API → Document scanner: scans document
api/main.py - DocSentry API → Prior-case recall: finds prior cases
api/main.py - DocSentry API → Case ingestion: retains case
api/main.py - DocSentry API → Scan response: returns response
api/main.py - DocSentry API → Fraud-ring reflection: requests rings
api/main.py - Case ingestion → Hindsight client: retains record
agents/ingest_agent.py - Prior-case recall → Hindsight client: recalls records
agents/recall_agent.py - Fraud-ring reflection → Hindsight client: reflects records
agents/reflect_agent.py - Hindsight client → In-memory records: writes and reads
memory/hindsight_client.py - Memory seeding → Synthetic documents: generates samples
data/seed_data.py - Memory seeding → Document scanner: scans samples
data/seed_data.py - Memory seeding → Case ingestion: seeds cases
data/seed_data.py - Fraud-ring map → DocSentry API: views ring report