How kspeiris/bot-detection_01 works
This is a Flask-based behavioral bot-detection platform. Human visitors and Selenium simulations use the demo pages and send interaction events to the app; events are logged, transformed into session and fixed-window features, scored by rules and models, and reviewed in the admin dashboard with coordination evidence. The graph follows documented workflow links and sampled imports/calls. Some dashboard, logging, and training details are unsampled, so those links rely on README documentation rather than claims about unseen implementation.
Main entry points: app.py Flask App · feature_engine.py Feature Engineering · features.csv Session Features · window_features.csv Window Features
Components 24
Capture & Demo
- Bot Simulations
bot_simulation/synthetic_runner.py - Browser Driver
bot_simulation/browser.py - Flask App
app.py - Event Logging
ingestion/logger_api.py - Event Validation
ingestion/validators.py
Feature Analytics
- Feature Extraction
feature_extraction/extract_features.py - Feature Engineering
processing/feature_engine.py - Behavior Fingerprints
processing/fingerprint_engine.py - Window Builder
processing/window_builder.py - Sessionization
processing/sessionizer.py
Detection
- Rule Detection
detection/rules.py - Session Model
detection/individual_model.py - Window Models
models - Coordination Engine
detection/coordination_engine.py - Coordination Analysis
coordination_analysis/detect_coordination.py - Risk Fusion
detection/risk_fusion.py
Review UI
- Admin Dashboard
templates/dashboard.html - Dashboard Controls
static/dashboard.js - Demo Pages
templates/page.html
Runtime Artifacts
- Raw Events
data/events.csv - Session Features
data/features.csv - Window Features
data/window_features.csv - Artifact Store
artifact_store.py
Other components
- Human Visitor
Connections 32
- Human Visitor → Flask App: uses pages
README.md - Bot Simulations → Flask App: sends events
bot_simulation/synthetic_runner.py - Bot Simulations → Browser Driver: drives browser
bot_simulation/fast_bot.py - Flask App → Event Logging: accepts events
README.md - Event Logging → Event Validation: validates payload
ingestion/logger_api.py - Event Logging → Raw Events: writes events
README.md - Feature Extraction → Raw Events: reads events
feature_extraction/extract_features.py - Feature Extraction → Feature Engineering: calls extraction
feature_extraction/extract_features.py - Feature Engineering → Behavior Fingerprints: builds fingerprints
processing/feature_engine.py - Feature Engineering → Window Builder: builds windows
processing/feature_engine.py - Feature Engineering → Session Features: writes features
README.md - Feature Engineering → Window Features: writes features
README.md - Feature Extraction → Artifact Store: resolves artifacts
feature_extraction/extract_features.py - Feature Engineering → Artifact Store: writes artifacts
processing/feature_engine.py - Sessionization → Feature Engineering: supports grouping
- Session Features → Rule Detection: scores sessions
README.md - Session Features → Session Model: scores sessions
README.md - Window Features → Window Models: scores windows
README.md - Window Features → Coordination Analysis: analyzes windows
README.md - Coordination Analysis → Coordination Engine: calls analysis
coordination_analysis/detect_coordination.py - Rule Detection → Flask App: provides rule scores
app.py - Session Model → Flask App: provides model scores
- Window Models → Flask App: provides window scores
- Coordination Engine → Flask App: provides group evidence
app.py - Flask App → Risk Fusion: builds fused risk
app.py - Flask App → Session Features: reads features
README.md - Flask App → Window Features: reads features
README.md - Flask App → Admin Dashboard: serves results
README.md - Admin Dashboard → Dashboard Controls: uses controls
- Human Visitor → Demo Pages: navigates demo
README.md - Artifact Store → Session Features: stores artifacts
- Artifact Store → Window Features: stores artifacts