Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SignalOS – AI Message Intelligence

An AI-powered WhatsApp Notification Router that intelligently classifies incoming messages as Notify, Digest, or Mute using a hybrid AI architecture powered by Google Gemini, rule-based reasoning, and personalized scoring.

Python TypeScript React Gemini License


πŸ“– Overview

SignalOS is an AI-powered notification routing system that reduces notification overload by intelligently deciding whether an incoming WhatsApp message should:

  • πŸ”” Notify immediately
  • πŸ“‹ Be included in a digest
  • πŸ”• Be muted

The system combines deterministic rules, contextual AI reasoning, historical interactions, and personalized scoring to make reliable routing decisions.


✨ Features

  • πŸ€– Google Gemini AI Integration
  • 🧠 Hybrid AI + Rule Engine
  • πŸ‘€ Personalized Notification Routing
  • πŸ’¬ Text Message Analysis
  • πŸ–ΌοΈ Image & Screenshot Support
  • 🎀 Voice Note Support
  • πŸ“Š Analytics Dashboard
  • πŸ“± Fully Responsive UI
  • πŸ“ˆ Live Routing Simulation
  • πŸ“‚ CSV Export
  • πŸ”’ Secure API Key Management
  • ⚑ Fast & Lightweight Architecture

πŸ— Project Structure

.
β”œβ”€β”€ ai/                     # Gemini AI prompts and reasoning
β”œβ”€β”€ assets/                 # Static assets
β”œβ”€β”€ config/                 # Configuration files
β”œβ”€β”€ dataset/                # Competition datasets
β”œβ”€β”€ evaluation/             # Benchmark & evaluation scripts
β”œβ”€β”€ history/                # Historical interaction retrieval
β”œβ”€β”€ loaders/                # Dataset loaders
β”œβ”€β”€ models/                 # Data models
β”œβ”€β”€ outputs/                # Generated predictions
β”œβ”€β”€ public/                 # Public frontend assets
β”œβ”€β”€ routing/                # Notification routing engine
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ App.tsx
β”‚   β”œβ”€β”€ index.css
β”‚   β”œβ”€β”€ main.tsx
β”‚   └── types.ts
β”œβ”€β”€ tests/                  # Test cases
β”œβ”€β”€ utils/                  # Helper utilities
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ bun.lock
β”œβ”€β”€ index.html
β”œβ”€β”€ main.py                 # Backend entry point
β”œβ”€β”€ metadata.json
β”œβ”€β”€ output.csv
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ server.ts               # Frontend server
β”œβ”€β”€ tsconfig.json
└── vite.config.ts

βš™οΈ Architecture

Incoming Message
        β”‚
        β–Ό
Dataset Loader
        β”‚
        β–Ό
Rule Engine
        β”‚
        β–Ό
History Retrieval
        β”‚
        β–Ό
Gemini AI
        β”‚
        β–Ό
Score-Based Router
        β”‚
        β–Ό
Validation
        β”‚
        β–Ό
Notify / Digest / Mute

πŸ€– AI Pipeline

1️⃣ Rule Engine

Handles deterministic cases:

  • Emergency alerts
  • Scam detection
  • Phishing
  • OTP
  • Promotions
  • Spam

2️⃣ Context Retrieval

Uses

  • Sender information
  • Group metadata
  • Business accounts
  • User history
  • Previous interactions

3️⃣ Gemini AI

Provides contextual reasoning by understanding

  • Intent
  • Urgency
  • Importance
  • Context
  • User relevance

4️⃣ Score-Based Routing

Calculates the final routing decision using:

  • Importance
  • Urgency
  • Trust
  • Risk
  • Personalization

5️⃣ Validation Layer

Ensures:

  • Emergencies are never muted
  • Scams are never notified
  • Final routing is consistent

πŸ“± Dashboard

The web dashboard includes:

  • πŸ“Š Analytics
  • πŸ”” Live Feed
  • πŸ§ͺ Message Simulator
  • πŸ“š Knowledge Base
  • πŸ“€ CSV Export
  • πŸ“ˆ AI Decision Visualization

πŸ›  Tech Stack

Frontend

  • React
  • TypeScript
  • Vite
  • CSS

Backend

  • Python
  • Gemini API
  • Pandas

AI

  • Google Gemini
  • Rule Engine
  • Context Retrieval
  • Hybrid Routing Pipeline

πŸ“‚ Input

The application reads:

  • messages.csv
  • users.csv
  • groups.csv
  • images.csv
  • business_accounts.csv
  • message_history.csv
  • message_events.csv

along with local media files.


πŸ“€ Output

The system generates

output.csv

containing

  • Message ID
  • Routing Action
  • Confidence
  • Explanation
  • Supporting Evidence

πŸš€ Installation

Clone Repository

git clone https://github.com/yourusername/SignalOS.git
cd SignalOS

Install Backend

pip install -r requirements.txt

Install Frontend

npm install

or

bun install

Configure Environment

Create .env

GEMINI_API_KEY=YOUR_API_KEY
APP_URL=http://localhost:3000

Run Backend

python main.py

Run Frontend

npm run dev

or

bun run dev

πŸ“Š Evaluation

The project includes a dedicated evaluation pipeline for benchmarking routing performance on labeled samples and generating the required competition output.


πŸ”’ Security

  • Environment Variables
  • No Hardcoded API Keys
  • Secure Gemini Integration
  • Deterministic Safety Rules

🌟 Future Improvements

  • Offline AI Support
  • Local LLM Fallback
  • Multi-language Messages
  • Better Voice Understanding
  • Adaptive User Learning
  • WhatsApp API Integration

πŸ‘¨β€πŸ’» Author

Vijay Kumar

B.Tech Computer Science Engineering

AI β€’ Machine Learning β€’ Full Stack Development


⭐ Star this repository if you found it useful!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages