# cyrivea/neyria architecture

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

- Interactive diagram: https://gitdiagram.com/cyrivea/neyria
- Repository: https://github.com/cyrivea/neyria

## Overview

Neyria is a platform-hosted AI creation workspace. Users enter through the Vue workstation to chat with a streaming assistant, use creative capabilities, manage project knowledge, and edit or run workflows; the FastAPI backend coordinates these requests while keeping model credentials server-side. Supporting product branches include authentication, billing, durable jobs, and project assets. The graph combines documented product behavior with the sampled source and SOURCE INDEX; some subsystem connections are documented rather than directly shown in excerpts.

Main entry points: [`backend/main.py`](https://github.com/cyrivea/neyria/blob/main/backend/main.py) (FastAPI API), [`backend/services/chat/chat_orchestrator.py`](https://github.com/cyrivea/neyria/blob/main/backend/services/chat/chat_orchestrator.py) (ReAct orchestrator), [`backend/services/rag/service.py`](https://github.com/cyrivea/neyria/blob/main/backend/services/rag/service.py) (Project RAG), [`backend/routers/assistant.py`](https://github.com/cyrivea/neyria/blob/main/backend/routers/assistant.py) (Assistant endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workspace UI"]
  node_workstation["Vue workstation<br/>[Workstation.vue]"]
  node_assistant_ui["Assistant panel<br/>[AssistantPanel.vue]"]
  node_chat_client["Chat client<br/>[useAgentChat.ts]"]
  node_workflow_ui["Workflow canvas<br/>[WorkflowCanvas.vue]"]
end

subgraph group_conversation["Assistant"]
  node_assistant_route["Assistant endpoint<br/>[assistant.py]"]
  node_orchestrator["ReAct orchestrator"]
  node_context["Context builder<br/>[context_builder.py]"]
  node_intent["Intent classifier"]
  node_tool_executor["Tool executor<br/>[tool_executor.py]"]
  node_chat_store[("Chat history<br/>[chat_repo.py]")]
end

subgraph group_creation["Creation and workflows"]
  node_capability_api["Capability endpoint<br/>[capabilities.py]"]
  node_capability_runtime["Capability runtime<br/>[runtime.py]"]
  node_providers["Model providers"]
  node_workflow_api["Workflow endpoint<br/>[workflows.py]"]
  node_workflow_service["Workflow runner"]
end

subgraph group_knowledge["Knowledge and jobs"]
  node_project_service["Projects and assets<br/>[project_service.py]"]
  node_rag_service["Project RAG<br/>[service.py]"]
  node_job_service["Job service<br/>[job_service.py]"]
  node_worker["Job worker<br/>[job_worker.py]"]
  node_dispatcher["Job dispatcher<br/>[dispatcher.py]"]
  node_job_store[("Jobs and documents<br/>[job_repo.py]")]
end

subgraph group_platform["Platform services"]
  node_api["FastAPI API<br/>[main.py]"]
  node_auth_route["Authentication<br/>[auth.py]"]
  node_auth_service["Auth service<br/>[auth_service.py]"]
  node_billing_route["Billing endpoint<br/>[billing.py]"]
  node_billing_service["Billing ledger<br/>[billing_service.py]"]
  node_billing_store[("Usage ledger<br/>[billing_repo.py]")]
end

node_user(("User"))

node_user -->|"uses"| node_workstation
node_workstation -->|"opens"| node_assistant_ui
node_assistant_ui -->|"sends messages"| node_chat_client
node_chat_client -->|"streams requests"| node_assistant_route
node_api -->|"routes to"| node_assistant_route
node_assistant_route -->|"invokes"| node_orchestrator
node_orchestrator -->|"builds context"| node_context
node_orchestrator -->|"classifies intent"| node_intent
node_orchestrator -->|"executes tools"| node_tool_executor
node_orchestrator -->|"persists messages"| node_chat_store
node_context -->|"retrieves knowledge"| node_rag_service
node_tool_executor -->|"runs capabilities"| node_capability_runtime
node_user -->|"edits workflow"| node_workflow_ui
node_workflow_ui -->|"runs workflow"| node_workflow_api
node_api -->|"routes to"| node_workflow_api
node_workflow_api -.->|"invokes"| node_workflow_service
node_workflow_service -->|"runs nodes"| node_capability_runtime
node_user -->|"uses tools"| node_capability_api
node_api -->|"routes to"| node_capability_api
node_capability_runtime -->|"calls providers"| node_providers
node_user -->|"asks document questions"| node_rag_service
node_rag_service -.->|"queues document jobs"| node_job_service
node_worker -->|"claims jobs"| node_job_store
node_worker -->|"dispatches jobs"| node_dispatcher
node_dispatcher -->|"handles workflow runs"| node_workflow_service
node_job_service -.->|"persists jobs"| node_job_store
node_user -->|"authenticates"| node_auth_route
node_api -->|"routes to"| node_auth_route
node_auth_route -->|"calls"| node_auth_service
node_user -->|"manages billing"| node_billing_route
node_api -->|"routes to"| node_billing_route
node_billing_route -.->|"invokes"| node_billing_service
node_billing_service -->|"records usage"| node_billing_store
node_user -->|"manages projects"| node_project_service
node_project_service -.->|"scopes project knowledge"| node_rag_service

click node_workstation "https://github.com/cyrivea/neyria/blob/main/frontend/src/views/workstation/Workstation.vue"
click node_assistant_ui "https://github.com/cyrivea/neyria/blob/main/frontend/src/components/assistant/AssistantPanel.vue"
click node_chat_client "https://github.com/cyrivea/neyria/blob/main/frontend/src/composables/useAgentChat.ts"
click node_workflow_ui "https://github.com/cyrivea/neyria/blob/main/frontend/src/components/workflow/WorkflowCanvas.vue"
click node_api "https://github.com/cyrivea/neyria/blob/main/backend/main.py"
click node_assistant_route "https://github.com/cyrivea/neyria/blob/main/backend/routers/assistant.py"
click node_orchestrator "https://github.com/cyrivea/neyria/blob/main/backend/services/chat/chat_orchestrator.py"
click node_context "https://github.com/cyrivea/neyria/blob/main/backend/services/chat/context_builder.py"
click node_intent "https://github.com/cyrivea/neyria/blob/main/backend/services/chat/intent_classifier.py"
click node_tool_executor "https://github.com/cyrivea/neyria/blob/main/backend/services/chat/tool_executor.py"
click node_chat_store "https://github.com/cyrivea/neyria/blob/main/backend/repositories/chat_repo.py"
click node_capability_api "https://github.com/cyrivea/neyria/blob/main/backend/routers/capabilities.py"
click node_capability_runtime "https://github.com/cyrivea/neyria/blob/main/backend/services/capabilities/runtime.py"
click node_providers "https://github.com/cyrivea/neyria/tree/main/backend/services/capabilities"
click node_workflow_api "https://github.com/cyrivea/neyria/blob/main/backend/routers/workflows.py"
click node_workflow_service "https://github.com/cyrivea/neyria/blob/main/backend/services/workflow_service.py"
click node_project_service "https://github.com/cyrivea/neyria/blob/main/backend/services/project_service.py"
click node_rag_service "https://github.com/cyrivea/neyria/blob/main/backend/services/rag/service.py"
click node_job_service "https://github.com/cyrivea/neyria/blob/main/backend/services/job_service.py"
click node_worker "https://github.com/cyrivea/neyria/blob/main/backend/workers/job_worker.py"
click node_dispatcher "https://github.com/cyrivea/neyria/blob/main/backend/workers/dispatcher.py"
click node_job_store "https://github.com/cyrivea/neyria/blob/main/backend/repositories/job_repo.py"
click node_auth_route "https://github.com/cyrivea/neyria/blob/main/backend/routers/auth.py"
click node_auth_service "https://github.com/cyrivea/neyria/blob/main/backend/services/auth_service.py"
click node_billing_route "https://github.com/cyrivea/neyria/blob/main/backend/routers/billing.py"
click node_billing_service "https://github.com/cyrivea/neyria/blob/main/backend/services/billing_service.py"
click node_billing_store "https://github.com/cyrivea/neyria/blob/main/backend/repositories/billing_repo.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_workstation,node_assistant_ui,node_chat_client,node_workflow_ui,node_user toneBlue
class node_assistant_route,node_orchestrator,node_context,node_intent,node_tool_executor,node_chat_store toneAmber
class node_capability_api,node_capability_runtime,node_providers,node_workflow_api,node_workflow_service toneMint
class node_project_service,node_rag_service,node_job_service,node_worker,node_dispatcher,node_job_store toneRose
class node_api,node_auth_route,node_auth_service,node_billing_route,node_billing_service,node_billing_store toneIndigo
```

## Components

### Workspace UI

- [Vue workstation](https://github.com/cyrivea/neyria/blob/main/frontend/src/views/workstation/Workstation.vue): `frontend/src/views/workstation/Workstation.vue`
- [Assistant panel](https://github.com/cyrivea/neyria/blob/main/frontend/src/components/assistant/AssistantPanel.vue): `frontend/src/components/assistant/AssistantPanel.vue`
- [Chat client](https://github.com/cyrivea/neyria/blob/main/frontend/src/composables/useAgentChat.ts): `frontend/src/composables/useAgentChat.ts`
- [Workflow canvas](https://github.com/cyrivea/neyria/blob/main/frontend/src/components/workflow/WorkflowCanvas.vue): `frontend/src/components/workflow/WorkflowCanvas.vue`

### Assistant

- [Assistant endpoint](https://github.com/cyrivea/neyria/blob/main/backend/routers/assistant.py): `backend/routers/assistant.py`
- [ReAct orchestrator](https://github.com/cyrivea/neyria/blob/main/backend/services/chat/chat_orchestrator.py): `backend/services/chat/chat_orchestrator.py`
- [Context builder](https://github.com/cyrivea/neyria/blob/main/backend/services/chat/context_builder.py): `backend/services/chat/context_builder.py`
- [Intent classifier](https://github.com/cyrivea/neyria/blob/main/backend/services/chat/intent_classifier.py): `backend/services/chat/intent_classifier.py`
- [Tool executor](https://github.com/cyrivea/neyria/blob/main/backend/services/chat/tool_executor.py): `backend/services/chat/tool_executor.py`
- [Chat history](https://github.com/cyrivea/neyria/blob/main/backend/repositories/chat_repo.py): `backend/repositories/chat_repo.py`

### Creation and workflows

- [Capability endpoint](https://github.com/cyrivea/neyria/blob/main/backend/routers/capabilities.py): `backend/routers/capabilities.py`
- [Capability runtime](https://github.com/cyrivea/neyria/blob/main/backend/services/capabilities/runtime.py): `backend/services/capabilities/runtime.py`
- [Model providers](https://github.com/cyrivea/neyria/tree/main/backend/services/capabilities): `backend/services/capabilities`
- [Workflow endpoint](https://github.com/cyrivea/neyria/blob/main/backend/routers/workflows.py): `backend/routers/workflows.py`
- [Workflow runner](https://github.com/cyrivea/neyria/blob/main/backend/services/workflow_service.py): `backend/services/workflow_service.py`

### Knowledge and jobs

- [Projects and assets](https://github.com/cyrivea/neyria/blob/main/backend/services/project_service.py): `backend/services/project_service.py`
- [Project RAG](https://github.com/cyrivea/neyria/blob/main/backend/services/rag/service.py): `backend/services/rag/service.py`
- [Job service](https://github.com/cyrivea/neyria/blob/main/backend/services/job_service.py): `backend/services/job_service.py`
- [Job worker](https://github.com/cyrivea/neyria/blob/main/backend/workers/job_worker.py): `backend/workers/job_worker.py`
- [Job dispatcher](https://github.com/cyrivea/neyria/blob/main/backend/workers/dispatcher.py): `backend/workers/dispatcher.py`
- [Jobs and documents](https://github.com/cyrivea/neyria/blob/main/backend/repositories/job_repo.py): `backend/repositories/job_repo.py`

### Platform services

- [FastAPI API](https://github.com/cyrivea/neyria/blob/main/backend/main.py): `backend/main.py`
- [Authentication](https://github.com/cyrivea/neyria/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Auth service](https://github.com/cyrivea/neyria/blob/main/backend/services/auth_service.py): `backend/services/auth_service.py`
- [Billing endpoint](https://github.com/cyrivea/neyria/blob/main/backend/routers/billing.py): `backend/routers/billing.py`
- [Billing ledger](https://github.com/cyrivea/neyria/blob/main/backend/services/billing_service.py): `backend/services/billing_service.py`
- [Usage ledger](https://github.com/cyrivea/neyria/blob/main/backend/repositories/billing_repo.py): `backend/repositories/billing_repo.py`

### Other components

- **User**

## Connections

- User → Vue workstation: uses (evidence: `README.md`)
- Vue workstation → Assistant panel: opens (evidence: `README.md`)
- Assistant panel → Chat client: sends messages (evidence: `frontend/src/composables/useAgentChat.ts`)
- Chat client → Assistant endpoint: streams requests (evidence: `README.md`)
- FastAPI API → Assistant endpoint: routes to (evidence: `backend/main.py`)
- Assistant endpoint → ReAct orchestrator: invokes (evidence: `backend/routers/assistant.py`)
- ReAct orchestrator → Context builder: builds context (evidence: `backend/services/chat/chat_orchestrator.py`)
- ReAct orchestrator → Intent classifier: classifies intent (evidence: `backend/services/chat/chat_orchestrator.py`)
- ReAct orchestrator → Tool executor: executes tools (evidence: `backend/services/chat/chat_orchestrator.py`)
- ReAct orchestrator → Chat history: persists messages (evidence: `backend/services/chat/chat_orchestrator.py`)
- Context builder → Project RAG: retrieves knowledge (evidence: `backend/services/chat/context_builder.py`)
- Tool executor → Capability runtime: runs capabilities (evidence: `README.md`)
- User → Workflow canvas: edits workflow (evidence: `README.md`)
- Workflow canvas → Workflow endpoint: runs workflow (evidence: `README.md`)
- FastAPI API → Workflow endpoint: routes to (evidence: `backend/main.py`)
- Workflow endpoint → Workflow runner: invokes
- Workflow runner → Capability runtime: runs nodes (evidence: `README.md`)
- User → Capability endpoint: uses tools (evidence: `README.md`)
- FastAPI API → Capability endpoint: routes to (evidence: `backend/main.py`)
- Capability runtime → Model providers: calls providers (evidence: `README.md`)
- User → Project RAG: asks document questions (evidence: `README.md`)
- Project RAG → Job service: queues document jobs
- Job worker → Jobs and documents: claims jobs (evidence: `backend/workers/job_worker.py`)
- Job worker → Job dispatcher: dispatches jobs (evidence: `backend/workers/job_worker.py`)
- Job dispatcher → Workflow runner: handles workflow runs (evidence: `backend/workers/dispatcher.py`)
- Job service → Jobs and documents: persists jobs
- User → Authentication: authenticates (evidence: `backend/routers/auth.py`)
- FastAPI API → Authentication: routes to (evidence: `backend/main.py`)
- Authentication → Auth service: calls (evidence: `backend/routers/auth.py`)
- User → Billing endpoint: manages billing (evidence: `README.md`)
- FastAPI API → Billing endpoint: routes to (evidence: `backend/main.py`)
- Billing endpoint → Billing ledger: invokes
- Billing ledger → Usage ledger: records usage (evidence: `backend/services/billing_service.py`)
- User → Projects and assets: manages projects (evidence: `README.md`)
- Projects and assets → Project RAG: scopes project knowledge
