# gorgo126/odin architecture

> Architecture diagram of the GitHub repository gorgo126/odin, 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/gorgo126/odin
- Repository: https://github.com/gorgo126/odin

## Overview

ODIN is an offline-first knowledge server for people using a browser on the local network. The main workflow is to search across installed knowledge sources, inspect cited passages and open the relevant content; users can also install content while connectivity is available. The dashboard additionally manages maps, books, practical guides, personal files, messages, translation, server health and optional AI answers. The graph combines documented product capabilities with relationships visible in the supplied excerpts and SOURCE INDEX; unsampled routes and internals are not inferred.

Main entry points: [`dashboard/app/page.jsx`](https://github.com/gorgo126/odin/blob/main/dashboard/app/page.jsx) (ODIN dashboard), [`dashboard/assistant/recherche-avancee.mjs`](https://github.com/gorgo126/odin/blob/main/dashboard/assistant/recherche-avancee.mjs) (Advanced retrieval), [`dashboard/lib/telechargements.mjs`](https://github.com/gorgo126/odin/blob/main/dashboard/lib/telechargements.mjs) (Knowledge packs), [`dashboard/app/api`](https://github.com/gorgo126/odin/tree/main/dashboard/app/api) (Product API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Dashboard and access"]
  node_dashboard["ODIN dashboard<br/>[page.jsx]"]
  node_auth["Password sessions<br/>[auth.mjs]"]
  node_api["Product API routes"]
end

subgraph group_knowledge["Knowledge and search"]
  node_searchui["Search experience"]
  node_searchapi["Search endpoint<br/>[route.js]"]
  node_retrieval["Advanced retrieval"]
  node_assistantapi["Assistant endpoint<br/>[route.js]"]
  node_assistantlib["Assistant service<br/>[assistant.mjs]"]
  node_answer["Answer orchestration<br/>[reponse.mjs]"]
  node_indexer[("Document indexing<br/>[index.mjs]")]
end

subgraph group_content["Content services"]
  node_guides["Practical guides<br/>[guides.mjs]"]
  node_books["Book library<br/>[livres.mjs]"]
  node_maps["Offline maps<br/>[cartes.mjs]"]
  node_personal["Personal files"]
  node_messages[("Local message wall<br/>[messages.mjs]")]
  node_translation["Offline translation<br/>[traduction.mjs]"]
end

subgraph group_operations["Installation and operations"]
  node_packs["Knowledge packs"]
  node_catalog["Pack catalogue<br/>[catalogue.mjs]"]
  node_guidesinstall["Guide installation<br/>[guides.mjs]"]
  node_connectivity["Connectivity monitor<br/>[liaison.mjs]"]
  node_storage["Disk reservations<br/>[espace.mjs]"]
  node_serverhealth["Server health<br/>[sante.mjs]"]
end

subgraph group_optional["Optional integrations"]
  node_ai["Optional AI models<br/>[ia.mjs]"]
  node_ollama["Ollama model runtime<br/>[ollama.mjs]"]
end

node_browser(("Local browser"))
node_hostap(("Host access-point agent"))
node_internet(("Internet and mirrors"))

node_browser -->|"opens"| node_dashboard
node_dashboard -->|"protects access"| node_auth
node_browser -->|"requests"| node_api
node_dashboard -->|"offers search"| node_searchui
node_searchui -->|"submits query"| node_searchapi
node_searchapi -->|"calls"| node_retrieval
node_searchapi -->|"calls"| node_assistantlib
node_assistantapi -->|"calls"| node_assistantlib
node_assistantlib -->|"requests answer"| node_answer
node_answer -->|"uses retrieval"| node_retrieval
node_retrieval -.->|"searches indexed files"| node_indexer
node_retrieval -.->|"searches guides"| node_guides
node_retrieval -.->|"searches books"| node_books
node_retrieval -.->|"searches offline wikis"| node_internet
node_dashboard -->|"manages guides"| node_guides
node_dashboard -->|"opens books"| node_books
node_dashboard -->|"opens maps"| node_maps
node_dashboard -->|"shares files"| node_personal
node_browser -->|"reads and posts"| node_messages
node_dashboard -->|"translates text"| node_translation
node_dashboard -->|"installs packs"| node_packs
node_api -->|"lists packs"| node_catalog
node_api -->|"reads installation state"| node_packs
node_packs -->|"loads pack details"| node_catalog
node_packs -->|"checks link"| node_connectivity
node_packs -.->|"reserves disk"| node_storage
node_packs -->|"downloads content"| node_internet
node_dashboard -->|"installs guides"| node_guidesinstall
node_guidesinstall -->|"fetches guide archive"| node_internet
node_dashboard -->|"shows health"| node_serverhealth
node_dashboard -->|"configures optional AI"| node_ai
node_ai -.->|"checks model runtime"| node_ollama
node_api -->|"writes action request"| node_hostap

click node_dashboard "https://github.com/gorgo126/odin/blob/main/dashboard/app/page.jsx"
click node_auth "https://github.com/gorgo126/odin/blob/main/dashboard/lib/auth.mjs"
click node_api "https://github.com/gorgo126/odin/tree/main/dashboard/app/api"
click node_searchui "https://github.com/gorgo126/odin/tree/main/dashboard/app/recherche"
click node_searchapi "https://github.com/gorgo126/odin/blob/main/dashboard/app/api/recherche/route.js"
click node_retrieval "https://github.com/gorgo126/odin/blob/main/dashboard/assistant/recherche-avancee.mjs"
click node_assistantapi "https://github.com/gorgo126/odin/blob/main/dashboard/app/api/assistant/question/route.js"
click node_assistantlib "https://github.com/gorgo126/odin/blob/main/dashboard/lib/assistant.mjs"
click node_answer "https://github.com/gorgo126/odin/blob/main/dashboard/assistant/reponse.mjs"
click node_indexer "https://github.com/gorgo126/odin/blob/main/dashboard/assistant/index.mjs"
click node_guides "https://github.com/gorgo126/odin/blob/main/dashboard/lib/guides.mjs"
click node_books "https://github.com/gorgo126/odin/blob/main/dashboard/lib/livres.mjs"
click node_maps "https://github.com/gorgo126/odin/blob/main/dashboard/lib/cartes.mjs"
click node_personal "https://github.com/gorgo126/odin/blob/main/dashboard/lib/espace-contenus.mjs"
click node_messages "https://github.com/gorgo126/odin/blob/main/dashboard/lib/messages.mjs"
click node_translation "https://github.com/gorgo126/odin/blob/main/dashboard/lib/traduction.mjs"
click node_packs "https://github.com/gorgo126/odin/blob/main/dashboard/lib/telechargements.mjs"
click node_catalog "https://github.com/gorgo126/odin/blob/main/dashboard/lib/catalogue.mjs"
click node_guidesinstall "https://github.com/gorgo126/odin/blob/main/dashboard/lib/guides.mjs"
click node_connectivity "https://github.com/gorgo126/odin/blob/main/dashboard/lib/liaison.mjs"
click node_storage "https://github.com/gorgo126/odin/blob/main/dashboard/lib/espace.mjs"
click node_serverhealth "https://github.com/gorgo126/odin/blob/main/dashboard/lib/sante.mjs"
click node_ai "https://github.com/gorgo126/odin/blob/main/dashboard/lib/ia.mjs"
click node_ollama "https://github.com/gorgo126/odin/blob/main/dashboard/assistant/ollama.mjs"

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_dashboard,node_auth,node_api,node_browser toneBlue
class node_searchui,node_searchapi,node_retrieval,node_assistantapi,node_assistantlib,node_answer,node_indexer toneAmber
class node_guides,node_books,node_maps,node_personal,node_messages,node_translation toneMint
class node_packs,node_catalog,node_guidesinstall,node_connectivity,node_storage,node_serverhealth toneRose
class node_ai,node_ollama,node_hostap,node_internet toneIndigo
```

## Components

### Dashboard and access

- [ODIN dashboard](https://github.com/gorgo126/odin/blob/main/dashboard/app/page.jsx): `dashboard/app/page.jsx`
- [Password sessions](https://github.com/gorgo126/odin/blob/main/dashboard/lib/auth.mjs): `dashboard/lib/auth.mjs`
- [Product API routes](https://github.com/gorgo126/odin/tree/main/dashboard/app/api): `dashboard/app/api`

### Knowledge and search

- [Search experience](https://github.com/gorgo126/odin/tree/main/dashboard/app/recherche): `dashboard/app/recherche`
- [Search endpoint](https://github.com/gorgo126/odin/blob/main/dashboard/app/api/recherche/route.js): `dashboard/app/api/recherche/route.js`
- [Advanced retrieval](https://github.com/gorgo126/odin/blob/main/dashboard/assistant/recherche-avancee.mjs): `dashboard/assistant/recherche-avancee.mjs`
- [Assistant endpoint](https://github.com/gorgo126/odin/blob/main/dashboard/app/api/assistant/question/route.js): `dashboard/app/api/assistant/question/route.js`
- [Assistant service](https://github.com/gorgo126/odin/blob/main/dashboard/lib/assistant.mjs): `dashboard/lib/assistant.mjs`
- [Answer orchestration](https://github.com/gorgo126/odin/blob/main/dashboard/assistant/reponse.mjs): `dashboard/assistant/reponse.mjs`
- [Document indexing](https://github.com/gorgo126/odin/blob/main/dashboard/assistant/index.mjs): `dashboard/assistant/index.mjs`

### Content services

- [Practical guides](https://github.com/gorgo126/odin/blob/main/dashboard/lib/guides.mjs): `dashboard/lib/guides.mjs`
- [Book library](https://github.com/gorgo126/odin/blob/main/dashboard/lib/livres.mjs): `dashboard/lib/livres.mjs`
- [Offline maps](https://github.com/gorgo126/odin/blob/main/dashboard/lib/cartes.mjs): `dashboard/lib/cartes.mjs`
- [Personal files](https://github.com/gorgo126/odin/blob/main/dashboard/lib/espace-contenus.mjs): `dashboard/lib/espace-contenus.mjs`
- [Local message wall](https://github.com/gorgo126/odin/blob/main/dashboard/lib/messages.mjs): `dashboard/lib/messages.mjs`
- [Offline translation](https://github.com/gorgo126/odin/blob/main/dashboard/lib/traduction.mjs): `dashboard/lib/traduction.mjs`

### Installation and operations

- [Knowledge packs](https://github.com/gorgo126/odin/blob/main/dashboard/lib/telechargements.mjs): `dashboard/lib/telechargements.mjs`
- [Pack catalogue](https://github.com/gorgo126/odin/blob/main/dashboard/lib/catalogue.mjs): `dashboard/lib/catalogue.mjs`
- [Guide installation](https://github.com/gorgo126/odin/blob/main/dashboard/lib/guides.mjs): `dashboard/lib/guides.mjs`
- [Connectivity monitor](https://github.com/gorgo126/odin/blob/main/dashboard/lib/liaison.mjs): `dashboard/lib/liaison.mjs`
- [Disk reservations](https://github.com/gorgo126/odin/blob/main/dashboard/lib/espace.mjs): `dashboard/lib/espace.mjs`
- [Server health](https://github.com/gorgo126/odin/blob/main/dashboard/lib/sante.mjs): `dashboard/lib/sante.mjs`

### Optional integrations

- [Optional AI models](https://github.com/gorgo126/odin/blob/main/dashboard/lib/ia.mjs): `dashboard/lib/ia.mjs`
- [Ollama model runtime](https://github.com/gorgo126/odin/blob/main/dashboard/assistant/ollama.mjs): `dashboard/assistant/ollama.mjs`

### Other components

- **Local browser**
- **Host access-point agent**
- **Internet and mirrors**

## Connections

- Local browser → ODIN dashboard: opens (evidence: `README.md`)
- ODIN dashboard → Password sessions: protects access (evidence: `README.md`)
- Local browser → Product API routes: requests (evidence: `README.md`)
- ODIN dashboard → Search experience: offers search (evidence: `README.md`)
- Search experience → Search endpoint: submits query (evidence: `README.md`)
- Search endpoint → Advanced retrieval: calls (evidence: `dashboard/app/api/recherche/route.js`)
- Search endpoint → Assistant service: calls (evidence: `dashboard/app/api/recherche/route.js`)
- Assistant endpoint → Assistant service: calls (evidence: `dashboard/app/api/assistant/question/route.js`)
- Assistant service → Answer orchestration: requests answer (evidence: `dashboard/lib/assistant.mjs`)
- Answer orchestration → Advanced retrieval: uses retrieval (evidence: `dashboard/assistant/reponse.mjs`)
- Advanced retrieval → Document indexing: searches indexed files
- Advanced retrieval → Practical guides: searches guides
- Advanced retrieval → Book library: searches books
- Advanced retrieval → Internet and mirrors: searches offline wikis
- ODIN dashboard → Practical guides: manages guides (evidence: `README.md`)
- ODIN dashboard → Book library: opens books (evidence: `README.md`)
- ODIN dashboard → Offline maps: opens maps (evidence: `README.md`)
- ODIN dashboard → Personal files: shares files (evidence: `README.md`)
- Local browser → Local message wall: reads and posts
- ODIN dashboard → Offline translation: translates text (evidence: `README.md`)
- ODIN dashboard → Knowledge packs: installs packs (evidence: `README.md`)
- Product API routes → Pack catalogue: lists packs (evidence: `dashboard/app/api/packs/route.js`)
- Product API routes → Knowledge packs: reads installation state (evidence: `dashboard/app/api/packs/route.js`)
- Knowledge packs → Pack catalogue: loads pack details (evidence: `dashboard/lib/telechargements.mjs`)
- Knowledge packs → Connectivity monitor: checks link (evidence: `dashboard/lib/telechargements.mjs`)
- Knowledge packs → Disk reservations: reserves disk (evidence: `dashboard/lib/telechargements.mjs`)
- Knowledge packs → Internet and mirrors: downloads content (evidence: `README.md`)
- ODIN dashboard → Guide installation: installs guides (evidence: `README.md`)
- Guide installation → Internet and mirrors: fetches guide archive (evidence: `dashboard/lib/guides.mjs`)
- ODIN dashboard → Server health: shows health (evidence: `README.md`)
- ODIN dashboard → Optional AI models: configures optional AI (evidence: `README.md`)
- Optional AI models → Ollama model runtime: checks model runtime
- Product API routes → Host access-point agent: writes action request (evidence: `dashboard/app/api/point-acces/route.js`)
