# joshuasolomonp7-cloud/hacknexhft architecture

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

- Interactive diagram: https://gitdiagram.com/joshuasolomonp7-cloud/hacknexhft
- Repository: https://github.com/joshuasolomonp7-cloud/hacknexhft

## Overview

CodeNexus is an AI-assisted software repair workbench. Users provide or clone a code workspace, inspect defects, and run an agent workflow intended to localize failures, apply a targeted patch, verify it, and report evidence. The graph includes the documented analysis, patching, verification, benchmark, and safety capabilities, plus the React workbench and workspace tools. Some core implementation files were not sampled; their internal call relationships are therefore omitted or left unverified rather than inferred.

Main entry points: [`backend/main.py`](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/main.py) (Backend API), [`backend/core/agent.py`](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/agent.py) (Repair Agent), [`frontend/src/App.tsx`](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/App.tsx) (React Workbench), [`frontend/src/components/UploadWorkspaceModal.tsx`](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/components/UploadWorkspaceModal.tsx) (Workspace Upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbench["Repair Workbench"]
  node_webapp["React Workbench<br/>[App.tsx]"]
  node_workbench_panels["Workbench Panels"]
  node_upload["Workspace Upload"]
  node_github["Git Clone"]
end

subgraph group_api["Workspace API"]
  node_backend_api["Backend API<br/>[main.py]"]
  node_workspace_tools["Workspace Tools<br/>[workspace_tools.py]"]
end

subgraph group_repair["Repair Engine"]
  node_agent["Repair Agent<br/>[agent.py]"]
  node_bug_tracker["Bug Lifecycle<br/>[bug_tracker.py]"]
  node_inspection["Adaptive Inspection"]
  node_ast_engine["AST &amp; Dependency Engine<br/>[ast_engine.py]"]
  node_patching["Transactional Patching<br/>[patch_engine.py]"]
  node_git_snapshots["Git Snapshots<br/>[git_sandbox.py]"]
end

subgraph group_verification["Verification &amp; Safety"]
  node_error_parser["Polyglot Error Parser"]
  node_verification_pipeline["Verification Pipeline"]
  node_sandbox_security["Workspace Security"]
end

subgraph group_benchmark["Benchmarks"]
  node_benchmark_runner["Benchmark &amp; Mutation Runner"]
end

node_engineer(("Engineer"))

node_engineer -->|"uses"| node_webapp
node_webapp -->|"renders"| node_workbench_panels
node_webapp -->|"opens"| node_upload
node_webapp -->|"opens"| node_github
node_upload -->|"uploads workspace"| node_backend_api
node_github -.->|"clones repository"| node_backend_api
node_backend_api -->|"lists and reads files"| node_workspace_tools
node_backend_api -->|"runs tests"| node_workspace_tools
node_backend_api -->|"indexes symbols"| node_ast_engine
node_backend_api -->|"runs benchmarks"| node_benchmark_runner
node_backend_api -.->|"dispatches repair"| node_agent
node_agent -.->|"tracks defects"| node_bug_tracker
node_agent -.->|"localizes failures"| node_inspection
node_inspection -->|"queries symbols"| node_ast_engine
node_agent -.->|"plans and applies patches"| node_patching
node_patching -.->|"snapshots and rolls back"| node_git_snapshots
node_agent -.->|"verifies repair"| node_verification_pipeline
node_verification_pipeline -->|"parses failures"| node_error_parser
node_agent -.->|"uses workspace safeguards"| node_sandbox_security
node_benchmark_runner -.->|"returns benchmark results"| node_backend_api

click node_webapp "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/App.tsx"
click node_workbench_panels "https://github.com/joshuasolomonp7-cloud/hacknexhft/tree/main/frontend/src/components"
click node_upload "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/components/UploadWorkspaceModal.tsx"
click node_github "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/components/GitHubCloneModal.tsx"
click node_backend_api "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/main.py"
click node_workspace_tools "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/tools/workspace_tools.py"
click node_agent "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/agent.py"
click node_bug_tracker "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/bug_tracker.py"
click node_inspection "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/inspection_engine.py"
click node_ast_engine "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/ast_engine.py"
click node_patching "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/patch_engine.py"
click node_git_snapshots "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/git_sandbox.py"
click node_error_parser "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/polyglot_error_parser.py"
click node_verification_pipeline "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/verification_pipeline.py"
click node_sandbox_security "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/sandbox_security.py"
click node_benchmark_runner "https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/benchmark_runner.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_webapp,node_workbench_panels,node_upload,node_github toneBlue
class node_backend_api,node_workspace_tools toneAmber
class node_agent,node_bug_tracker,node_inspection,node_ast_engine,node_patching,node_git_snapshots toneMint
class node_error_parser,node_verification_pipeline,node_sandbox_security toneRose
class node_benchmark_runner,node_engineer toneIndigo
```

## Components

### Repair Workbench

- [React Workbench](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Workbench Panels](https://github.com/joshuasolomonp7-cloud/hacknexhft/tree/main/frontend/src/components): `frontend/src/components`
- [Workspace Upload](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/components/UploadWorkspaceModal.tsx): `frontend/src/components/UploadWorkspaceModal.tsx`
- [Git Clone](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/frontend/src/components/GitHubCloneModal.tsx): `frontend/src/components/GitHubCloneModal.tsx`

### Workspace API

- [Backend API](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/main.py): `backend/main.py`
- [Workspace Tools](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/tools/workspace_tools.py): `backend/tools/workspace_tools.py`

### Repair Engine

- [Repair Agent](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/agent.py): `backend/core/agent.py`
- [Bug Lifecycle](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/bug_tracker.py): `backend/core/bug_tracker.py`
- [Adaptive Inspection](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/inspection_engine.py): `backend/core/inspection_engine.py`
- [AST & Dependency Engine](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/ast_engine.py): `backend/core/ast_engine.py`
- [Transactional Patching](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/patch_engine.py): `backend/core/patch_engine.py`
- [Git Snapshots](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/git_sandbox.py): `backend/core/git_sandbox.py`

### Verification & Safety

- [Polyglot Error Parser](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/polyglot_error_parser.py): `backend/core/polyglot_error_parser.py`
- [Verification Pipeline](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/verification_pipeline.py): `backend/core/verification_pipeline.py`
- [Workspace Security](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/sandbox_security.py): `backend/core/sandbox_security.py`

### Benchmarks

- [Benchmark & Mutation Runner](https://github.com/joshuasolomonp7-cloud/hacknexhft/blob/main/backend/core/benchmark_runner.py): `backend/core/benchmark_runner.py`

### Other components

- **Engineer**

## Connections

- Engineer → React Workbench: uses
- React Workbench → Workbench Panels: renders (evidence: `frontend/src/App.tsx`)
- React Workbench → Workspace Upload: opens (evidence: `frontend/src/App.tsx`)
- React Workbench → Git Clone: opens (evidence: `frontend/src/App.tsx`)
- Workspace Upload → Backend API: uploads workspace (evidence: `frontend/src/components/UploadWorkspaceModal.tsx`)
- Git Clone → Backend API: clones repository
- Backend API → Workspace Tools: lists and reads files (evidence: `backend/main.py`)
- Backend API → Workspace Tools: runs tests (evidence: `backend/main.py`)
- Backend API → AST & Dependency Engine: indexes symbols (evidence: `backend/main.py`)
- Backend API → Benchmark & Mutation Runner: runs benchmarks (evidence: `backend/main.py`)
- Backend API → Repair Agent: dispatches repair (evidence: `backend/main.py`)
- Repair Agent → Bug Lifecycle: tracks defects
- Repair Agent → Adaptive Inspection: localizes failures
- Adaptive Inspection → AST & Dependency Engine: queries symbols (evidence: `backend/core/inspection_engine.py`)
- Repair Agent → Transactional Patching: plans and applies patches
- Transactional Patching → Git Snapshots: snapshots and rolls back
- Repair Agent → Verification Pipeline: verifies repair
- Verification Pipeline → Polyglot Error Parser: parses failures (evidence: `backend/core/verification_pipeline.py`)
- Repair Agent → Workspace Security: uses workspace safeguards
- Benchmark & Mutation Runner → Backend API: returns benchmark results (evidence: `backend/main.py`)
