# narender-rk10/archflow architecture

> Architecture diagram of the GitHub repository narender-rk10/archflow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/narender-rk10/archflow
- Repository: https://github.com/narender-rk10/archflow

## Overview

ArchFlow is a collaborative system-design platform: users turn ideas and requirements into a structured architecture, refine and validate it with AI and teammates, then analyze existing code or hand changes to coding agents through OpenSpec. The graph emphasizes that workflow and the major documented branches. Source excerpts are partial, so some subsystem links rely on README statements; unsampled implementation details are not inferred.

Main entry points: [`backend/archflow/main.py`](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/main.py) (HTTP and WebSocket API), [`frontend/src/components/Workspace.tsx`](https://github.com/narender-rk10/archflow/blob/main/frontend/src/components/Workspace.tsx) (Architecture workspace), [`backend/archflow/chat.py`](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/chat.py) (AI design assistant), [`backend/archflow/ops.py`](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/ops.py) (Validated operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Product experience"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_workspace["Architecture workspace<br/>[Workspace.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_design["Design and intelligence"]
  node_requirements["Requirements and intake<br/>[intake.py]"]
  node_project_model["Versioned project model<br/>[models.py]"]
  node_operation_pipeline["Validated operations<br/>[ops.py]"]
  node_design_chat["AI design assistant<br/>[chat.py]"]
  node_ai_runtime["AI orchestration<br/>[ai.py]"]
  node_llm_gateway["LLM gateway<br/>[llm.py]"]
  node_architecture_review["Health and traceability<br/>[analysis.py]"]
  node_checklists["Architecture checklists<br/>[checklists.py]"]
  node_lld["Low-level design<br/>[lld.py]"]
end

subgraph group_delivery["Analysis and delivery"]
  node_code_analysis["Repository analysis<br/>[service.py]"]
  node_change_specs["OpenSpec changes"]
  node_exports["Generation and exports<br/>[exports.py]"]
  node_diagram_renderer["Diagram rendering<br/>[routing.mjs]"]
end

subgraph group_platform["Collaboration and platform"]
  node_api["HTTP and WebSocket API<br/>[main.py]"]
  node_persistence[("Project persistence<br/>[store.py]")]
  node_collab_server["Live collaboration<br/>[server.ts]"]
  node_accounts["Identity and access<br/>[accounts.py]"]
end

node_user(("Designer or agent"))

node_user -->|"uses"| node_frontend
node_frontend -->|"opens workspace"| node_workspace
node_workspace -->|"requests data"| node_api_client
node_api_client -->|"calls API"| node_api
node_api -->|"authenticates"| node_accounts
node_api -.->|"routes intake"| node_requirements
node_api -.->|"commits changes"| node_operation_pipeline
node_operation_pipeline -->|"updates model"| node_project_model
node_api -.->|"reads and writes"| node_persistence
node_design_chat -->|"requests AI"| node_ai_runtime
node_ai_runtime -.->|"generates responses"| node_llm_gateway
node_design_chat -->|"proposes edits"| node_operation_pipeline
node_design_chat -->|"reviews options"| node_architecture_review
node_architecture_review -->|"checks coverage"| node_checklists
node_workspace -->|"syncs live"| node_collab_server
node_collab_server -->|"stores projection"| node_api
node_api -->|"routes analysis"| node_code_analysis
node_api -->|"routes changes"| node_change_specs
node_change_specs -->|"uses generation"| node_exports
node_workspace -->|"requests internals"| node_lld
node_workspace -->|"renders diagrams"| node_diagram_renderer
node_workspace -->|"requests exports"| node_exports

click node_frontend "https://github.com/narender-rk10/archflow/blob/main/frontend/src/App.tsx"
click node_workspace "https://github.com/narender-rk10/archflow/blob/main/frontend/src/components/Workspace.tsx"
click node_api_client "https://github.com/narender-rk10/archflow/blob/main/frontend/src/api.ts"
click node_api "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/main.py"
click node_requirements "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/intake.py"
click node_project_model "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/models.py"
click node_operation_pipeline "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/ops.py"
click node_design_chat "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/chat.py"
click node_ai_runtime "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/ai.py"
click node_llm_gateway "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/llm.py"
click node_architecture_review "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/analysis.py"
click node_checklists "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/checklists.py"
click node_lld "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/lld.py"
click node_persistence "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/store.py"
click node_collab_server "https://github.com/narender-rk10/archflow/blob/main/collab/src/server.ts"
click node_code_analysis "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/codegraph/service.py"
click node_change_specs "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/openspec_service.py"
click node_exports "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/exports.py"
click node_diagram_renderer "https://github.com/narender-rk10/archflow/blob/main/backend/renderer/renderers/architecture/routing.mjs"
click node_accounts "https://github.com/narender-rk10/archflow/blob/main/backend/archflow/accounts.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_frontend,node_workspace,node_api_client toneBlue
class node_requirements,node_project_model,node_operation_pipeline,node_design_chat,node_ai_runtime,node_llm_gateway,node_architecture_review,node_checklists,node_lld toneAmber
class node_code_analysis,node_change_specs,node_exports,node_diagram_renderer toneMint
class node_api,node_persistence,node_collab_server,node_accounts toneRose
class node_user toneIndigo
```

## Components

### Product experience

- [Web application](https://github.com/narender-rk10/archflow/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Architecture workspace](https://github.com/narender-rk10/archflow/blob/main/frontend/src/components/Workspace.tsx): `frontend/src/components/Workspace.tsx`
- [API client](https://github.com/narender-rk10/archflow/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### Design and intelligence

- [Requirements and intake](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/intake.py): `backend/archflow/intake.py`
- [Versioned project model](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/models.py): `backend/archflow/models.py`
- [Validated operations](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/ops.py): `backend/archflow/ops.py`
- [AI design assistant](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/chat.py): `backend/archflow/chat.py`
- [AI orchestration](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/ai.py): `backend/archflow/ai.py`
- [LLM gateway](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/llm.py): `backend/archflow/llm.py`
- [Health and traceability](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/analysis.py): `backend/archflow/analysis.py`
- [Architecture checklists](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/checklists.py): `backend/archflow/checklists.py`
- [Low-level design](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/lld.py): `backend/archflow/lld.py`

### Analysis and delivery

- [Repository analysis](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/codegraph/service.py): `backend/archflow/codegraph/service.py`
- [OpenSpec changes](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/openspec_service.py): `backend/archflow/openspec_service.py`
- [Generation and exports](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/exports.py): `backend/archflow/exports.py`
- [Diagram rendering](https://github.com/narender-rk10/archflow/blob/main/backend/renderer/renderers/architecture/routing.mjs): `backend/renderer/renderers/architecture/routing.mjs`

### Collaboration and platform

- [HTTP and WebSocket API](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/main.py): `backend/archflow/main.py`
- [Project persistence](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/store.py): `backend/archflow/store.py`
- [Live collaboration](https://github.com/narender-rk10/archflow/blob/main/collab/src/server.ts): `collab/src/server.ts`
- [Identity and access](https://github.com/narender-rk10/archflow/blob/main/backend/archflow/accounts.py): `backend/archflow/accounts.py`

### Other components

- **Designer or agent**

## Connections

- Designer or agent → Web application: uses
- Web application → Architecture workspace: opens workspace (evidence: `frontend/src/App.tsx`)
- Architecture workspace → API client: requests data (evidence: `frontend/src/components/Workspace.tsx`)
- API client → HTTP and WebSocket API: calls API
- HTTP and WebSocket API → Identity and access: authenticates (evidence: `backend/archflow/main.py`)
- HTTP and WebSocket API → Requirements and intake: routes intake (evidence: `backend/archflow/main.py`)
- HTTP and WebSocket API → Validated operations: commits changes
- Validated operations → Versioned project model: updates model (evidence: `backend/archflow/models.py`)
- HTTP and WebSocket API → Project persistence: reads and writes
- AI design assistant → AI orchestration: requests AI (evidence: `backend/archflow/chat.py`)
- AI orchestration → LLM gateway: generates responses
- AI design assistant → Validated operations: proposes edits (evidence: `backend/archflow/chat.py`)
- AI design assistant → Health and traceability: reviews options (evidence: `backend/archflow/option_review.py`)
- Health and traceability → Architecture checklists: checks coverage (evidence: `backend/archflow/analysis.py`)
- Architecture workspace → Live collaboration: syncs live
- Live collaboration → HTTP and WebSocket API: stores projection (evidence: `collab/src/server.ts`)
- HTTP and WebSocket API → Repository analysis: routes analysis (evidence: `backend/archflow/codegraph/service.py`)
- HTTP and WebSocket API → OpenSpec changes: routes changes (evidence: `backend/archflow/main.py`)
- OpenSpec changes → Generation and exports: uses generation (evidence: `backend/archflow/openspec_service.py`)
- Architecture workspace → Low-level design: requests internals
- Architecture workspace → Diagram rendering: renders diagrams
- Architecture workspace → Generation and exports: requests exports
