Skip to content

Latest commit

ย 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ SentinelMarket โ€” AI-Powered Stock Anomaly Detection

Python FastAPI Next.js TypeScript PostgreSQL

๐Ÿ”ด Live Demo

Live Site API

Protecting retail investors from market manipulation with real-time ML-powered detection

View Demo โ€ข Tech Stack โ€ข Architecture โ€ข Run Locally


๐ŸŽฏ What It Does

SentinelMarket is a production-ready, full-stack data platform that detects pump-and-dump schemes and market manipulation in the Indian stock market (NSE/BSE) using:

  • ๐Ÿค– Machine Learning โ€” Isolation Forest anomaly detection with 47 engineered features
  • ๐Ÿ“Š Real-time Data Pipelines โ€” ETL with data warehouse, data lake, and stream processing
  • ๐Ÿ“ฑ Social Media Intelligence โ€” Twitter & Telegram monitoring with FinBERT sentiment analysis
  • โšก Live Risk Scoring โ€” 0-100 risk scores with explainability and predictive alerts

Business Impact: Designed to protect 100+ million retail investors who lose โ‚น10,000+ crores annually to market manipulation


๐Ÿ“ธ Screenshots

Main Dashboard

Dashboard Real-time market overview with live indices, feature showcase, and risk monitoring


Live Anomaly Feed & Stock Table

Live Feed Live anomaly detection feed with sortable stock table showing risk scores


Analytics Dashboard

Analytics Risk distribution, market health metrics, and historical trend analysis


Risk Alerts

Alerts Predictive alerts with crash probability forecasting 3-7 days ahead


Social Intelligence

Social Twitter & Telegram monitoring with sentiment analysis and hype detection


ETL Pipelines

ETL Data engineering dashboard showing pipeline health, runs, and warehouse stats


Data Quality

Quality Data quality monitoring with completeness metrics and validation reports


๐Ÿ› ๏ธ Tech Stack

Layer Technologies
Frontend Next.js 16, TypeScript, Tailwind CSS, Recharts
Backend Python 3.11, FastAPI, SQLAlchemy, pandas
Database PostgreSQL (Supabase), SQLite fallback
ML/AI scikit-learn (Isolation Forest), FinBERT, 47 features
Data Engineering ETL Pipelines, Data Lake, Data Warehouse, APScheduler
Streaming In-memory event stream (Kafka-style architecture)
Social Twitter API (Tweepy), Telegram API (Telethon)
Deployment Render (Backend), Netlify (Frontend)

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      DATA SOURCES                             โ”‚
โ”‚   ๐Ÿ“ˆ Stock APIs    ๐Ÿ“ฑ Twitter    ๐Ÿ“ฎ Telegram    ๐Ÿ“ฐ News      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ”‚        ETL PIPELINES            โ”‚
           โ”‚  Extract โ†’ Transform โ†’ Load     โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                   โ”‚                   โ”‚
   โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”
   โ”‚Data Lakeโ”‚        โ”‚Data       โ”‚       โ”‚ Stream    โ”‚
   โ”‚  (Raw)  โ”‚        โ”‚Warehouse  โ”‚       โ”‚ Processor โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  ML ENGINE    โ”‚
                    โ”‚ โ€ข 47 Features โ”‚
                    โ”‚ โ€ข Isolation   โ”‚
                    โ”‚   Forest      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚ RISK SCORING  โ”‚
                    โ”‚   (0-100)     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  FastAPI      โ”‚
                    โ”‚  30+ Endpointsโ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Next.js UI   โ”‚
                    โ”‚  8+ Pages     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Key Features

๐Ÿ” Anomaly Detection

  • Volume Spike Detection โ€” Z-score analysis with 85% accuracy
  • Price Anomaly Detection โ€” RSI, Bollinger Bands, momentum indicators
  • ML Detection โ€” Isolation Forest trained on 6,297 data points
  • Combined Risk Score โ€” Weighted ensemble with explainability

๐Ÿ“Š Data Engineering

  • ETL Pipelines โ€” Modular framework with error handling & monitoring
  • Data Warehouse โ€” PostgreSQL with optimized time-series queries
  • Data Lake โ€” Gzip-compressed JSON for raw data preservation
  • Stream Processing โ€” Event-driven architecture for real-time updates
  • Data Quality โ€” Completeness metrics, validation, duplicate detection

๐Ÿ“ฑ Social Intelligence

  • Twitter Monitoring โ€” Real-time sentiment with FinBERT
  • Telegram Channels โ€” Pump signal detection
  • Hype Score โ€” 0-100 coordination detection

๐Ÿšจ Alerts & Predictions

  • Risk Alerts โ€” HIGH/EXTREME risk notifications
  • Crash Prediction โ€” 3-7 day ahead probability forecasting
  • Pattern Matching โ€” Historical scam comparison

๐Ÿš€ Quick Start

# Clone
git clone https://github.com/umangkumarchaudhary/SentinelMarket-Backend.git
cd SentinelMarket-Backend

# Backend
cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload

# Frontend (new terminal)
cd frontend
npm install
npm run dev

Access:


๐Ÿ“ˆ Performance

Metric Value
API Response Time <500ms avg
Detection Accuracy ~90% combined
False Positive Rate 15-20%
Stocks Analyzed/Hour 1000+
Data Quality >95% valid ratio

๐ŸŽฏ Skills Demonstrated

This project showcases expertise in:

Area Skills
Data Engineering ETL Pipelines, Data Warehouse, Data Lake, Stream Processing, Data Quality
Machine Learning Feature Engineering (47 features), Anomaly Detection, Model Deployment
Backend FastAPI, REST APIs, PostgreSQL, SQLAlchemy, Error Handling
Frontend Next.js, TypeScript, Responsive Design, Real-time Updates
DevOps Render, Netlify, Docker, CI/CD
NLP FinBERT, Sentiment Analysis, Social Media Mining

๐Ÿ‘ค Author

Umang Kumar Chaudhary

Building enterprise-grade data platforms and AI systems

Portfolio LinkedIn GitHub


๐Ÿ“„ License

MIT License โ€” See LICENSE for details.


โญ Star this repo if you find it useful! โญ

Built with โค๏ธ for protecting retail investors

About

SentinelMarket is a production-ready, full-stack data platform that detects pump-and-dump schemes and market manipulation in the Indian stock market (NSE/BSE) using Machine Learning

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages