0% found this document useful (0 votes)
10 views5 pages

Rajasthan Police Investigation System Blueprint

The document outlines the technical blueprint for the Rajasthan Police Investigation Management & Analytics System, aimed at creating a centralized, bilingual, and analytics-driven platform for real-time case tracking. It details user roles, technology stack, database structure, application workflow, dashboard analytics, AI integration, security architecture, deployment strategy, coding standards, and an implementation roadmap. This comprehensive guide serves as the authoritative reference for the system's development and future audits.

Uploaded by

Neeraj Purohit
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Rajasthan Police Investigation System Blueprint

The document outlines the technical blueprint for the Rajasthan Police Investigation Management & Analytics System, aimed at creating a centralized, bilingual, and analytics-driven platform for real-time case tracking. It details user roles, technology stack, database structure, application workflow, dashboard analytics, AI integration, security architecture, deployment strategy, coding standards, and an implementation roadmap. This comprehensive guide serves as the authoritative reference for the system's development and future audits.

Uploaded by

Neeraj Purohit
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Rajasthan Police Investigation Management &

Analytics System
Complete Technical Blueprint (Single-File Reference)

1. Project Overview
Objective To build a centralized, secure, bilingual, and analytics-driven investigation management system
for Rajasthan Police, enabling real-time case tracking, supervisory oversight, and AI-powered intelligence.

Key Characteristics - Role-based access control - Real-time updates - Bilingual (English / Hindi) - Audit-
compliant and legally defensible - Scalable across all districts

2. User Roles & Permissions

Role Description Permissions

Super Admin System owner Full CRUD on all data, user & district management

District-level
District Handler Create/update cases for assigned district only
operator

Investigating Read-only access to assigned cases (limited updates


Case IO
Officer optional)

Senior Officer SP / Addl. SP Read-only access across all districts

3. Technology Stack

Frontend

• [Link]
• Tailwind CSS / CSS3
• i18next (Bilingual support)
• [Link] / Recharts
• [Link] / [Link] (maps)

Backend

• Firebase Cloud Functions ([Link])

1
• Firebase Authentication
• Google Gemini API (AI summaries & anomaly detection)

Database & Hosting

• Google Firestore (NoSQL, real-time)


• Firebase Hosting

4. Firestore Database Structure

cases (Collection)

firNumber: string
districtName: string
policeStation: string
caseDate: timestamp
complainant: string
accused: array
caseBrief: string
sectionsOfLaw: array
crimeType: string
assignedIO: string
caseStatus: string
otherStatusDetails: string
lastUpdatedAt: timestamp
lastUpdatedBy: string
updateHistory: array

users (Collection)

name: string
email: string
role: string
assignedDistrict: string
designation: string
mobileNumber: string
cugNumber: string

districts (Collection)

districtName: string
totalCases: number

2
pendingCases: number
hierarchy: array

auditLog (Collection)

timestamp: timestamp
userId: string
action: string
details: string

5. Folder & Codebase Structure

rp-ims/
├── frontend/
│ ├── src/
│ │ ├── auth/
│ │ ├── dashboard/
│ │ ├── cases/
│ │ ├── districts/
│ │ ├── officers/
│ │ ├── ai/
│ │ ├── services/
│ │ ├── hooks/
│ │ ├── utils/
│ │ └── styles/
│ └── public/locales/
│ ├── [Link]
│ └── [Link]

├── functions/
│ ├── auth/
│ ├── cases/
│ ├── analytics/
│ ├── ai/
│ ├── audit/
│ └── utils/

├── [Link]
├── [Link]
├── scripts/
└── docs/

3
6. Application Workflow
1. User authenticates via Firebase Auth
2. Role and district resolved from users collection
3. UI routes guarded based on role
4. Case actions trigger Cloud Functions
5. Audit logs written automatically
6. Dashboard updates in real time
7. AI analysis runs on-demand or nightly

7. Dashboard & Analytics

KPIs

• Total cases
• Pending investigations
• Chargesheeted cases
• Cases registered this month

Visualizations

• Crime type distribution (donut)


• Monthly trends (line chart)
• District heatmap (Rajasthan)
• Recent activity feed

8. AI Integration

AI Case Summary

• Bilingual (English + Hindi)


