FraudB is a full-featured fraud analytics platform with an AI assistant designed to help businesses monitor, analyze, and act on potentially fraudulent transactions. It combines transaction-level risk scoring, predictive insights, and analytics dashboards to empower informed decision-making.
Key highlights:
- AI Assistant: Provides actionable guidance based on live analytics and historical trends.
- Fraud Analytics: Metrics across customizable time windows, risk levels, and channel insights.
- Predictions: Supports single and batch transaction predictions with contextual summaries.
- Authentication & Alerts: OTP-based email verification, profile management, and alert notifications.
- Production-Ready: Secure setup with CSRF protection, environment-driven configuration, and HTTPS-ready deployment.
- Backend: Django 5, Gunicorn, WhiteNoise
- Database: MongoDB (Atlas or self-hosted)
- AI Orchestration: n8n Webhook Integration
- Frontend: Bootstrap 5 templates
- Security & Infra: Environment variables, CSRF hardening, HTTPS-ready
- Assistant Chat: Business-facing AI guidance for fraud monitoring.
- Analytics Dashboard: Overview of fraud rate, top risky channels, and time-series trends.
- Transaction Predictions: Single or batch predictions with risk scoring and descriptive insights.
- Authentication: Secure OTP/email-based login, password reset, and user preferences.
- Security: CSRF protection, HTTPS-ready configuration, secure secret management.
project_settings/settings.py— Environment-driven configuration (email, hosts, security).core/,api/,accounts/,ml/— Main Django apps.static/→ Collected tostaticfiles/for production use..env.example— Template to create your.envfile safely..gitignore— Excludes sensitive data, caches, sessions, media, and logs.
- Create a virtual environment and install dependencies:
pip install -r requirements.txt
- Copy environment template and configure:
cp .env.example .env
- Collect static files and run the server:
python manage.py collectstatic --noinput python manage.py runserver
- Open http://127.0.0.1:8000 in your browser.
Key variables (all documented in .env.example):
SECRET_KEY,DJANGO_DEBUGALLOWED_HOSTS,CSRF_TRUSTED_ORIGINSMONGO_URI,MONGO_DB- Email configuration:
EMAIL_*(Gmail App Password recommended) - n8n integration:
N8N_WEBHOOK_URL,N8N_WEBHOOK_TOKEN - Policy and rule settings: thresholds, rule weights
- App posts transaction payloads to
N8N_WEBHOOK_URL. - Respond with JSON:
{ "reply": "..." }. - Optional token-based security using
N8N_WEBHOOK_TOKEN.
- Rotate
SECRET_KEYand keepDJANGO_DEBUG=0in production. - Set
ALLOWED_HOSTSandCSRF_TRUSTED_ORIGINScorrectly. - Serve over HTTPS with secure cookies and SSL redirect.
- Never commit
.envor sensitive databases;.gitignorealready excludes them.
- 403 CSRF: Ensure
CSRF_TRUSTED_ORIGINSincludes scheme and domain. - Email issues: Verify TLS/SSL, port, and App Password for sending emails.
- n8n errors: Check logs and webhook URL/token configuration.
- Static files 404: Re-run
collectstaticand verify WhiteNoise setup.
MIT License — see LICENSE file.