Architecture

Technical Foundation of Thaghrah

Backend, data, and AI pipeline design for secure and scalable training workflows.

System Architecture Diagram

Thaghrah system architecture diagram
Click diagram to zoom.

Backend and Frontend Flow

Frontend

Jinja2 templates render challenge views, guides, and user dashboard interactions.

Backend

Flask routes handle auth, challenge logic, progress checks, and AI challenge endpoints.

Database

SQLite stores users, categories, challenge metadata, submissions, points, and badges.

AI Pipeline

1

User Prompt

Student requests an AI scenario.

2

LLM Plan

Grok/Groq returns challenge plan.

3

PCAP Build

Scapy/tshark pipeline builds packet file.

4

Storage

Challenge metadata and file path saved.

5

User Download

Learner downloads generated PCAP.

6

Flag Validation

Submission checked and points awarded.

Tech Stack

Flask
Python
SQLite
Wireshark
Scapy
Grok / Groq
HTML
CSS
JavaScript