How wizzy-balzz/ai-project works
This is a defensive cybersecurity research dashboard for predicting and explaining likely attack paths in synthetic network scenarios. The principal workflow generates or stores a topology, converts it to a directed graph, extracts GNN features, predicts node risk, enumerates and ranks candidate paths, then exposes explanations and mitigation simulations through a FastAPI service and interactive frontend. The backend graph service is the application orchestration layer between persisted scenarios and analysis. Several model and UI relationships are documented rather than shown in sampled source, so those edges are cited to the README or marked unverified.
Main entry points: graph_service.py Graph Service · scenarioStore.ts Scenario State · dataset.py GNN Dataset Pipeline · path_generator.py Path Generator
Components 24
Topology and Features
- Synthetic Topologies
backend/core/synthetic_data.py - Network Data Models
backend/core/data_models.py - Directed Graph Builder
backend/core/graph_builder.py - Feature Extractor
backend/core/feature_extractor.py - GNN Dataset Pipeline
backend/ml/dataset.py
Prediction and Risk
- GraphSAGE Model
backend/ml/model.py - Model Training
backend/ml/trainer.py - Model Evaluation
backend/ml/evaluator.py - Path Models
backend/ml/path_models.py - Path Generator
backend/ml/path_generator.py - Risk Scorer
backend/ml/risk_scorer.py - XAI and Mitigations
backend/ml/explainer.py
Application Service
- Scenario Database
backend/app/database.py - Scenario Records
backend/app/models/scenario.py - Graph Service
backend/app/services/graph_service.py - REST API
backend/app/api/router.py - FastAPI Application
backend/app/main.py
Defense Dashboard
- API Client
frontend/src/api/client.ts - Scenario State
frontend/src/store/scenarioStore.ts - Graph State
frontend/src/store/graphStore.ts - Node Inspector
frontend/src/components/inspector/NodeInspectorView.tsx - What-if Simulator
frontend/src/components/simulation/WhatIfSimulatorPanel.tsx - XAI Views
frontend/src/components/xai/KillChainNarrativeView.tsx
Other components
- Defender
Connections 31
- Synthetic Topologies → Network Data Models: creates records
backend/core/synthetic_data.py - Directed Graph Builder → Network Data Models: consumes topology
backend/core/graph_builder.py - GNN Dataset Pipeline → Directed Graph Builder: builds graph
backend/ml/dataset.py - GNN Dataset Pipeline → Feature Extractor: extracts features
backend/ml/dataset.py - GNN Dataset Pipeline → Network Data Models: converts topology
backend/ml/dataset.py - Model Training → GNN Dataset Pipeline: trains on
README.md - Model Training → GraphSAGE Model: trains
README.md - Model Evaluation → GraphSAGE Model: evaluates
README.md - Path Generator → GNN Dataset Pipeline: prepares inference data
backend/ml/path_generator.py - Path Generator → GraphSAGE Model: infers probabilities
backend/ml/path_generator.py - Path Generator → Path Models: builds candidates
backend/ml/path_generator.py - Risk Scorer → Path Models: scores paths
README.md - XAI and Mitigations → Path Models: explains paths
README.md - Graph Service → Directed Graph Builder: constructs graph
backend/app/services/graph_service.py - Graph Service → Network Data Models: maps topology
backend/app/services/graph_service.py - Graph Service → Path Generator: generates paths
backend/app/services/graph_service.py - Graph Service → Risk Scorer: ranks paths
backend/app/services/graph_service.py - Graph Service → XAI and Mitigations: creates explanations
backend/app/services/graph_service.py - Graph Service → Scenario Database: persists results
- Graph Service → Scenario Records: uses scenario records
backend/app/services/graph_service.py - FastAPI Application → Scenario Database: initializes tables
backend/app/main.py - FastAPI Application → REST API: mounts routes
backend/app/main.py - REST API → Graph Service: dispatches analysis
- Defender → Scenario State: selects scenario
- Scenario State → API Client: requests API
frontend/src/store/scenarioStore.ts - API Client → FastAPI Application: sends HTTP requests
- Scenario State → Graph State: updates graph state
- Graph State → Node Inspector: supplies node data
frontend/src/components/inspector/NodeInspectorView.tsx - Scenario State → Node Inspector: supplies scenario state
frontend/src/components/inspector/NodeInspectorView.tsx - Scenario State → What-if Simulator: drives simulations
- Scenario State → XAI Views: supplies path results