Synthetic, educational dashboard demonstrating how cognitive security teams could triage fictional content for manipulation, misinformation, and coordinated influence signals. All data and outputs are synthetic and non-political.
- FastAPI backend with modular analysis engines and strong input validation.
- Linguistic, misinformation, influence, and risk fusion heuristics to illustrate cognitive security workflows.
- Static dashboard (HTML/JS/CSS) visualizing scores, clusters, and recommended actions.
- Reporting utilities for PDF export and synthetic visuals.
- Safety first: offline, synthetic-only processing—no real individuals or political content.
- Create a virtual environment and install dependencies:
python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt
- Run the API locally:
uvicorn backend.main:app --reload
- Or start via Docker Compose:
docker compose up --build
- Open
frontend/index.htmlin a browser. Ensure the API base URL matches your host/port (defaulthttp://localhost:8000).
flowchart TD
UI[Frontend Dashboard] -->|POST /analyze_text| API((FastAPI API))
UI -->|POST /risk_score| API
subgraph Engines
TA[Text Analyzer]
LD[Linguistic Detector]
MD[Misinfo Detector]
ID[Influence Detector]
RE[Risk Engine]
end
API --> TA
TA --> LD
TA --> MD
TA --> ID
LD --> RE
MD --> RE
ID --> RE
API --> RE
Key endpoints (full reference in docs/API.md):
POST /analyze_text– Analyze synthetic text payloads and return embeddings plus linguistic & misinformation signals.POST /analyze_image– Base64 image input with simulated OCR to text.POST /analyze_url– Offline-simulated URL fetch with fictional content.POST /risk_score– Fuse multiple posts into a cognitive risk score with influence clustering.GET /dashboard– Dashboard readiness summary.GET /health– Health probe.
- All analyses are synthetic and fictional; no real individuals or political content.
- URL handling is simulated; no external network calls are performed.
- Outputs are for educational demos of cognitive security concepts only.
backend/
api/ # FastAPI routers
engines/ # Analysis engines
utils/ # Shared utilities (logging, OCR stub, embeddings, visuals, pdf)
frontend/ # Static dashboard assets
models/ # Placeholder for synthetic artifacts
logs/ # Runtime logs
Dockerfile # Production-ready container image
docker-compose.yml # Optional compose stack for local runs
Makefile # Common developer commands
- Install dev tooling:
pip install -r requirements-dev.txt - Format:
black,isort - Lint:
ruff check . - Tests:
pytest
make lint
make testmake formatto auto-format (black, isort) and apply ruff check fixes..editorconfigto standardize editors/IDEs.- Docker image includes
en_core_web_smso spaCy loads out of the box.
- Type hints across modules.
- Centralized logging with rotation (
backend/utils/logger.py). - Input validation via Pydantic models at the API boundary.
- Synthetic-only data paths to prevent real-world targeting or data collection.
- PDF export available via
backend/utils/pdf_export.py. - Visual reports (heatmaps, timelines) written to
reports/(auto-created when visuals run). - Security posture and responsible-use guidelines in
SECURITY.md. - Architecture & design rationale in
docs/ARCHITECTURE.md.
Released under the MIT License. See LICENSE.