# f8fvwgzc/nexc-engine architecture

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

- Interactive diagram: https://gitdiagram.com/f8fvwgzc/nexc-engine
- Repository: https://github.com/f8fvwgzc/nexc-engine

## Overview

nexc-engine is a self-hosted visual LLM graph-engineering platform. A user sketches a graph in the browser, requests streamed LLM plan proposals, reviews and applies them, then starts a DAG run whose node outputs and artifacts can be collected. The backend exposes the API, persists domain state, schedules execution, and routes work to LLM providers, the Python agent runtime, or optional Symphony. README capabilities such as memory, collaboration, and security are retained as documented branches; links for unsampled implementations are dashed where wiring is not shown.

Main entry points: [`backend/src/engine/scheduler.rs`](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/scheduler.rs) (DAG scheduler), [`backend/src/app/router.rs`](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/app/router.rs) (HTTP API), [`agent-runtime/src/nexc_runtime/api/app.py`](https://github.com/f8fvwgzc/nexc-engine/blob/main/agent-runtime/src/nexc_runtime/api/app.py) (Agent runtime), [`backend/src/llm/service.rs`](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/llm/service.rs) (LLM service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser experience"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_graph_editor["Graph editor<br/>[canvas-engine.ts]"]
  node_graph_api["Graph API client<br/>[api.ts]"]
end

subgraph group_backend["Rust platform"]
  node_backend_api["HTTP API<br/>[router.rs]"]
  node_auth_security["Auth and security<br/>[auth.rs]"]
  node_planner["Plan refinement<br/>[planner.rs]"]
  node_scheduler["DAG scheduler<br/>[scheduler.rs]"]
  node_orchestrator["Agent orchestration<br/>[mod.rs]"]
  node_llm_service["LLM service<br/>[service.rs]"]
  node_providers["LLM providers<br/>[anthropic.rs]"]
  node_memory["Memory retrieval<br/>[mod.rs]"]
  node_artifacts["Artifacts<br/>[artifacts.rs]"]
end

subgraph group_execution["Execution services"]
  node_agent_runtime["Agent runtime<br/>[app.py]"]
  node_agent_tools["Agent tools"]
  node_symphony["Coding executor<br/>[symphony.rs]"]
end

subgraph group_data["Persistence and realtime"]
  node_postgres[("PostgreSQL")]
  node_repositories["Data repositories<br/>[agents.rs]"]
  node_realtime["Realtime events<br/>[events.rs]"]
end

node_user(("User"))
node_browser_llm(("LLM provider"))

node_user -->|"uses"| node_frontend
node_frontend -->|"renders"| node_graph_editor
node_graph_editor -.->|"edits graph"| node_graph_api
node_graph_api -.->|"HTTP requests"| node_backend_api
node_backend_api -.->|"authenticates"| node_auth_security
node_backend_api -.->|"routes plan requests"| node_planner
node_planner -.->|"requests completion"| node_llm_service
node_backend_api -.->|"starts runs"| node_scheduler
node_scheduler -.->|"assigns agents"| node_orchestrator
node_scheduler -->|"executes LLM nodes"| node_llm_service
node_llm_service -->|"dispatches"| node_providers
node_providers -.->|"calls provider"| node_browser_llm
node_scheduler -.->|"executes agent nodes"| node_agent_runtime
node_agent_runtime -.->|"runs tool loop"| node_agent_tools
node_agent_runtime -.->|"requests generation"| node_browser_llm
node_scheduler -.->|"dispatches coding"| node_symphony
node_scheduler -.->|"retrieves context"| node_memory
node_scheduler -.->|"collects outputs"| node_artifacts
node_backend_api -.->|"serves domain data"| node_repositories
node_repositories -.->|"reads and writes"| node_postgres
node_backend_api -.->|"streams updates"| node_realtime
node_realtime -.->|"fans out events"| node_postgres

click node_frontend "https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/app/App.tsx"
click node_graph_editor "https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/features/graph/canvas/canvas-engine.ts"
click node_graph_api "https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/features/graph/api.ts"
click node_backend_api "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/app/router.rs"
click node_auth_security "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/http/handlers/auth.rs"
click node_planner "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/planner.rs"
click node_scheduler "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/scheduler.rs"
click node_orchestrator "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/orchestrator/mod.rs"
click node_llm_service "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/llm/service.rs"
click node_providers "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/llm/anthropic.rs"
click node_memory "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/memory/mod.rs"
click node_artifacts "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/artifacts.rs"
click node_agent_runtime "https://github.com/f8fvwgzc/nexc-engine/blob/main/agent-runtime/src/nexc_runtime/api/app.py"
click node_agent_tools "https://github.com/f8fvwgzc/nexc-engine/tree/main/agent-runtime/src/nexc_runtime/tools"
click node_symphony "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/executor/symphony.rs"
click node_repositories "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/repo/agents.rs"
click node_realtime "https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/realtime/events.rs"

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_frontend,node_graph_editor,node_graph_api,node_user toneBlue
class node_backend_api,node_auth_security,node_planner,node_scheduler,node_orchestrator,node_llm_service,node_providers,node_memory,node_artifacts toneAmber
class node_agent_runtime,node_agent_tools,node_symphony toneMint
class node_postgres,node_repositories,node_realtime toneRose
class node_browser_llm toneIndigo
```

## Components

### Browser experience

- [Web application](https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Graph editor](https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/features/graph/canvas/canvas-engine.ts): `frontend/src/features/graph/canvas/canvas-engine.ts`
- [Graph API client](https://github.com/f8fvwgzc/nexc-engine/blob/main/frontend/src/features/graph/api.ts): `frontend/src/features/graph/api.ts`

### Rust platform

- [HTTP API](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/app/router.rs): `backend/src/app/router.rs`
- [Auth and security](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/http/handlers/auth.rs): `backend/src/http/handlers/auth.rs`
- [Plan refinement](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/planner.rs): `backend/src/engine/planner.rs`
- [DAG scheduler](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/scheduler.rs): `backend/src/engine/scheduler.rs`
- [Agent orchestration](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/orchestrator/mod.rs): `backend/src/orchestrator/mod.rs`
- [LLM service](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/llm/service.rs): `backend/src/llm/service.rs`
- [LLM providers](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/llm/anthropic.rs): `backend/src/llm/anthropic.rs`
- [Memory retrieval](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/memory/mod.rs): `backend/src/memory/mod.rs`
- [Artifacts](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/artifacts.rs): `backend/src/engine/artifacts.rs`

### Execution services

- [Agent runtime](https://github.com/f8fvwgzc/nexc-engine/blob/main/agent-runtime/src/nexc_runtime/api/app.py): `agent-runtime/src/nexc_runtime/api/app.py`
- [Agent tools](https://github.com/f8fvwgzc/nexc-engine/tree/main/agent-runtime/src/nexc_runtime/tools): `agent-runtime/src/nexc_runtime/tools`
- [Coding executor](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/engine/executor/symphony.rs): `backend/src/engine/executor/symphony.rs`

### Persistence and realtime

- **PostgreSQL**
- [Data repositories](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/repo/agents.rs): `backend/src/repo/agents.rs`
- [Realtime events](https://github.com/f8fvwgzc/nexc-engine/blob/main/backend/src/realtime/events.rs): `backend/src/realtime/events.rs`

### Other components

- **User**
- **LLM provider**

## Connections

- User → Web application: uses
- Web application → Graph editor: renders (evidence: `frontend/src/app/App.tsx`)
- Graph editor → Graph API client: edits graph
- Graph API client → HTTP API: HTTP requests
- HTTP API → Auth and security: authenticates
- HTTP API → Plan refinement: routes plan requests
- Plan refinement → LLM service: requests completion
- HTTP API → DAG scheduler: starts runs
- DAG scheduler → Agent orchestration: assigns agents
- DAG scheduler → LLM service: executes LLM nodes
- LLM service → LLM providers: dispatches (evidence: `backend/src/llm/mod.rs`)
- LLM providers → LLM provider: calls provider
- DAG scheduler → Agent runtime: executes agent nodes
- Agent runtime → Agent tools: runs tool loop
- Agent runtime → LLM provider: requests generation
- DAG scheduler → Coding executor: dispatches coding
- DAG scheduler → Memory retrieval: retrieves context
- DAG scheduler → Artifacts: collects outputs
- HTTP API → Data repositories: serves domain data
- Data repositories → PostgreSQL: reads and writes
- HTTP API → Realtime events: streams updates
- Realtime events → PostgreSQL: fans out events
