Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glass-Box Pro — Grounded Crime Intelligence for Karnataka State Police

KSP Datathon 2026 · Challenge 1 · Built entirely on Zoho Catalyst

Live dashboard: https://ksp-datathon-60074710008.development.catalystserverless.in/app/index.html Live API (the "brain"): https://ksp-datathon-60074710008.development.catalystserverless.in/server/query/execute


Why "Glass-Box"?

Most AI crime tools are black boxes — they generate answers you cannot check. Glass-Box Pro does the opposite:

  • Every answer is computed from records, never generated. Ask "who is behind chain snatching in South Bengaluru?" and the answer is assembled from actual case rows, with the case numbers shown as clickable evidence.
  • Every risk score is itemized. An offender scored 90 shows why: each factor, each point, each supporting case.
  • If the data doesn't exist, it says so. A question about a district with no records returns "no records found" — never an invented answer.
  • Every access is audited, every denied view returns a real 403, and what each officer can see is enforced on the server, not just hidden in the browser.
  • Leads, not verdicts. Every analytical claim — a watchlist entry, an MO series, a network link, a flagged account — carries a confidence rating (High/Medium/Low) with the reasons it earned it and what is not yet corroborated. An officer records Confirm / Reject / Needs field verification on each lead (written to the audit log; audit-only in this prototype). A persistent banner reminds every screen: decision support, not legal evidence.

Honest data model — two clearly-labelled layers

Layer What it is Source
Official Crime Review Real, citable crime statistics — e.g. Bengaluru City 2023: 12,627 IPC cases, 28.5% detected; Karnataka 2023: 2,14,234 cognizable cases NCRB / KSP Crime in India 2023
Operational case file ~196 illustrative FIR-level records that power the analytics (real FIR data is confidential and cannot be public). Labelled "illustrative" throughout the UI. NCRB-calibrated synthetic

The org structure is real too: 7 police ranges, 6 commissionerates, 32 districts, 906 stations from public KSP sources. Stations without loaded data honestly show "awaiting SCRB feed" — counts are never fabricated. Plug in the real SCRB feed and every module runs unchanged.

What it does

