How viday-8/u-fir works
Anveshana is an evidence-first case intelligence workspace for Prohibition & Excise officers. Officers authenticate, upload case files, and review extracted, source-linked facts; they can then search cases, inspect briefs and evidence, review identity links, and manage case work. The product also provides drafting, Copilot, hotspot and network analysis, audit, and governance views. The excerpts show ingestion and several core services; route wiring is supported by the indexed references to the read backend entry point, while some capability details come from the README rather than sampled implementation.
Main entry points: main.py HTTP API · ingest.py Document ingestion · App.tsx Workspace router · api.ts API client
Components 28
Officer workspace
- Workspace router
frontend/src/App.tsx - Navigation shell
frontend/src/Shell.tsx - File intake
frontend/src/Intake.tsx - Case cockpit
frontend/src/Cockpit.tsx - Case search
frontend/src/SearchPage.tsx - Identity review
frontend/src/Relationships.tsx - API client
frontend/src/api.ts
Case evidence
- Document ingestion
backend/app/services/ingest.py - OCR
backend/app/services/ocr.py - Fact extraction
backend/app/services/extract.py - Document studio
backend/app/services/drafts.py - Legal suggestions
backend/app/services/legal.py - Case administration
backend/app/management.py
Case intelligence
- Identity resolution
backend/app/services/resolve.py - Text and name search
backend/app/services/search.py - Case profiles
backend/app/services/profile.py - Brief and timeline
backend/app/services/brief.py - Investigation network
backend/app/services/graph.py - Role-aware Copilot
backend/app/services/copilot.py - Analytics and governance
backend/app/services/analytics.py - Name normalisation
backend/app/services/normalise.py
Access and records
- HTTP API
backend/app/main.py - Audit ledger
backend/app/audit.py - District access control
backend/app/access.py - Authentication
backend/app/security.py - Case records
backend/app/models.py - Database sessions
backend/app/db.py
Other components
- Officer
Connections 40
- Officer → Workspace router: uses
README.md - Workspace router → Navigation shell: frames views
frontend/src/App.tsx - Workspace router → File intake: routes to
frontend/src/App.tsx - Workspace router → Case cockpit: routes to
frontend/src/App.tsx - Workspace router → Case search: routes to
frontend/src/App.tsx - Workspace router → Identity review: routes to
frontend/src/App.tsx - File intake → API client: submits files
frontend/src/Intake.tsx - Case cockpit → API client: loads case
frontend/src/Cockpit.tsx - Case search → API client: queries
frontend/src/SearchPage.tsx - Identity review → API client: reviews links
frontend/src/Relationships.tsx - API client → HTTP API: requests
frontend/src/api.ts - HTTP API → District access control: enforces scope
backend/app/main.py - District access control → Authentication: reads token
backend/app/access.py - HTTP API → Document ingestion: routes ingestion
backend/app/main.py - Document ingestion → OCR: reads scans
backend/app/services/ingest.py - Document ingestion → Fact extraction: processes facts
backend/app/services/ingest.py - Document ingestion → Text and name search: indexes pages
backend/app/services/ingest.py - Document ingestion → Identity resolution: refreshes identities
backend/app/services/ingest.py - Document ingestion → Audit ledger: logs extraction
backend/app/services/ingest.py - HTTP API → Text and name search: routes search
backend/app/main.py - Text and name search → Name normalisation: normalises names
backend/app/services/search.py - HTTP API → Brief and timeline: routes case brief
backend/app/main.py - HTTP API → Case profiles: routes profiles
backend/app/main.py - Case profiles → Name normalisation: normalises fields
backend/app/services/profile.py - HTTP API → Investigation network: routes network
backend/app/main.py - Investigation network → Identity resolution: uses candidates
backend/app/services/graph.py - Investigation network → Case profiles: uses profiles
backend/app/services/graph.py - HTTP API → Role-aware Copilot: routes questions
backend/app/main.py - Role-aware Copilot → Brief and timeline: uses brief
backend/app/services/copilot.py - Role-aware Copilot → Text and name search: retrieves evidence
backend/app/services/copilot.py - Role-aware Copilot → Name normalisation: normalises queries
backend/app/services/copilot.py - HTTP API → Document studio: routes drafting
backend/app/main.py - Document studio → Legal suggestions: gets suggestions
backend/app/services/drafts.py - Document studio → Brief and timeline: uses case brief
backend/app/services/drafts.py - HTTP API → Analytics and governance: routes analytics
backend/app/main.py - HTTP API → Case administration: routes administration
backend/app/main.py - Case administration → Audit ledger: records actions
backend/app/management.py - Document ingestion → Case records: stores documents
backend/app/services/ingest.py - District access control → Case records: scopes cases
backend/app/access.py - Case records → Database sessions: uses sessions
backend/app/models.py