Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel AI Logo

Sentinel AI

National Cyber Fusion & Incident Response OS

FastAPI React MongoDB Redis Python TypeScript

An enterprise-grade, high-fidelity security platform designed to protect citizens from financial scams and empower law enforcement agencies (LEA) with precision intelligence and automated case correlation.


🏛 System Architecture

The platform operates on a decoupled, event-driven architecture designed to process heavy analytical feeds and OCR telemetry asynchronously without blocking user interaction.

graph TD
    Citizen[Citizen / Report Portal] -->|Ingest Evidence| API[FastAPI Gateway]
    Officer[LEA Command Centre] -->|Query Graph & Alerts| API
    
    API -->|Save processing state| DB[(MongoDB Atlas)]
    API -->|Dispatch Task| Queue[Redis Broker]
    
    Queue -->|Process Asynchronously| Worker[Celery Analytics Worker]
    Worker -->|OCR / Whisper Transcription| Extractor[spaCy / Gemini Entities]
    Worker -->|Find Syndicate Matches| Neo4j[(Neo4j Graph Database)]
    Worker -->|Trigger Matches| AlertSystem[Real-time Alert Hub]
Loading

Core Flow

  1. Evidence Ingestion: Citizens upload threat reports (screenshots, chats, call recordings) and LEA teams import feeds.
  2. Asynchronous Processing (Celery & Redis): FastAPI registers the report immediately in MongoDB with a PROCESSING state and delegates extraction and correlation tasks to a Celery worker.
  3. Entity Extraction (AI OCR/NLP): The worker uses OCR on screenshots or processes transcripts to extract key identifiers (phone numbers, UPI handles, merchant details).
  4. Relational Syndicate Matching: Extracted entities are cross-referenced in a Neo4j cluster to detect links with known fraud syndicates.
  5. Real-time Alert Dispatch: If a correlation is detected, the system generates a priority alert, dispatching it directly to the LEA Command Center and flagging linked reports.

🚀 Key Modules & Features

1. Citizen Portal

  • AI Scam Checker: Interactive chatbot leveraging NLP to analyze suspicious emails, phone calls, and communication text.
  • Counterfeit Banknote Verification Scanner: A live computer vision scanner checking aspect ratio parameters (against target RBI dimensions), color spectrum profile (HSV ranges), security thread contrast (vertical Sobel analysis), and watermark textures (standard deviation variance) to verify note authenticity.
  • Verified Entity Lookup: Instant lookup for UPI handles, mobile numbers, and bank accounts against a national database of cleared and flagged coordinates.
  • Cases Tracker: Real-time status update for submitted cases.

2. Law Enforcement Command Center

  • Real-time Alert Feed: Direct alert routing for high-confidence threats (e.g. Digital Arrest campaigns).
  • Active Case Manager: Interface to assign cases, review transcripts, track frozen funds, and document analyst logs.
  • Interactive Fraud Graph: Visualized relational web (built using React Flow) showing linked phone numbers, bank accounts, and cluster communities.
  • LEA Currency Scan Verification: Administrative portal for checking suspect currency notes.

🛠 Tech Stack

  • Frontend: React (TSX), Tailwind CSS / Custom Glassmorphic CSS variables, Vite, React Flow, Framer Motion, Lucide Icons.
  • Backend: FastAPI, Beanie ODM (MongoDB), Uvicorn, Python 3.13+.
  • Workers & Databases: Celery, Redis, MongoDB Atlas, OpenCV, Pillow.

📦 Local Installation & Setup

Prerequisites

  • Node.js (v18+)
  • Python (v3.10+)

1. Setup Backend

  1. Navigate to the backend directory:
    cd backend
  2. Initialize virtual environment:
    python -m venv .venv
  3. Activate virtual environment:
    • Windows: .venv\Scripts\activate
    • macOS/Linux: source .venv/bin/activate
  4. Install dependencies:
    pip install -r requirements.txt
  5. Configure environment variables by copying .env.example to a new .env file in the backend folder and filling in your local configuration details.
  6. Run the FastAPI development server:
    python run.py
    The server runs at http://localhost:8000. Interactive Swagger documentation is available at http://localhost:8000/docs.

2. Setup Frontend

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Run the Vite development server:
    npm run dev
    The client dashboard loads at http://localhost:5173.

3. Run Celery Worker (Optional)

Ensure a Redis broker is running on your machine, then launch the worker process:

cd backend
celery -A app.worker.celery_app worker --loglevel=info

(Note: If the MongoDB database or Redis broker is offline, the backend automatically operates on simulated fallback mode to keep all features fully functional for local developer demos.)


🔒 Security & Compliance

  • Audit Trail Ledger: Immutable logging for LEA actions.
  • Rule 4 Standard Schema: All API endpoints return a standardized, uniform JSON structure:
    {
      "success": true,
      "message": "Action completed successfully",
      "data": {}
    }

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages