An affordable, aggregated threat intelligence dashboard that translates raw data into actionable insights for SMBs.
ThreatView acts as a central nervous system for threat data β ingesting noisy data from sources like AlienVault OTX, PhishTank, and AbuseIPDB, normalizing it, and presenting it so a non-expert IT manager can say: "We need to block this IP address immediately."
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REACT FRONTEND β
β Dashboard β IoC Search β Alerts β Reports β Settings β
β Recharts β TailwindCSS β Lucide Icons β
ββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β REST API
ββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β FASTAPI BACKEND β
β Auth (JWT) β Dashboard β IoC Search β Alerts β Reports β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β INGESTION ENGINE (ETL) β
β AlienVault OTX β PhishTank β AbuseIPDB β
β BaseIngestor (normalize β upsert β dedup) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SCHEDULER (APScheduler) β
β Data ingestion: every 30 min β Alerts: every 5 min β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β DATABASE (SQLite/PostgreSQL) β
β Users β IoCs β Alerts β Alert Rules β Ingestion Logs β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
threatview/
βββ backend/
β βββ main.py # FastAPI entry point
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variables template
β βββ app/
β βββ config.py # Settings & env vars
β βββ database.py # Async SQLAlchemy setup
β βββ models/
β β βββ models.py # ORM models (User, IoC, Alert, etc.)
β β βββ schemas.py # Pydantic request/response schemas
β βββ ingestors/
β β βββ base.py # BaseIngestor (abstract ETL)
β β βββ alienvault.py # AlienVault OTX connector
β β βββ phishguard.py # PhishTank phishing URLs
β β βββ abuseipdb.py # AbuseIPDB IP reputation
β βββ api/
β β βββ auth.py # Register, login, profile
β β βββ dashboard.py # Stats, trends, charts
β β βββ iocs.py # IoC search, filter, export
β β βββ alerts.py # Alert rules, brand monitoring
β β βββ reports.py # PDF report generation
β βββ services/
β β βββ scheduler.py # APScheduler job runner
β β βββ alerting.py # Alert rule engine
β β βββ reports.py # ReportLab PDF generator
β βββ utils/
β βββ auth.py # JWT auth, password hashing, RBAC
βββ frontend/
βββ package.json
βββ vite.config.js # Vite with API proxy
βββ tailwind.config.js
βββ index.html
βββ src/
βββ main.jsx
βββ index.css
βββ App.jsx # Router + protected routes
βββ context/
β βββ AuthContext.jsx # Auth state management
βββ utils/
β βββ api.js # API client with JWT
βββ components/
β βββ Layout.jsx # Sidebar navigation
βββ pages/
βββ LoginPage.jsx
βββ RegisterPage.jsx
βββ DashboardPage.jsx # Charts, stats, trends
βββ IoCsPage.jsx # Search & filter IoCs
βββ AlertsPage.jsx # Alert rules + brand monitoring
βββ ReportsPage.jsx # PDF report preview + download
βββ SettingsPage.jsx # Profile + API access
- Python 3.10+
- Node.js 18+
- npm or yarn
cd backend
pip install -r requirements.txt
# Copy and edit environment variables
cp .env.example .env
# Start the server (creates DB + seeds demo data automatically)
python -m uvicorn main:app --reload --port 8000The backend will:
- Create the SQLite database
- Seed demo users (demo/demo123, freeuser/free123)
- Run initial ingestion with mock threat data
- Start the scheduler (ingestion every 30min, alerts every 5min)
cd frontend
npm install
npm run dev| Account | Username | Password | Tier |
|---|---|---|---|
| Pro | demo | demo123 | β‘ PRO |
| Free | freeuser | free123 | FREE |
- AlienVault OTX: Malicious IPs, domains, URLs, file hashes from threat pulses
- PhishTank: Verified phishing URLs targeting banks, tech companies, government
- AbuseIPDB: IP reputation with abuse confidence scores
- Normalization: All sources mapped to a unified
IoCmodel (value, type, threat, severity, country, confidence) - Scheduler: APScheduler runs ingestion every 30 minutes with full ETL cycle
- Stats Cards: Total IoCs, 24h count, 7-day count, active alerts
- Threat Type Distribution: Donut chart showing malware, phishing, ransomware, etc.
- Severity Distribution: Bar chart with color-coded severity levels
- Top Source Countries: Ranked list with country flags and progress bars
- Threat Trends: 8-day area chart showing trend lines per threat type
- Data Sources: Status cards for each intelligence feed
- IoC Search: Full-text search across IoC values, descriptions, and tags
- Filters: IoC type, threat type, severity range
- Alert Rules: Custom rules with industry match, threat type, severity threshold, keyword
- Brand Monitoring: Add domains to watchlist; auto-alerts if found in phishing feeds
- Alert Types: IoC Match, Brand Alert, Industry Alert, Threat Spike
- PDF Generation: Weekly Threat Landscape report with ReportLab
- Executive summary
- Threat type breakdown table
- Top source countries
- Top 20 highest-severity indicators
- Data source summary
- CSV Export: Pro-only IoC export with full fields
- Tiered Access (RBAC):
- Free: 24-hour data window, basic search, 3 alert rules
- Pro: Historical search, API access, CSV export, PDF reports, unlimited rules
Once the backend is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
| Method | Endpoint | Auth | Tier | Description |
|---|---|---|---|---|
| POST | /api/auth/register |
No | β | Create account |
| POST | /api/auth/login |
No | β | Get JWT token |
| GET | /api/auth/me |
Yes | β | Get profile |
| GET | /api/dashboard/stats |
Yes | β | Dashboard stats |
| GET | /api/iocs/search?q= |
Yes | Free/Pro* | Search IoCs |
| GET | /api/iocs/latest |
Yes | β | Latest IoCs |
| GET | /api/iocs/export/csv |
Yes | Pro | CSV export |
| GET | /api/alerts/ |
Yes | β | List alerts |
| POST | /api/alerts/rules |
Yes | β | Create alert rule |
| POST | /api/alerts/brand-monitor |
Yes | β | Add domain monitor |
| GET | /api/reports/weekly |
Yes | Pro | Download PDF |
| GET | /api/reports/preview |
Yes | Free | Report preview |
* Free tier limited to 24h data window
| Source | API | Data Type | Auth |
|---|---|---|---|
| AlienVault OTX | otx.alienvault.com | IPs, domains, hashes, pulses | API Key (optional) |
| PhishTank | data.phishtank.com | Verified phishing URLs | API Key (optional) |
| AbuseIPDB | abuseipdb.com | IP reputation + geolocation | API Key (optional) |
Demo Mode: When API keys are not configured, all ingestors return realistic mock data so the dashboard works out of the box.
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, TailwindCSS, Recharts, Lucide Icons |
| Backend | Python, FastAPI, SQLAlchemy (async), Pydantic v2 |
| Database | SQLite (dev) / PostgreSQL (prod) |
| Auth | JWT (python-jose), bcrypt |
| Scheduling | APScheduler |
| PDF Reports | ReportLab |
| Deployment | Cloud-ready (Docker, AWS, GCP, Azure) |
External APIs β Ingestors β Normalize β Upsert/Dedup β Database
β
Scheduler (30min) Dashboard API β React Charts
β
Alert Engine (5min) Alert Rules β User Notifications
- JWT tokens expire after 24 hours
- Passwords are bcrypt-hashed
- CORS configured for localhost origins (update for production)
- API keys stored in
.env(never committed) - Demo credentials are for development only
MIT License β see LICENSE for details. "# ThreatView-"