How aluminumpirate/py-threat-intelligence works
Project type and purpose
• This is a full‑stack, containerized Threat Intelligence System composed of:
• A Python FastAPI‑based REST API server (app/)
• A React/Vite frontend (frontend/)
• A cron‑based scheduler service (scheduler/)
• A PostgreSQL database (configured via docker‑compose)
• Purpose: collect, store, and present domain threat data via multiple OSINT services (VirusTotal, WHOIS, DNS providers).
File structure
• app/
• main.py – entrypoint for FastAPI
• controllers/ – HTTP handlers mapping to routes
• routers/ – FastAPI router definitions (domains, scans, jobs)
• services/ – business logic (scan orchestration, service wrappers)
• models.py, schemas.py – SQLAlchemy ORM models & Pydantic schemas
• database.py – async engine & session setup
• frontend/
• src/ – React components, pages, API client (api.js)
• index.html, package.json, vite.config.js – frontend build config
• scheduler/
• scan_job.py – script to run scheduled scans
• crontab.txt – cron expression
• docker-compose.yml orchestrates API, scheduler, database, and frontend
• requirements.txt & scheduler/requirements‑scheduler.txt list Python dependencies
README for additional insights
• Tech stack: Python 3.8+, FastAPI, SQLAlchemy, Pydantic, React (Vite), Postgres, Docker, cron
• Three components: API server, database, scheduler
• Docker‑compose for local deployment; environment variables for keys & DB URL