• Status analysis
• Delay & anomaly detection

Example Prompt (Internal)

"Summarize the following police case in English and Hindi. Highlight delays or risks. Case data: {JSON}"

9. Security Architecture
• Firestore security rules enforce role & district access
• Audit log is append-only
• No delete access for cases (logical closure only)

4
• All sensitive logic handled via Cloud Functions

10. Deployment Strategy


1. Dev & Prod environments
2. Firebase Hosting
3. Cloud Functions CI/CD
4. Data backup & recovery scripts

11. Coding Standards


• camelCase (Firestore fields)
• PascalCase (React components)
• CONSTANT_CASE (Enums)
• No hardcoded strings (i18n only)

12. Implementation Roadmap


1. Schema & security rules
2. Auth + roles
3. Case CRUD
4. Dashboard
5. AI integration
6. Hardening & training

This document is intended to serve as the single authoritative technical reference for development,
review, and future audits.

Common questions

Powered by AI

The role-based access model enhances auditing and oversight by providing tailored permissions that align with specific responsibilities. For example, Super Admins can oversee all activities with full access, whereas Investigating Officers have limited, read-only permissions, minimizing unauthorized data alteration . The append-only audit logs ensure that every action, regardless of the user role, is recorded and cannot be deleted, thus maintaining a comprehensive oversight of all system interactions .

Firestore's security architecture plays a critical role in adhering to legal requirements by implementing strict data access rules that prevent unauthorized case manipulation and ensure data integrity . The system is audit-compliant and legally defensible, with audit logs providing a non-deletable record of all actions, thereby supporting forensic investigations and legal scrutiny . The logical closure of cases without delete access ensures that historical data remains intact .

The deployment strategy involves distinct development (Dev) and production (Prod) environments hosted on Firebase, with Cloud Functions enabling scalable backend operations . Continuous Integration/Continuous Deployment (CI/CD) processes are used to automate deployments, enhancing reliability by detecting and rectifying deployment errors promptly . Data backup and recovery scripts ensure data integrity and availability in case of system failures .

The system enforces access control using Firestore security rules that manage role and district-specific access . This involves role-based access control, where different users have specific permissions depending on their roles: Super Admins have full access, District Handlers have case management permissions at the district level, Investigating Officers primarily have read-only access, and Senior Officers have read-only access across districts . Additionally, audit logs are append-only, meaning no data can be deleted, ensuring all actions are traceable .

AI capabilities in the system are primarily provided through the Google Gemini API, which powers AI summaries and anomaly detection . The AI-driven analytics include generating bilingual case summaries, analyzing the status of cases, and detecting delays or anomalies, which help in proactive decision-making and reducing potential risks . These AI features are integrated within the dashboard and run on-demand or during scheduled nightly operations .

The audit log functionality contributes to transparency and accountability by maintaining a comprehensive, append-only record of all transactions and actions within the system . This ensures full event traceability, prevents unauthorized data deletion, and upholds a transparent environment where all users' actions can be reviewed and scrutinized, thereby fostering accountability in police operations .

The system employs visual analytics to aid decision-making by incorporating various data visualizations such as crime type distribution (donut charts), monthly trends (line charts), and district heatmaps that provide a spatial distribution of crime across Rajasthan . These visual tools enhance comprehension of complex data patterns, allowing for informed decision-making at multiple administrative levels .

The system uses Firestore's NoSQL real-time database capabilities to ensure data consistency and integrity. It supports real-time updates, allowing dashboard changes to reflect immediately upon a change in data . Role-based permissions ensure only authorized changes occur, and audit logs provide a history of actions, preventing unauthorized alterations .

The system supports bilingual operations using the i18next library for frontend translation . Language options for users are managed through JSON files (en.json and hi.json) stored in the public/locales directory, ensuring that both English and Hindi interfaces deliver a consistent user experience . Additionally, AI-powered case summaries are generated in both languages, further supporting bilingual operations .

Firestore is structured into collections that are critical for case management. The 'cases' collection includes essential fields like firNumber, districtName, policeStation, complainant, accused, caseBrief, sectionsOfLaw, crimeType, and caseStatus, which collectively provide a comprehensive view of each case . The 'updateHistory' array within cases ensures trackability of modifications .

You might also like