# ranidnu-w/nexus architecture

> Architecture diagram of the GitHub repository ranidnu-w/nexus, 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/ranidnu-w/nexus
- Repository: https://github.com/ranidnu-w/nexus
- Video tour (about a minute): https://gitdiagram.com/ranidnu-w/nexus/video

## Overview

Nexus is a self-hosted multi-agent AI platform: users work through a Next.js interface, while n8n workflows provide document ingestion and Q&A, review analysis, intent routing, digests, analytics, health checks, cleanup, and job status. The frontend pages call a shared API client; README-described workflows connect to local inference, retrieval, and state services. Workflow internals and API endpoint mappings were not sampled, so those relationships are limited to documented capabilities or marked unverified.

Main entry points: [`frontend/src/lib/api.ts`](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/lib/api.ts) (Frontend API client), [`frontend/src/app/docmentor/page.tsx`](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/docmentor/page.tsx) (DocMentor UI), [`n8n-workflows/Nexus_File Intake Pipeline.json`](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_File%20Intake%20Pipeline.json) (File intake), [`n8n-workflows/Nexus_DocMentor RAG Agent.json`](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_DocMentor%20RAG%20Agent.json) (DocMentor RAG)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_home["Home<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_chat["Agent chat<br/>[page.tsx]"]
  node_files["File upload<br/>[page.tsx]"]
  node_docmentor_ui["DocMentor UI<br/>[page.tsx]"]
  node_review_ui["Review UI<br/>[page.tsx]"]
  node_digest_ui["Digest UI<br/>[page.tsx]"]
  node_analytics_ui["Analytics UI<br/>[page.tsx]"]
  node_status_ui["System status UI<br/>[page.tsx]"]
  node_api["Frontend API client<br/>[api.ts]"]
end

subgraph group_agents["Agent workflows"]
  node_intake["File intake"]
  node_docmentor["DocMentor RAG"]
  node_review["Review analyst"]
  node_orchestrator["Intent orchestrator"]
  node_digest["Digest agent"]
end

subgraph group_ops["Platform operations"]
  node_health["Health monitor"]
  node_analytics["Interaction analytics"]
  node_cleanup["Cleanup workflow"]
  node_jobs["Job status endpoint"]
end

subgraph group_services["AI and data services"]
  node_ollama{{"Ollama inference"}}
  node_docling{{"Docling parser"}}
  node_qdrant[("Qdrant vector store")]
  node_airtable[("Airtable state")]
  node_rss{{"RSS feeds"}}
end

node_user(("User"))

node_user -->|"opens platform"| node_home
node_user -->|"uses features"| node_dashboard
node_chat -->|"sends messages"| node_api
node_chat -->|"polls job status"| node_api
node_files -->|"uploads files"| node_api
node_files -->|"polls job status"| node_api
node_docmentor_ui -->|"queries documents"| node_api
node_docmentor_ui -->|"uploads files"| node_api
node_docmentor_ui -->|"polls job status"| node_api
node_review_ui -->|"submits review"| node_api
node_digest_ui -->|"configures digest"| node_api
node_digest_ui -->|"loads latest"| node_api
node_analytics_ui -->|"loads metrics"| node_api
node_status_ui -->|"checks health"| node_api
node_dashboard -->|"loads status and metrics"| node_api
node_api -.->|"routes requests"| node_orchestrator
node_orchestrator -->|"routes intent"| node_docmentor
node_orchestrator -->|"routes intent"| node_review
node_intake -->|"parses documents"| node_docling
node_intake -->|"creates embeddings"| node_ollama
node_intake -->|"stores vectors"| node_qdrant
node_docmentor -->|"retrieves vectors"| node_qdrant
node_docmentor -->|"generates answers"| node_ollama
node_review -->|"analyzes reviews"| node_ollama
node_digest -->|"reads feeds"| node_rss
node_digest -.->|"summarizes content"| node_ollama
node_health -.->|"records health"| node_airtable
node_analytics -->|"aggregates usage"| node_airtable
node_cleanup -->|"prunes vectors"| node_qdrant
node_cleanup -->|"archives records"| node_airtable
node_jobs -.->|"reads job status"| node_airtable

click node_home "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/page.tsx"
click node_dashboard "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/dashboard/page.tsx"
click node_chat "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/chat/page.tsx"
click node_files "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/files/page.tsx"
click node_docmentor_ui "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/docmentor/page.tsx"
click node_review_ui "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/review/page.tsx"
click node_digest_ui "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/digest/page.tsx"
click node_analytics_ui "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/analytics/page.tsx"
click node_status_ui "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/status/page.tsx"
click node_api "https://github.com/ranidnu-w/nexus/blob/main/frontend/src/lib/api.ts"
click node_intake "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_File%20Intake%20Pipeline.json"
click node_docmentor "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_DocMentor%20RAG%20Agent.json"
click node_review "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Review%20Analyst.json"
click node_orchestrator "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Orchestrator.json"
click node_digest "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Digest%20Agent.json"
click node_health "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_System%20Health%20Monitor.json"
click node_analytics "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Interaction%20Analytics.json"
click node_cleanup "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Cleanup%20Workflow.json"
click node_jobs "https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Job%20Status%20Endpoint.json"

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_home,node_dashboard,node_chat,node_files,node_docmentor_ui,node_review_ui,node_digest_ui,node_analytics_ui,node_status_ui,node_api,node_user toneBlue
class node_intake,node_docmentor,node_review,node_orchestrator,node_digest toneAmber
class node_health,node_analytics,node_cleanup,node_jobs toneMint
class node_ollama,node_docling,node_qdrant,node_airtable,node_rss toneRose
```

## Components

### User interface

- [Home](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Dashboard](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/dashboard/page.tsx): `frontend/src/app/dashboard/page.tsx`
- [Agent chat](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/chat/page.tsx): `frontend/src/app/chat/page.tsx`
- [File upload](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/files/page.tsx): `frontend/src/app/files/page.tsx`
- [DocMentor UI](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/docmentor/page.tsx): `frontend/src/app/docmentor/page.tsx`
- [Review UI](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/review/page.tsx): `frontend/src/app/review/page.tsx`
- [Digest UI](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/digest/page.tsx): `frontend/src/app/digest/page.tsx`
- [Analytics UI](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/analytics/page.tsx): `frontend/src/app/analytics/page.tsx`
- [System status UI](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/app/status/page.tsx): `frontend/src/app/status/page.tsx`
- [Frontend API client](https://github.com/ranidnu-w/nexus/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Agent workflows

- [File intake](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_File%20Intake%20Pipeline.json): `n8n-workflows/Nexus_File Intake Pipeline.json`
- [DocMentor RAG](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_DocMentor%20RAG%20Agent.json): `n8n-workflows/Nexus_DocMentor RAG Agent.json`
- [Review analyst](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Review%20Analyst.json): `n8n-workflows/Nexus_Review Analyst.json`
- [Intent orchestrator](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Orchestrator.json): `n8n-workflows/Nexus_Orchestrator.json`
- [Digest agent](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Digest%20Agent.json): `n8n-workflows/Nexus_Digest Agent.json`

### Platform operations

- [Health monitor](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_System%20Health%20Monitor.json): `n8n-workflows/Nexus_System Health Monitor.json`
- [Interaction analytics](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Interaction%20Analytics.json): `n8n-workflows/Nexus_Interaction Analytics.json`
- [Cleanup workflow](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Cleanup%20Workflow.json): `n8n-workflows/Nexus_Cleanup Workflow.json`
- [Job status endpoint](https://github.com/ranidnu-w/nexus/blob/main/n8n-workflows/Nexus_Job%20Status%20Endpoint.json): `n8n-workflows/Nexus_Job Status Endpoint.json`

### AI and data services

- **Ollama inference**
- **Docling parser**
- **Qdrant vector store**
- **Airtable state**
- **RSS feeds**

### Other components

- **User**

## Connections

- User → Home: opens platform (evidence: `README.md`)
- User → Dashboard: uses features (evidence: `README.md`)
- Agent chat → Frontend API client: sends messages (evidence: `frontend/src/app/chat/page.tsx`)
- Agent chat → Frontend API client: polls job status (evidence: `frontend/src/app/chat/page.tsx`)
- File upload → Frontend API client: uploads files (evidence: `frontend/src/app/files/page.tsx`)
- File upload → Frontend API client: polls job status (evidence: `frontend/src/app/files/page.tsx`)
- DocMentor UI → Frontend API client: queries documents (evidence: `frontend/src/app/docmentor/page.tsx`)
- DocMentor UI → Frontend API client: uploads files (evidence: `frontend/src/app/docmentor/page.tsx`)
- DocMentor UI → Frontend API client: polls job status (evidence: `frontend/src/app/docmentor/page.tsx`)
- Review UI → Frontend API client: submits review (evidence: `frontend/src/app/review/page.tsx`)
- Digest UI → Frontend API client: configures digest (evidence: `frontend/src/app/digest/page.tsx`)
- Digest UI → Frontend API client: loads latest (evidence: `frontend/src/app/digest/page.tsx`)
- Analytics UI → Frontend API client: loads metrics (evidence: `frontend/src/app/analytics/page.tsx`)
- System status UI → Frontend API client: checks health (evidence: `frontend/src/app/status/page.tsx`)
- Dashboard → Frontend API client: loads status and metrics (evidence: `frontend/src/app/dashboard/page.tsx`)
- Frontend API client → Intent orchestrator: routes requests
- Intent orchestrator → DocMentor RAG: routes intent (evidence: `README.md`)
- Intent orchestrator → Review analyst: routes intent (evidence: `README.md`)
- File intake → Docling parser: parses documents (evidence: `README.md`)
- File intake → Ollama inference: creates embeddings (evidence: `README.md`)
- File intake → Qdrant vector store: stores vectors (evidence: `README.md`)
- DocMentor RAG → Qdrant vector store: retrieves vectors (evidence: `README.md`)
- DocMentor RAG → Ollama inference: generates answers (evidence: `README.md`)
- Review analyst → Ollama inference: analyzes reviews (evidence: `README.md`)
- Digest agent → RSS feeds: reads feeds (evidence: `README.md`)
- Digest agent → Ollama inference: summarizes content
- Health monitor → Airtable state: records health
- Interaction analytics → Airtable state: aggregates usage (evidence: `README.md`)
- Cleanup workflow → Qdrant vector store: prunes vectors (evidence: `README.md`)
- Cleanup workflow → Airtable state: archives records (evidence: `README.md`)
- Job status endpoint → Airtable state: reads job status