Module What it answers
State Command Center The SP's cockpit — district threat board, a ranked queue of priority actions (each with case-number evidence and a recommended officer to route it to), and a deployment forecast
Investigate (AI) Plain-language Q&A in English or Kannada, typed or spoken (mic input + read-aloud answers). Grounded — answers cite evidence and carry a "verified" badge
MO Fingerprint Links cases into "same-hand" series by modus-operandi similarity — recovers an entire crew from MO patterns alone
Money Trail Financial-crime engine: detects mule accounts, collectors and controllers using real AML typologies (pass-through, structuring, layering), traces money hop-by-hop to cash-out. Upload a real bank/UPI CSV — analyzed in memory, never stored
Why Here The sociology behind the hotspot — pairs the area's real crime mix with cited Census indicators via criminology theory, plus victim/accused age-and-gender profiles
Hotspot Map Per-incident map with heatmap toggle, month-by-month time slider, click-to-drill
Offender Watchlist Explainable 0–100 risk scores — click a row to see every reason and every supporting case
Network Analysis Force-directed link chart of offenders and associates; highlights hubs and key connectors
Anomaly Radar Automatic deterministic scan for surges, emerging patterns, offender bursts, station backlogs — every flag cites case numbers
Identity Review Same person under two spellings, or two people sharing a name? Candidate pairs with match reasons — never auto-merged, an officer decides
Evidence Fusion / Biometric Connectors Corroboration-before-action layer. Plug-in-ready slots for NAFIS (fingerprint), Aadhaar-hash, CDR/device, CCTV/ANPR, Bank KYC and forensic feeds, with before/after confidence ladders showing how each raises a lead. Not live in the public demo — designed for authorised government integration.
Register FIR Single-case write path — strictly validated, station-bound, flows straight into every analytic. Captures the full CCTNS record: case category (FIR/UDR/Zero-FIR/PAR) with live Heinous/Non-Heinous preview, multiple accused/victims/witnesses per FIR, complainant profile, incident from–to and info-received times
Case File & Investigation Timeline Click any case → the full record: CCTNS CrimeNo, gravity, crime head, applicable law (BNS 2023 + old IPC), people with A1/A2 labels, an investigation timeline (offence → FIR → arrest/surrender → court → final report → status), similar past cases with their outcomes, and a Record Arrest/Surrender action — every event audited
Investigation Dossier (PDF) One click on any case → a court-ready branded dossier: identity band, details, timeline, people, applicable law, outcomes of similar cases — governance-aware (an analyst's dossier is automatically pseudonymised)
Proven Forecast (backtest) The system hides its own most-recent 30 days, re-runs its surge logic on older data only, then scores its predictions against the hidden month — honest precision, hits and misses
Data Import — CCTNS ingestion bridge Upload a raw CCTNS/SCRB export — their exact column names (RegistrationNumber, CrimeGroup, UnitName, …) are recognised with zero renaming, the 18-digit CrimeNo is preserved, and a visible "column recognition" table proves the mapping. Every row passes the same validation rulebook as a hand-registered FIR
Jurisdiction Directory The real KSP structure, browsable, with live case counts

Aligned to the official CCTNS FIR schema

The datathon's dataset is the official Karnataka Police CCTNS FIR ER diagram — and Glass-Box speaks it natively:

  • CrimeNo in the exact 18-digit format: 1-digit category code (FIR=1, UDR=3, Zero FIR=8, PAR=4) + 4-digit district + 4-digit station + year + serial
  • Case category, gravity (Heinous/Non-Heinous), major → minor crime head on every case — and gravity drives the analytics (heinous-linked offenders rank higher; districts with unresolved heinous cases escalate on the threat board)
  • Chargesheet final report A/B/C (A=Chargesheet, B=False Case, C=Undetected) with chargesheet date — and it refines clearance: a filed chargesheet counts as cleared, false cases leave the denominator
  • Complainant details (name, contact, age, gender, caste, religion, occupation) — individually PII-gated, aggregated k-anonymously into the "who is being targeted" community analysis
  • Multiple victims / accused / complainants per FIR, victim M/F/T + VictimPolice flag, accused A1/A2/A3 labels
  • Arrest/Surrender events with court (produced-before), powering the case timeline
  • Act/Section legal layer: every crime head maps to its Bharatiya Nyaya Sanhita 2023 section with the old IPC number and cognizable/bailable flags — always labelled indicative; the IO finalises sections against the FIR

Governance — modelled on the real chain of authority (BNSS 2023)

Six roles mirror actual police ranks, enforced server-side:

Tier Role Sees
1 District Command (SP/DCP) Everything — command center, official stats, full detail
2 Supervisory Officer (DySP) Command board + investigations across their circle
3 Investigating Officer (IO) Case tools — linkage, network, money trail
4 Station Officer (SHO) Their station only + FIR registration
5 Crime Analyst (SCRB) Statewide patterns, names pseudonymised
6 Policymaker (Home Dept) Official aggregates only — no cases, no names

On top of roles, jurisdiction scoping: an SHO sees their station, a DySP their circle, an SP their district — resolved server-side, cached per-scope, impossible to bypass from the browser. PII exposure decreases as you move from investigation to policy (privacy by design).

Kannada + voice ("Sahaaya")

  • Full-interface EN / ಕನ್ನಡ toggle — the whole UI switches language
  • Speak your question (Kannada or English mic input), hear the answer read back
  • The backend itself understands Kannada place names, crime types and question words

Architecture — 100% Zoho Catalyst

Browser (static web client, Catalyst Hosting)
   │
   ▼
query function (Node.js, Catalyst Serverless)   ← the single "brain" endpoint
   ├── Catalyst Data Store  — crimes · persons · case_links · crime_stats ·
   │                          user_roles · mule_accounts · mule_txns · audit_log
   ├── Catalyst Cache       — scope-aware keys, 1h TTL, busted on writes
   ├── Catalyst Hosted Auth — sign-in; real role overrides any demo setting
   └── Catalyst QuickML LLM — optional planner for free-form phrasing (?planner=llm)

All analytics are deterministic and explainable; the LLM (when enabled) only helps interpret phrasing — it never generates facts.

Deploy

catalyst deploy --only functions   # the brain
catalyst deploy --only client      # the dashboard

QuickML credentials (QUICKML_ENDPOINT, QUICKML_REFRESH_TOKEN, QUICKML_CLIENT_ID, QUICKML_CLIENT_SECRET) are set only in the Catalyst console as function environment variables — this repository contains no secrets.

Submission

Sumith — individual entry KSP Datathon 2026, Challenge 1 · Submission deadline 26 July 2026

About

Grounded, explainable crime-intelligence platform for Karnataka State Police — ask in English or Kannada, get answers computed only from real FIR records with cited evidence. Built entirely on Zoho Catalyst. KSP Datathon 2026, Challenge 1.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages