# nhzallen/noureon architecture

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

- Interactive diagram: https://gitdiagram.com/nhzallen/noureon
- Repository: https://github.com/nhzallen/noureon

## Overview

Noureon is a local-first AI workspace: a user starts a conversation, chooses a model or collaboration workflow, and receives a rendered response, optionally informed by search or attachments. The workspace also supports reusable Nouras, image generation, history recall, document creation, and optional signed-in cloud sync. The graph groups the major product areas and highlights local persistence and application startup. README capabilities guide the feature map; sampled source confirms selected bootstrap, storage, memory, and document-layout behavior, but not every feature’s wiring.

Main entry points: [`src/app/runtime/legacy-core/submit-input-council-lifecycle.js`](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/legacy-core/submit-input-council-lifecycle.js) (Model chat), [`src/main.js`](https://github.com/nhzallen/noureon/blob/main/src/main.js) (Startup entry), [`src/app/runtime/kernel/app-data-store.js`](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/kernel/app-data-store.js) (Local workspace store), [`src/app/runtime-entry.js`](https://github.com/nhzallen/noureon/blob/main/src/app/runtime-entry.js) (App runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application startup"]
  node_entry["Startup entry<br/>[main.js]"]
  node_runtime["App runtime<br/>[runtime-entry.js]"]
  node_legacy["Legacy app<br/>[legacy-app.js]"]
end

subgraph group_conversation["Chat and collaboration"]
  node_chat["Model chat"]
  node_council["Model Council"]
  node_search["Web search<br/>[auto-web-search.js]"]
  node_render["Response rendering"]
  node_attachments["Attachments"]
end

subgraph group_workspace["Workspace and memory"]
  node_localstore[("Local workspace store<br/>[app-data-store.js]")]
  node_idb[("IndexedDB adapter<br/>[storage-adapter.js]")]
  node_nouras["Reusable Nouras<br/>[index.js]"]
  node_history["History recall"]
  node_memoryindex[("History index")]
end

subgraph group_creation["Creation and output"]
  node_images["Image generation"]
  node_documents["Document authoring<br/>[file-generators.js]"]
  node_slideengine["Slide layout<br/>[slide-engine.js]"]
end

subgraph group_sync["Cloud and PWA"]
  node_cloud["Cloud workspace sync"]
  node_pwa["Offline shell<br/>[service-worker.js]"]
end

node_user(("User"))
node_providers{{"Model providers"}}
node_tavily{{"Tavily"}}
node_supabase[("Supabase")]

node_user -->|"opens workspace"| node_entry
node_entry -->|"starts runtime"| node_runtime
node_entry -->|"loads app"| node_legacy
node_runtime -->|"uses workspace data"| node_localstore
node_localstore -->|"persists locally"| node_idb
node_user -->|"submits prompt"| node_chat
node_chat -->|"requests response"| node_providers
node_chat -->|"runs collaboration"| node_council
node_council -->|"queries models"| node_providers
node_chat -.->|"may augment request"| node_search
node_search -.->|"searches web"| node_tavily
node_chat -.->|"uses attachments"| node_attachments
node_chat -->|"renders response"| node_render
node_user -->|"selects assistant"| node_nouras
node_chat -.->|"may generate images"| node_images
node_chat -.->|"may recall history"| node_history
node_history -->|"queries index"| node_memoryindex
node_user -->|"creates files"| node_documents
node_documents -.->|"lays out slides"| node_slideengine
node_localstore -.->|"syncs workspace"| node_cloud
node_cloud -.->|"stores remote data"| node_supabase
node_entry -.->|"registers offline support"| node_pwa

click node_entry "https://github.com/nhzallen/noureon/blob/main/src/main.js"
click node_runtime "https://github.com/nhzallen/noureon/blob/main/src/app/runtime-entry.js"
click node_legacy "https://github.com/nhzallen/noureon/blob/main/src/app/legacy-app.js"
click node_localstore "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/kernel/app-data-store.js"
click node_idb "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/kernel/storage-adapter.js"
click node_chat "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/legacy-core/submit-input-council-lifecycle.js"
click node_council "https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/council-response-lifecycle.js"
click node_search "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/features/auto-web-search.js"
click node_render "https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/conversation-view-renderer.js"
click node_nouras "https://github.com/nhzallen/noureon/blob/main/src/data/astras-data/index.js"
click node_attachments "https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/media-attachment-renderer.js"
click node_images "https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/image-generation-response-lifecycle.js"
click node_history "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/memory/history-retrieval-service.js"
click node_memoryindex "https://github.com/nhzallen/noureon/blob/main/src/app/runtime/memory/history-index-store.js"
click node_documents "https://github.com/nhzallen/noureon/blob/main/src/app/ui/files/file-generators.js"
click node_slideengine "https://github.com/nhzallen/noureon/blob/main/src/app/ui/files/design/slide-engine.js"
click node_cloud "https://github.com/nhzallen/noureon/blob/main/src/app/sync/cloud-workspace-sync.js"
click node_pwa "https://github.com/nhzallen/noureon/blob/main/public/service-worker.js"

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_entry,node_runtime,node_legacy,node_user toneBlue
class node_chat,node_council,node_search,node_render,node_attachments,node_supabase toneAmber
class node_localstore,node_idb,node_nouras,node_history,node_memoryindex toneMint
class node_images,node_documents,node_slideengine toneRose
class node_cloud,node_pwa,node_providers,node_tavily toneIndigo
```

## Components

### Application startup

- [Startup entry](https://github.com/nhzallen/noureon/blob/main/src/main.js): `src/main.js`
- [App runtime](https://github.com/nhzallen/noureon/blob/main/src/app/runtime-entry.js): `src/app/runtime-entry.js`
- [Legacy app](https://github.com/nhzallen/noureon/blob/main/src/app/legacy-app.js): `src/app/legacy-app.js`

### Chat and collaboration

- [Model chat](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/legacy-core/submit-input-council-lifecycle.js): `src/app/runtime/legacy-core/submit-input-council-lifecycle.js`
- [Model Council](https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/council-response-lifecycle.js): `src/app/legacy-runtime/features/council-response-lifecycle.js`
- [Web search](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/features/auto-web-search.js): `src/app/runtime/features/auto-web-search.js`
- [Response rendering](https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/conversation-view-renderer.js): `src/app/legacy-runtime/features/conversation-view-renderer.js`
- [Attachments](https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/media-attachment-renderer.js): `src/app/legacy-runtime/features/media-attachment-renderer.js`

### Workspace and memory

- [Local workspace store](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/kernel/app-data-store.js): `src/app/runtime/kernel/app-data-store.js`
- [IndexedDB adapter](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/kernel/storage-adapter.js): `src/app/runtime/kernel/storage-adapter.js`
- [Reusable Nouras](https://github.com/nhzallen/noureon/blob/main/src/data/astras-data/index.js): `src/data/astras-data/index.js`
- [History recall](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/memory/history-retrieval-service.js): `src/app/runtime/memory/history-retrieval-service.js`
- [History index](https://github.com/nhzallen/noureon/blob/main/src/app/runtime/memory/history-index-store.js): `src/app/runtime/memory/history-index-store.js`

### Creation and output

- [Image generation](https://github.com/nhzallen/noureon/blob/main/src/app/legacy-runtime/features/image-generation-response-lifecycle.js): `src/app/legacy-runtime/features/image-generation-response-lifecycle.js`
- [Document authoring](https://github.com/nhzallen/noureon/blob/main/src/app/ui/files/file-generators.js): `src/app/ui/files/file-generators.js`
- [Slide layout](https://github.com/nhzallen/noureon/blob/main/src/app/ui/files/design/slide-engine.js): `src/app/ui/files/design/slide-engine.js`

### Cloud and PWA

- [Cloud workspace sync](https://github.com/nhzallen/noureon/blob/main/src/app/sync/cloud-workspace-sync.js): `src/app/sync/cloud-workspace-sync.js`
- [Offline shell](https://github.com/nhzallen/noureon/blob/main/public/service-worker.js): `public/service-worker.js`

### Other components

- **User**
- **Model providers**
- **Tavily**
- **Supabase**

## Connections

- User → Startup entry: opens workspace
- Startup entry → App runtime: starts runtime
- Startup entry → Legacy app: loads app
- App runtime → Local workspace store: uses workspace data
- Local workspace store → IndexedDB adapter: persists locally
- User → Model chat: submits prompt
- Model chat → Model providers: requests response
- Model chat → Model Council: runs collaboration
- Model Council → Model providers: queries models
- Model chat → Web search: may augment request
- Web search → Tavily: searches web
- Model chat → Attachments: uses attachments
- Model chat → Response rendering: renders response
- User → Reusable Nouras: selects assistant
- Model chat → Image generation: may generate images
- Model chat → History recall: may recall history
- History recall → History index: queries index
- User → Document authoring: creates files
- Document authoring → Slide layout: lays out slides
- Local workspace store → Cloud workspace sync: syncs workspace
- Cloud workspace sync → Supabase: stores remote data
- Startup entry → Offline shell: registers offline support
