# sollxfim-lab/emergens architecture

> Architecture diagram of the GitHub repository sollxfim-lab/emergens, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sollxfim-lab/emergens
- Repository: https://github.com/sollxfim-lab/emergens

## Overview

Emergens is a Flask-based security-testing console for authorized reconnaissance and scan workflows. A user submits targets through the console; the application authenticates requests, dispatches scans, and returns results for review. The documented product also includes exploit analytics and an optional AI assistant. The tree and excerpts support the main application, orchestrator, selected scan modules, and authentication storage; unsampled route wiring and persistence details are not expanded. The separate `web/` panel appears focused on attack-process controls, so it is represented only as a distinct interface branch.

Main entry points: [`app.py`](https://github.com/sollxfim-lab/emergens/blob/main/app.py) (Flask console), [`modules/analytic_manager.py`](https://github.com/sollxfim-lab/emergens/blob/main/modules/analytic_manager.py) (Analytic manager), [`modules`](https://github.com/sollxfim-lab/emergens/tree/main/modules) (Web vulnerability scans), [`auth/decorators.py`](https://github.com/sollxfim-lab/emergens/blob/main/auth/decorators.py) (Auth decorators)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Console entry"]
  node_flask["Flask console<br/>[app.py]"]
  node_webpanel["Attack panel API<br/>[app.py]"]
  node_webclient["Attack panel UI<br/>[app.js]"]
end

subgraph group_identity["Access control"]
  node_authdecorators["Auth decorators<br/>[decorators.py]"]
  node_userstore[("User store<br/>[user_store.py]")]
  node_tokenstore[("Token store<br/>[token_store.py]")]
end

subgraph group_scanning["Scan workflows"]
  node_orchestrator["Scan orchestrator"]
  node_recon["Recon modules"]
  node_webvuln["Web vulnerability scans"]
  node_tlsheaders["TLS and headers"]
  node_sqli["SQL injection engine<br/>[sqli_engine.py]"]
  node_scanhistory[("Scan history<br/>[history_store.py]")]
end

subgraph group_analysis["Analysis assistance"]
  node_analyticmanager["Analytic manager"]
  node_exploitrepo["Exploit repository"]
  node_bruteforce["Brute force<br/>[brute_force.py]"]
  node_aichat["AI chat handler<br/>[chat_handler.py]"]
end

node_user(("Security tester"))
node_anthropic["Anthropic API"]
node_flaresolverr["FlareSolverr"]

node_user -->|"submits scans"| node_flask
node_flask -->|"checks access"| node_authdecorators
node_authdecorators -->|"reads users"| node_userstore
node_authdecorators -->|"checks tokens"| node_tokenstore
node_flask -->|"dispatches jobs"| node_orchestrator
node_orchestrator -->|"runs tools"| node_recon
node_orchestrator -->|"runs tools"| node_webvuln
node_flask -->|"runs XSS scans"| node_webvuln
node_flask -->|"runs SQLi scans"| node_sqli
node_flask -->|"records scan history"| node_scanhistory
node_user -->|"uses panel"| node_webclient
node_webclient -->|"calls API"| node_webpanel
node_webpanel -->|"streams logs"| node_user
node_analyticmanager -->|"queries exploits"| node_exploitrepo
node_analyticmanager -->|"runs attacks"| node_bruteforce
node_analyticmanager -->|"runs scans"| node_sqli
node_analyticmanager -->|"runs XSS scans"| node_webvuln
node_flask -->|"handles chat"| node_aichat
node_aichat -.->|"requests replies"| node_anthropic
node_webvuln -.->|"uses bypass"| node_flaresolverr

click node_flask "https://github.com/sollxfim-lab/emergens/blob/main/app.py"
click node_webpanel "https://github.com/sollxfim-lab/emergens/blob/main/web/app.py"
click node_webclient "https://github.com/sollxfim-lab/emergens/blob/main/web/public/app.js"
click node_authdecorators "https://github.com/sollxfim-lab/emergens/blob/main/auth/decorators.py"
click node_userstore "https://github.com/sollxfim-lab/emergens/blob/main/auth/user_store.py"
click node_tokenstore "https://github.com/sollxfim-lab/emergens/blob/main/auth/token_store.py"
click node_orchestrator "https://github.com/sollxfim-lab/emergens/blob/main/modules/scan_orchestrator.py"
click node_recon "https://github.com/sollxfim-lab/emergens/tree/main/modules"
click node_webvuln "https://github.com/sollxfim-lab/emergens/tree/main/modules"
click node_tlsheaders "https://github.com/sollxfim-lab/emergens/tree/main/modules"
click node_sqli "https://github.com/sollxfim-lab/emergens/blob/main/modules/sqli_engine.py"
click node_analyticmanager "https://github.com/sollxfim-lab/emergens/blob/main/modules/analytic_manager.py"
click node_exploitrepo "https://github.com/sollxfim-lab/emergens/blob/main/modules/exploit_repository.py"
click node_bruteforce "https://github.com/sollxfim-lab/emergens/blob/main/modules/brute_force.py"
click node_aichat "https://github.com/sollxfim-lab/emergens/blob/main/ai_chat/chat_handler.py"
click node_scanhistory "https://github.com/sollxfim-lab/emergens/blob/main/core/history_store.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_flask,node_webpanel,node_webclient toneBlue
class node_authdecorators,node_userstore,node_tokenstore toneAmber
class node_orchestrator,node_recon,node_webvuln,node_tlsheaders,node_sqli,node_scanhistory,node_anthropic toneMint
class node_analyticmanager,node_exploitrepo,node_bruteforce,node_aichat toneRose
class node_user,node_flaresolverr toneIndigo
```

## Components

### Console entry

- [Flask console](https://github.com/sollxfim-lab/emergens/blob/main/app.py): `app.py`
- [Attack panel API](https://github.com/sollxfim-lab/emergens/blob/main/web/app.py): `web/app.py`
- [Attack panel UI](https://github.com/sollxfim-lab/emergens/blob/main/web/public/app.js): `web/public/app.js`

### Access control

- [Auth decorators](https://github.com/sollxfim-lab/emergens/blob/main/auth/decorators.py): `auth/decorators.py`
- [User store](https://github.com/sollxfim-lab/emergens/blob/main/auth/user_store.py): `auth/user_store.py`
- [Token store](https://github.com/sollxfim-lab/emergens/blob/main/auth/token_store.py): `auth/token_store.py`

### Scan workflows

- [Scan orchestrator](https://github.com/sollxfim-lab/emergens/blob/main/modules/scan_orchestrator.py): `modules/scan_orchestrator.py`
- [Recon modules](https://github.com/sollxfim-lab/emergens/tree/main/modules): `modules`
- [Web vulnerability scans](https://github.com/sollxfim-lab/emergens/tree/main/modules): `modules`
- [TLS and headers](https://github.com/sollxfim-lab/emergens/tree/main/modules): `modules`
- [SQL injection engine](https://github.com/sollxfim-lab/emergens/blob/main/modules/sqli_engine.py): `modules/sqli_engine.py`
- [Scan history](https://github.com/sollxfim-lab/emergens/blob/main/core/history_store.py): `core/history_store.py`

### Analysis assistance

- [Analytic manager](https://github.com/sollxfim-lab/emergens/blob/main/modules/analytic_manager.py): `modules/analytic_manager.py`
- [Exploit repository](https://github.com/sollxfim-lab/emergens/blob/main/modules/exploit_repository.py): `modules/exploit_repository.py`
- [Brute force](https://github.com/sollxfim-lab/emergens/blob/main/modules/brute_force.py): `modules/brute_force.py`
- [AI chat handler](https://github.com/sollxfim-lab/emergens/blob/main/ai_chat/chat_handler.py): `ai_chat/chat_handler.py`

### Other components

- **Security tester**
- **Anthropic API**
- **FlareSolverr**

## Connections

- Security tester → Flask console: submits scans
- Flask console → Auth decorators: checks access
- Auth decorators → User store: reads users
- Auth decorators → Token store: checks tokens
- Flask console → Scan orchestrator: dispatches jobs
- Scan orchestrator → Recon modules: runs tools
- Scan orchestrator → Web vulnerability scans: runs tools
- Flask console → Web vulnerability scans: runs XSS scans
- Flask console → SQL injection engine: runs SQLi scans
- Flask console → Scan history: records scan history
- Security tester → Attack panel UI: uses panel
- Attack panel UI → Attack panel API: calls API
- Attack panel API → Security tester: streams logs
- Analytic manager → Exploit repository: queries exploits
- Analytic manager → Brute force: runs attacks
- Analytic manager → SQL injection engine: runs scans
- Analytic manager → Web vulnerability scans: runs XSS scans
- Flask console → AI chat handler: handles chat
- AI chat handler → Anthropic API: requests replies
- Web vulnerability scans → FlareSolverr: uses bypass
