# raghavnaidu1470-dotcom/automind-ai architecture

> Architecture diagram of the GitHub repository raghavnaidu1470-dotcom/automind-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raghavnaidu1470-dotcom/automind-ai
- Repository: https://github.com/raghavnaidu1470-dotcom/automind-ai

## Overview

AutoMind AI takes regexes and candidate strings through a React dashboard into a FastAPI API, which builds NFA/DFA/minimized-DFA automata and returns simulation traces for visualization. Separate branches provide XAI predictions and attributions, and ReDoS ambiguity screening, empirical validation, and language-preserving repair. The graph retains documented dashboard, model, and repair capabilities, but some backend route/service wiring and ReDoS internals were not excerpted; uncertain connections are omitted rather than inferred.

Main entry points: [`frontend/src/pages/Dashboard.jsx`](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/pages/Dashboard.jsx) (Dashboard), [`backend/automata_engine/engine.py`](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/engine.py) (Automata facade), [`backend/api/main.py`](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/main.py) (FastAPI entry), [`backend/api/routes/redos.py`](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/redos.py) (ReDoS routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_regexui["Regex input<br/>[RegexInput.jsx]"]
  node_viewer["Automata viewer<br/>[AutomataViewer.jsx]"]
  node_stepper["Execution stepper"]
  node_xaiui["XAI panel"]
  node_redosui["ReDoS panel"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API orchestration"]
  node_api_entry["FastAPI entry<br/>[main.py]"]
  node_automata_route["Automata routes<br/>[automata.py]"]
  node_simulation_route["Simulation routes<br/>[simulation.py]"]
  node_xai_route["XAI routes<br/>[xai.py]"]
  node_redos_route["ReDoS routes<br/>[redos.py]"]
  node_automata_service["Automata service"]
  node_simulation_service["Simulation service"]
  node_xai_service["XAI service<br/>[xai_service.py]"]
  node_storage[("Run storage<br/>[storage_service.py]")]
end

subgraph group_automata["Automata analysis"]
  node_models["Automaton models<br/>[models.py]"]
  node_engine["Automata facade<br/>[engine.py]"]
  node_parser["Regex parser<br/>[parser.py]"]
  node_nfa["Thompson builder<br/>[builder.py]"]
  node_dfa["Subset converter<br/>[converter.py]"]
  node_minimizer["DFA minimizer<br/>[minimizer.py]"]
  node_simulator["Trace simulator<br/>[simulator.py]"]
end

subgraph group_xai["Explainable AI"]
  node_xai_pipeline["XAI pipeline<br/>[pipeline.py]"]
  node_graph_builder["Graph converter<br/>[converter.py]"]
  node_gnn["GNN classifier<br/>[model.py]"]
  node_gnn_explainer["GNNExplainer<br/>[explainer.py]"]
  node_shap["SHAP explainer<br/>[explainer.py]"]
end

subgraph group_redos["ReDoS Guard"]
  node_redos_analyzer["Ambiguity analyzer<br/>[analyzer.py]"]
  node_redos_explainer["Risk explainer<br/>[explainer.py]"]
  node_redos_gnn["Risk GNN<br/>[model.py]"]
  node_redos_features["Risk features"]
  node_redos_data["Risk dataset<br/>[dataset.py]"]
end

node_user(("Analyst"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"requests"| node_api_client
node_dashboard -->|"renders"| node_regexui
node_dashboard -->|"renders"| node_viewer
node_dashboard -->|"renders"| node_stepper
node_dashboard -->|"renders"| node_xaiui
node_dashboard -->|"renders"| node_redosui
node_api_client -->|"REST requests"| node_api_entry
node_api_entry -->|"registers"| node_automata_route
node_api_entry -->|"registers"| node_simulation_route
node_api_entry -->|"registers"| node_xai_route
node_api_entry -->|"registers"| node_redos_route
node_automata_route -->|"delegates"| node_automata_service
node_automata_route -->|"reads samples"| node_storage
node_automata_service -->|"builds automata"| node_engine
node_engine -->|"parses"| node_parser
node_engine -->|"builds NFA"| node_nfa
node_engine -->|"converts"| node_dfa
node_engine -->|"minimizes"| node_minimizer
node_engine -->|"returns models"| node_models
node_simulation_route -->|"delegates"| node_simulation_service
node_simulation_service -->|"runs input"| node_simulator
node_simulator -->|"returns trace"| node_models
node_xai_route -->|"delegates"| node_xai_service
node_xai_service -->|"generates trace"| node_simulation_service
node_xai_service -->|"requests explanation"| node_xai_pipeline
node_xai_pipeline -->|"converts graph"| node_graph_builder
node_xai_pipeline -->|"predicts"| node_gnn
node_xai_pipeline -->|"explains graph"| node_gnn_explainer
node_xai_pipeline -->|"computes attributions"| node_shap
node_redos_route -->|"analyzes ambiguity"| node_redos_analyzer
node_redos_route -->|"gets explanation"| node_redos_explainer
node_redos_route -.->|"screens risk"| node_redos_gnn
node_redos_route -.->|"persists runs"| node_storage
node_redos_data -->|"labels examples"| node_redos_analyzer
node_redos_features -->|"extracts features"| node_models
node_redos_data -.->|"prepares graph data"| node_redos_features
node_redosui -->|"calls API"| node_api_client

click node_dashboard "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/pages/Dashboard.jsx"
click node_regexui "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/RegexInput.jsx"
click node_viewer "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/AutomataViewer.jsx"
click node_stepper "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/ExecutionStepper.jsx"
click node_xaiui "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/XAIExplanationPanel.jsx"
click node_redosui "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/ReDoSGuardPanel.jsx"
click node_api_client "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/services/api.js"
click node_api_entry "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/main.py"
click node_automata_route "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/automata.py"
click node_simulation_route "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/simulation.py"
click node_xai_route "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/xai.py"
click node_redos_route "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/redos.py"
click node_automata_service "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/automata_service.py"
click node_simulation_service "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/simulation_service.py"
click node_xai_service "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/xai_service.py"
click node_storage "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/storage_service.py"
click node_models "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/models.py"
click node_engine "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/engine.py"
click node_parser "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/regex_parser/parser.py"
click node_nfa "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/nfa_builder/builder.py"
click node_dfa "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/dfa_converter/converter.py"
click node_minimizer "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/dfa_minimizer/minimizer.py"
click node_simulator "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/simulator/simulator.py"
click node_xai_pipeline "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/pipeline.py"
click node_graph_builder "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/graph_builder/converter.py"
click node_gnn "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/gnn_model/model.py"
click node_gnn_explainer "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/gnn_explainer/explainer.py"
click node_shap "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/shap_explainer/explainer.py"
click node_redos_analyzer "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/analyzer.py"
click node_redos_explainer "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/explainer.py"
click node_redos_gnn "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/model.py"
click node_redos_features "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/feature_extractor.py"
click node_redos_data "https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/dataset.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_dashboard,node_regexui,node_viewer,node_stepper,node_xaiui,node_redosui,node_api_client toneBlue
class node_api_entry,node_automata_route,node_simulation_route,node_xai_route,node_redos_route,node_automata_service,node_simulation_service,node_xai_service,node_storage toneAmber
class node_models,node_engine,node_parser,node_nfa,node_dfa,node_minimizer,node_simulator toneMint
class node_xai_pipeline,node_graph_builder,node_gnn,node_gnn_explainer,node_shap toneRose
class node_redos_analyzer,node_redos_explainer,node_redos_gnn,node_redos_features,node_redos_data,node_user toneIndigo
```

## Components

### Dashboard

- [Dashboard](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Regex input](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/RegexInput.jsx): `frontend/src/components/RegexInput.jsx`
- [Automata viewer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/AutomataViewer.jsx): `frontend/src/components/AutomataViewer.jsx`
- [Execution stepper](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/ExecutionStepper.jsx): `frontend/src/components/ExecutionStepper.jsx`
- [XAI panel](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/XAIExplanationPanel.jsx): `frontend/src/components/XAIExplanationPanel.jsx`
- [ReDoS panel](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/components/ReDoSGuardPanel.jsx): `frontend/src/components/ReDoSGuardPanel.jsx`
- [API client](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API orchestration

- [FastAPI entry](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/main.py): `backend/api/main.py`
- [Automata routes](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/automata.py): `backend/api/routes/automata.py`
- [Simulation routes](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/simulation.py): `backend/api/routes/simulation.py`
- [XAI routes](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/xai.py): `backend/api/routes/xai.py`
- [ReDoS routes](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/routes/redos.py): `backend/api/routes/redos.py`
- [Automata service](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/automata_service.py): `backend/api/services/automata_service.py`
- [Simulation service](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/simulation_service.py): `backend/api/services/simulation_service.py`
- [XAI service](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/xai_service.py): `backend/api/services/xai_service.py`
- [Run storage](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/api/services/storage_service.py): `backend/api/services/storage_service.py`

### Automata analysis

- [Automaton models](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/models.py): `backend/automata_engine/models.py`
- [Automata facade](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/engine.py): `backend/automata_engine/engine.py`
- [Regex parser](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/regex_parser/parser.py): `backend/automata_engine/regex_parser/parser.py`
- [Thompson builder](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/nfa_builder/builder.py): `backend/automata_engine/nfa_builder/builder.py`
- [Subset converter](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/dfa_converter/converter.py): `backend/automata_engine/dfa_converter/converter.py`
- [DFA minimizer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/dfa_minimizer/minimizer.py): `backend/automata_engine/dfa_minimizer/minimizer.py`
- [Trace simulator](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/automata_engine/simulator/simulator.py): `backend/automata_engine/simulator/simulator.py`

### Explainable AI

- [XAI pipeline](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/pipeline.py): `backend/xai_engine/pipeline.py`
- [Graph converter](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/graph_builder/converter.py): `backend/xai_engine/graph_builder/converter.py`
- [GNN classifier](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/gnn_model/model.py): `backend/xai_engine/gnn_model/model.py`
- [GNNExplainer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/gnn_explainer/explainer.py): `backend/xai_engine/gnn_explainer/explainer.py`
- [SHAP explainer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/xai_engine/shap_explainer/explainer.py): `backend/xai_engine/shap_explainer/explainer.py`

### ReDoS Guard

- [Ambiguity analyzer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/analyzer.py): `backend/redos_guard/analyzer.py`
- [Risk explainer](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/explainer.py): `backend/redos_guard/explainer.py`
- [Risk GNN](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/model.py): `backend/redos_guard/gnn/model.py`
- [Risk features](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/feature_extractor.py): `backend/redos_guard/gnn/feature_extractor.py`
- [Risk dataset](https://github.com/raghavnaidu1470-dotcom/automind-ai/blob/main/backend/redos_guard/gnn/dataset.py): `backend/redos_guard/gnn/dataset.py`

### Other components

- **Analyst**

## Connections

- Analyst → Dashboard: uses (evidence: `README.md`)
- Dashboard → API client: requests (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → Regex input: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → Automata viewer: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → Execution stepper: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → XAI panel: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → ReDoS panel: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- API client → FastAPI entry: REST requests (evidence: `README.md`)
- FastAPI entry → Automata routes: registers (evidence: `backend/api/main.py`)
- FastAPI entry → Simulation routes: registers (evidence: `backend/api/main.py`)
- FastAPI entry → XAI routes: registers (evidence: `backend/api/main.py`)
- FastAPI entry → ReDoS routes: registers (evidence: `backend/api/main.py`)
- Automata routes → Automata service: delegates (evidence: `backend/api/routes/automata.py`)
- Automata routes → Run storage: reads samples (evidence: `backend/api/routes/automata.py`)
- Automata service → Automata facade: builds automata (evidence: `backend/api/services/automata_service.py`)
- Automata facade → Regex parser: parses (evidence: `backend/automata_engine/engine.py`)
- Automata facade → Thompson builder: builds NFA (evidence: `backend/automata_engine/engine.py`)
- Automata facade → Subset converter: converts (evidence: `backend/automata_engine/engine.py`)
- Automata facade → DFA minimizer: minimizes (evidence: `backend/automata_engine/engine.py`)
- Automata facade → Automaton models: returns models (evidence: `backend/automata_engine/engine.py`)
- Simulation routes → Simulation service: delegates (evidence: `backend/api/routes/simulation.py`)
- Simulation service → Trace simulator: runs input (evidence: `backend/api/services/simulation_service.py`)
- Trace simulator → Automaton models: returns trace (evidence: `backend/automata_engine/simulator/simulator.py`)
- XAI routes → XAI service: delegates (evidence: `backend/api/routes/xai.py`)
- XAI service → Simulation service: generates trace (evidence: `backend/api/services/xai_service.py`)
- XAI service → XAI pipeline: requests explanation (evidence: `backend/api/services/xai_service.py`)
- XAI pipeline → Graph converter: converts graph (evidence: `backend/xai_engine/pipeline.py`)
- XAI pipeline → GNN classifier: predicts (evidence: `backend/xai_engine/pipeline.py`)
- XAI pipeline → GNNExplainer: explains graph (evidence: `backend/xai_engine/pipeline.py`)
- XAI pipeline → SHAP explainer: computes attributions (evidence: `backend/xai_engine/pipeline.py`)
- ReDoS routes → Ambiguity analyzer: analyzes ambiguity (evidence: `backend/api/routes/redos.py`)
- ReDoS routes → Risk explainer: gets explanation (evidence: `backend/api/routes/redos.py`)
- ReDoS routes → Risk GNN: screens risk
- ReDoS routes → Run storage: persists runs
- Risk dataset → Ambiguity analyzer: labels examples (evidence: `backend/redos_guard/gnn/dataset.py`)
- Risk features → Automaton models: extracts features (evidence: `backend/redos_guard/gnn/feature_extractor.py`)
- Risk dataset → Risk features: prepares graph data
- ReDoS panel → API client: calls API (evidence: `frontend/src/components/ReDoSGuardPanel.jsx`)
