How s4ntrx/s4ntrx-bot works
S4ntrx Bot is a multi-user cybersecurity education web app. Students register or log in, then use chat, phishing and URL analysis, password checking, and incident reporting; administrators view aggregate statistics. Flask routes handle requests and use SQLAlchemy-backed models for persistent records. Chat selects an offline knowledge-base responder by default, with Ollama as an optional provider. The graph preserves the documented capabilities, but the sampled excerpts do not show admin and incident route internals, so those connections rely on SOURCE INDEX references or README statements.
Main entry points: app.py Flask app · admin.py Admin statistics · security.py Security tool routes · auth.py Account routes
Components 24
Web entry and identity
- Flask app
app.py - App configuration
config.py - Flask extensions
extensions.py - Validated forms
forms.py - Account routes
routes/auth.py - User accounts
models/user.py - Landing and dashboard
routes/main.py
Education chat
- Chat routes
routes/chat.py - Chat sessions
models/chat.py - AI provider selection
services/ai_service.py - Cybersecurity knowledge
knowledge
Security tools
- Security tool routes
routes/security.py - Phishing detector
services/phishing_detector.py - URL analyzer
services/url_analyzer.py - Client-side password checker
static/js/password_checker.js - Analysis records
models/analysis.py
Reports and administration
- Incident reporting
routes/incidents.py - Incident reports
models/incident.py - Admin statistics
routes/admin.py - SQL database
Other components
- Student
- Administrator
- Browser UI
- Ollama server
Connections 36
- Student → Browser UI: uses
README.md - Administrator → Browser UI: uses
README.md - Browser UI → Flask app: sends requests
README.md - Flask app → App configuration: loads
app.py - Flask app → Flask extensions: initializes
app.py - Flask app → Account routes: registers
app.py - Flask app → Landing and dashboard: registers
app.py - Flask app → Chat routes: registers
app.py - Flask app → Security tool routes: registers
app.py - Flask app → Incident reporting: registers
app.py - Flask app → Admin statistics: registers
app.py - Account routes → Validated forms: validates with
routes/auth.py - Account routes → User accounts: queries and creates
routes/auth.py - Account routes → SQL database: commits accounts
routes/auth.py - User accounts → SQL database: persists account
models/user.py - Chat routes → Chat sessions: reads and writes
routes/chat.py - Chat routes → AI provider selection: gets provider and replies
routes/chat.py - Chat sessions → SQL database: persists sessions
models/chat.py - AI provider selection → Cybersecurity knowledge: loads documents
services/ai_service.py - AI provider selection → Ollama server: requests chat
services/ai_service.py - AI provider selection → Cybersecurity knowledge: falls back to
services/ai_service.py - Security tool routes → Validated forms: validates with
routes/security.py - Security tool routes → Phishing detector: analyzes messages
routes/security.py - Security tool routes → URL analyzer: analyzes URLs
routes/security.py - Security tool routes → Analysis records: records results
routes/security.py - Analysis records → SQL database: persists analyses
models/analysis.py - Browser UI → Client-side password checker: runs locally
README.md - Incident reporting → Validated forms: uses
routes/incidents.py - Incident reporting → Incident reports: creates and lists
routes/incidents.py - Incident reports → SQL database: persists reports
models/incident.py - Admin statistics → User accounts: queries aggregates
routes/admin.py - Admin statistics → Chat sessions: queries aggregates
routes/admin.py - Admin statistics → Incident reports: queries aggregates
routes/admin.py - Admin statistics → Analysis records: queries aggregates
routes/admin.py - Browser UI → Incident reporting: submits reports
README.md - Browser UI → Admin statistics: views statistics
README.md