Skip to content

shriom17/CyberSentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# CyberSentinel ## Advanced Crime Intelligence Platform *Your Digital Guardian Against Cybercrime* A comprehensive full-stack application for predicting likely cash withdrawal locations to enable proactive cybercrime intervention using React frontend and Flask backend. ## 🎯 Project Overview CyberSentinel is an advanced predictive analytics framework that focuses on the mitigation of cybercrimes by adopting a proactive approach. The system predicts likely cash withdrawal locations, enabling Law Enforcement Agencies (LEAs) to implement proactive interventions such as deploying special teams or alerting local banks and ATMs in high-risk areas. ## 🏗️ Architecture ### Backend (Flask) - **Predictive Analytics Engine**: AI/ML-based system for analyzing historical cybercrime data - **Risk Assessment API**: Real-time risk scoring and geospatial modeling - **Alert Management System**: Automated notification and alert handling - **Authentication & Authorization**: Role-based access control ### Frontend (React + TypeScript) - **Risk Heatmap Dashboard**: GIS-enabled visualization with interactive maps - **Analytics Interface**: Pattern analysis and prediction tools - **Law Enforcement Interface**: Secure access for investigators - **Real-time Notifications**: Live feed and alert management ## 🚀 Features ### 1. Predictive Analytics Engine - Historical data analysis using ML algorithms - Pattern detection and geospatial risk modeling - Real-time hotspot prediction - Confidence scoring and risk assessment ### 2. Risk Heatmap Dashboard - Interactive GIS mapping using Leaflet - Real-time risk zone visualization - Drill-down filters by time, location, and crime category - Live complaint feed and statistics ### 3. Law Enforcement Interface - Role-based authentication (Admin, Investigator, Analyst) - Secure alert access and case management - Evidence documentation and action tracking - Investigation workflow management ### 4. Alert & Notification System - Real-time notifications via multiple channels - Automated alert generation based on risk thresholds - SMS, email, and dashboard notifications - Alert lifecycle management ## 🛠️ Technology Stack ### Backend - **Framework**: Flask 2.3.3 - **ML/AI**: scikit-learn, NumPy, Pandas - **Authentication**: JWT, Werkzeug - **API**: RESTful APIs with CORS support ### Frontend - **Framework**: React 18 + TypeScript - **UI Library**: Material-UI (MUI) - **Mapping**: Leaflet + React-Leaflet - **Charts**: Recharts - **HTTP Client**: Axios - **Routing**: React Router ### Data & Security - **Database**: SQLite (development), PostgreSQL (production) - **Security**: JWT tokens, HTTPS, role-based access - **GIS**: PostGIS for spatial data (production) ## 📦 Installation & Setup ### Prerequisites - Node.js 16+ and npm - Python 3.8+ - Git ### Backend Setup ```bash cd backend pip install -r requirements.txt python app.py ``` ### Frontend Setup ```bash cd frontend npm install npm start ``` ## 🔐 Authentication The system includes three user roles with demo credentials: ### Admin User - **Username**: `admin` - **Password**: `admin123` - **Permissions**: Full system access, user management, alert creation ### Investigator - **Username**: `officer1` - **Password**: `officer123` - **Permissions**: View alerts, update cases, access investigations ### Analyst - **Username**: `analyst1` - **Password**: `analyst123` - **Permissions**: View analytics, generate reports, pattern analysis ## 🗺️ API Endpoints ### Authentication - `POST /api/auth/login` - User login - `POST /api/auth/verify-token` - Token verification - `POST /api/auth/logout` - User logout ### Analytics - `POST /api/analytics/predict` - Predict hotspots - `GET /api/analytics/patterns` - Analyze historical patterns - `POST /api/analytics/risk-assessment` - Assess location risk ### Dashboard - `GET /api/dashboard/heatmap-data` - Get risk heatmap data - `GET /api/dashboard/statistics` - Get dashboard statistics - `GET /api/dashboard/trends` - Get trend data - `GET /api/dashboard/live-feed` - Get live complaint feed ### Alerts - `GET /api/alerts/active` - Get active alerts - `POST /api/alerts/create` - Create new alert - `PUT /api/alerts/{id}/update` - Update alert - `GET /api/alerts/statistics` - Get alert statistics ## 🎯 Key Components ### Predictive Analytics - **Location**: `backend/app/routes/analytics.py` - **Features**: ML-based hotspot prediction, pattern analysis, risk scoring - **Models**: Configurable ML models for different prediction scenarios ### Risk Heatmap - **Location**: `frontend/src/pages/Dashboard.tsx` - **Features**: Interactive maps, real-time data, risk visualization - **Technology**: Leaflet maps with custom markers and overlays ### Alert Management - **Location**: `frontend/src/pages/Alerts.tsx` - **Features**: Alert creation, status tracking, notification management - **Workflow**: Automated alert lifecycle from creation to resolution ## 🔧 Configuration ### Environment Variables Create `.env` files for configuration: **Backend (.env)** ```env SECRET_KEY=your-secret-key JWT_SECRET_KEY=your-jwt-secret DATABASE_URL=sqlite:///cybercrime.db SMS_API_KEY=your-sms-api-key EMAIL_API_KEY=your-email-api-key MAPBOX_ACCESS_TOKEN=your-mapbox-token ``` **Frontend (.env)** ```env REACT_APP_API_URL=http://localhost:5000/api REACT_APP_MAPBOX_TOKEN=your-mapbox-token ``` ## 🚦 Development Workflow 1. **Start Backend**: `cd backend && python app.py` 2. **Start Frontend**: `cd frontend && npm start` 3. **Access Application**: http://localhost:3000 4. **API Documentation**: http://localhost:5000/api/health ## 📊 Data Flow 1. **Data Ingestion**: Historical cybercrime complaints and transaction data 2. **ML Processing**: Pattern detection and risk modeling 3. **Prediction Generation**: Hotspot predictions with confidence scores 4. **Alert Creation**: Automated alerts based on risk thresholds 5. **Notification Dispatch**: Multi-channel notifications to relevant officers 6. **Action Tracking**: Monitor responses and update case status ## 🎨 UI/UX Features - **Dark Theme**: Professional law enforcement interface - **Responsive Design**: Mobile and desktop optimized - **Real-time Updates**: Live data refresh and notifications - **Interactive Maps**: Zoom, pan, and click for detailed information - **Role-based Views**: Customized interface based on user permissions ## 🔮 Future Enhancements - **Advanced ML Models**: Deep learning for improved prediction accuracy - **Mobile App**: Native mobile application for field officers - **Integration APIs**: Connect with banking systems and ATM networks - **Advanced Analytics**: Predictive modeling for different crime types - **Real-time Streaming**: Live data processing with Apache Kafka ## 📈 Success Metrics - **Prediction Accuracy**: Target 80%+ accuracy for hotspot predictions - **Response Time**: Reduce average alert response time to <15 minutes - **Prevention Rate**: Increase proactive intervention success rate - **User Adoption**: 90%+ satisfaction from law enforcement users ## 🤝 Contributing 1. Fork the repository 2. Create feature branch (`git checkout -b feature/new-feature`) 3. Commit changes (`git commit -am 'Add new feature'`) 4. Push to branch (`git push origin feature/new-feature`) 5. Create Pull Request ## 📄 License This project is licensed under the MIT License - see the LICENSE file for details. ## 🆘 Support For technical support or questions: - Create an issue on GitHub - Contact the development team - Check the documentation wiki --- **Built for proactive cybercrime prevention and law enforcement efficiency** 🛡️# CyberSentinel # CyberSentinel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published