A proactive, intelligent security monitoring platform for digital retail, inspired by real-world enterprise needs.
Built with Django and pure Python for both clarity and rapid prototyping.
Modern e-commerce and fintech platforms face constant threats—fraud, account takeovers, payment abuse—that cost millions. Most existing systems detect these after the damage is done.
This project provides a real-time, automated security alert and response platform, featuring:
- Live activity monitoring
- Rule-based and AI-driven threat detection
- Instant admin/user notifications
- Automated account lockdown and self-service unlock via OTP
- Rich dashboards for both users and admins
- Tracks critical user actions: logins, password changes, transactions, failed payments, and browsing.
- Data sources: frontend/backend webhooks, logs, session metadata, and payment events.
- Rule-based detection (e.g., multiple failed logins, large transactions from new devices, suspicious browsing).
- (Optional) AI anomaly detection (Isolation Forest, One-Class SVM—see roadmap).
- Each event gets a severity score and full context for triage.
- Admins see a live feed of security alerts (with filter/search).
- Alerts contain: user/session/device, geo-IP, summary, severity, and suggested actions.
- User-facing alerts: Users see their own flagged events and can dispute ("This wasn't me!").
- For high-severity threats:
- User account is temporarily locked (sensitive actions blocked).
- User is notified and offered self-service unlock via OTP (simulated or real email/SMS).
- Admin can override or escalate, all with one click.
- Every user sees a dynamic “Security Health” bar—higher if their account is clean, lower if alerts exist.
- Users get actionable suggestions (enable 2FA, review recent activity).
- Full transparency: users can see what happened, when, and why.
- Responsive home page, member, and admin dashboards (basic Django templates—easy to style for your hackathon!).
- Instant event simulation from the UI (no Postman needed!).
- Admins have instant “resolve” and “unblock” options.
- Backend: Django (API, business logic, admin, ORM)
- Frontend: Django Templates (minimal, pure HTML/CSS, ready for customization)
- Database: SQLite/PostgreSQL (via Django ORM)
- Alerting: Email (console for demo, extendable to SMTP/SMS)
- Anomaly Detection: Python (Scikit-learn, PyOD ready for ML integration)
- Other: Docker-ready, cross-platform
- Proactive security: Alerts + actions happen before damage, not after.
- User empowerment: End users can self-verify suspicious events via OTP.
- Business value: Reduces fraud losses and support costs, boosts customer trust.
- Hackathon-ready: Fast, clear UI for demo. All testing via web—no extra tools needed.
- Monitor: Every critical user event is sent to the backend (via form, API, or real app).
- Detect: Rules/ML flag anything suspicious, assigning a severity and full context.
- Alert: Admins get instant alerts in dashboard and (simulated) email; users see flagged events and “This wasn’t me!” button.
- Respond: High-severity? The user is locked out of sensitive actions until they confirm via OTP, or admin reviews/unlocks.
- Recover: User or admin unlocks, health bar rises, account is safe again.
- Trigger a large transaction to see a lock and OTP flow.
- Trigger failed logins, password changes, etc., to see medium/low severity alerts.
- Use "This wasn't me" and unlock actions as both user and admin.
- OTP via email/SMS: Can be integrated with Twilio, Sendgrid, etc.
- Role-based access: Members and admins have totally different views and privileges.
- Extensible rules: Add new detection rules in a single place.
- ML anomaly detection: Hooks in place for advanced detection.
- Rate limiting, geo-IP, and blockchain-ready: Easy to add.
- Add full ML anomaly detection.
- Slack/Telegram alert integration.
- Advanced search/filter on alert feed.
- User-facing notification history.
- Audit log hardening (blockchain or append-only).
- Theme/UI polish.
-
Clone & Install
git clone https://github.com/EclipseZoro/SecureRetailSystem.git cd security-alert-system pip install -r requirements.txt -
Set up DB and Admin
python manage.py migrate python manage.py createsuperuser python manage.py runserver
-
Go to:
http://localhost:8000/– Homehttp://localhost:8000/login/– Member/Admin Loginhttp://localhost:8000/member/– Member Dashboard (test alerts/events)http://localhost:8000/admin_dashboard/– Admin Alert Feed
-
Simulate events from the dashboard to see everything in action!
Pull requests and feature suggestions are always welcome.
Please open an issue or PR with your ideas or improvements.
Created by Astubh Mishra for Walmart Hackathon 2025.
Inspired by real-world threats and a passion for smarter, safer digital commerce.
For questions or demo requests, feel free to contact or open an issue!


