How qiaoyi12/fyp works
TriageAI is a Flask SOC workflow: staff upload network-flow CSVs, the backend stores uploads and runs ML triage, then users review alerts/logs, assign and investigate tickets, and resolve or report incidents. Role-scoped pages and APIs expose the workflow; SQLite-backed models hold users, analyses, alerts, traffic logs, assignments, blacklist entries, and reports. Assignment, chatbot, and analyst-support agents are distinct assistance branches. Some service and model internals are unsampled, so edges to them rely on the SOURCE INDEX or README rather than inferred call chains.
Main entry points: app.py Flask app · data_service.py SOC data services · upload.py Upload API · models.py SOC records
Components 19
User interface
- Flask app
app.py - SOC pages
frontend - React routes
frontend/src/App.jsx - Page routes
backend/src/routes/pages.py
Ingestion and detection
- Upload API
backend/src/routes/upload.py - CSV preprocessing
backend/src/ml/preprocess.py - ML inference
backend/src/ml/predict.py
SOC operations
- SOC data services
backend/src/services/data_service.py - Analyst API
backend/src/routes/analyst.py - Chatbot API
backend/src/routes/chatbot_routes.py
AI assistance
- Ticket assignment
agenticAI/assignment_agent.py - Assignment tools
agenticAI/assignment_tools.py - Fallback planning
agenticAI/distribution_plan.py - SOC chatbot
agenticAI/soc_chatbot.py - Chat context tools
agenticAI/chatbot_tools.py - Analyst support
agenticAI/analyst_agent.py
Application data
- SQLite database
backend/src/database/db.py - SOC records
backend/src/database/models.py
Other components
- SOC staff
Connections 25
- SOC staff → SOC pages: uses
README.md - SOC pages → Flask app: requests pages
README.md - Flask app → Page routes: registers
app.py - Flask app → Upload API: registers
app.py - Flask app → Chatbot API: registers
app.py - Flask app → Analyst API: registers
app.py - Page routes → SOC data services: calls
backend/src/routes/pages.py - Page routes → Upload API: uses upload helper
backend/src/routes/pages.py - SOC staff → Upload API: uploads CSV
README.md - Upload API → CSV preprocessing: validates features
backend/src/routes/upload.py - SOC data services → CSV preprocessing: preprocesses traffic
backend/src/services/data_service.py - SOC data services → ML inference: classifies flows
backend/src/services/data_service.py - SOC data services → Ticket assignment: starts assignment
backend/src/services/data_service.py - SOC data services → SOC records: reads and writes
backend/src/services/data_service.py - Upload API → SOC records: records uploads
backend/src/routes/upload.py - Page routes → SOC records: queries users and logs
backend/src/routes/pages.py - Ticket assignment → Assignment tools: fetches and assigns
agenticAI/assignment_agent.py - Ticket assignment → Fallback planning: uses fallback
agenticAI/assignment_agent.py - Assignment tools → SOC records: queries and updates
agenticAI/assignment_tools.py - Chatbot API → SOC chatbot: calls
backend/src/routes/chatbot_routes.py - SOC chatbot → Chat context tools: uses
agenticAI/soc_chatbot.py - Chat context tools → SOC data services: reads SOC context
agenticAI/chatbot_tools.py - Analyst API → Analyst support: invokes support
backend/src/routes/analyst.py - SOC records → SQLite database: defines ORM records
backend/src/database/models.py - React routes → Flask app: fetches session
frontend/src/App.jsx