How t3rmixs/gptmatrix works
Security Lab Assistant is a Flask web app for managing scan records, running real Nmap scans through chat, and answering cybersecurity questions. The main workflow routes dashboard and AJAX requests into scan-record services for CRUD, filtering, sorting, and report export; chat requests are routed to Nmap execution, optional Groq responses, or local knowledge. Scan records persist in SQLite. The README also documents the browser UI and AJAX updates; the templates and JavaScript were not excerpted, so their runtime links are not detailed here.
Main entry points: app.py Flask routes · chat_service.py Chat routing · scan_service.py Record operations · index.html Dashboard UI
Components 15
Web interface
- Flask routes
app.py - Dashboard UI
templates/index.html - Terminal styling
static/css/style.css
Scan management
- Scan record model
models/target.py - Validation errors
models/exceptions.py - Record operations
services/scan_service.py - Text report export
services/scan_service.py
Chat and scanning
- Chat routing
services/chat_service.py - Nmap execution
services/scanner.py - Groq API
- Local knowledge
services/chat_service.py
Persistence
- SQLite scan logs
repository/database.py
Other components
- User
- Nmap binary
- Browser
Connections 15
- User → Browser: uses
README.md - Browser → Flask routes: requests
README.md - Flask routes → Dashboard UI: renders
app.py - Dashboard UI → Terminal styling: styled by
- Flask routes → Record operations: calls
app.py - Record operations → SQLite scan logs: reads and writes
services/scan_service.py - Flask routes → Chat routing: routes chat
app.py - Chat routing → Nmap execution: runs scans
services/chat_service.py - Nmap execution → Nmap binary: executes
services/scanner.py - Chat routing → Record operations: saves results
services/chat_service.py - Chat routing → Groq API: requests answers
services/chat_service.py - Chat routing → Local knowledge: matches locally
services/chat_service.py - Record operations → Text report export: generates
services/scan_service.py - Flask routes → Text report export: serves download
app.py - Scan record model → Validation errors: raises
models/target.py