# calesthio/crucix architecture

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

- Interactive diagram: https://gitdiagram.com/calesthio/crucix
- Repository: https://github.com/calesthio/crucix

## Overview

Crucix is a self-hosted OSINT intelligence terminal. Its main workflow is a scheduled sweep of public feeds, synthesis into dashboard-ready cross-domain signals, change detection and optional idea/alert generation, then live delivery to browsers and messaging bots. The map preserves the documented dashboard capabilities as part of synthesis; source excerpts do not show every adapter or all alert/LLM wiring, so uncertain internal links are omitted.

Main entry points: [`server.mjs`](https://github.com/calesthio/crucix/blob/master/server.mjs) (Sweep server), [`apis/briefing.mjs`](https://github.com/calesthio/crucix/blob/master/apis/briefing.mjs) (Briefing orchestrator), [`apis/sources`](https://github.com/calesthio/crucix/tree/master/apis/sources) (OSINT source adapters), [`dashboard/inject.mjs`](https://github.com/calesthio/crucix/blob/master/dashboard/inject.mjs) (Dashboard synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_briefing["Briefing orchestrator<br/>[briefing.mjs]"]
  node_adapters["OSINT source adapters"]
end

subgraph group_analysis["Analysis"]
  node_synth["Dashboard synthesis<br/>[inject.mjs]"]
  node_crosssignals["Cross-domain signals<br/>[inject.mjs]"]
  node_delta["Sweep delta<br/>[engine.mjs]"]
  node_memory["Alert memory<br/>[memory.mjs]"]
end

subgraph group_delivery["Delivery"]
  node_server["Sweep server<br/>[server.mjs]"]
  node_runstore[("Sweep history<br/>[server.mjs]")]
  node_dashboard["Live intelligence dashboard"]
  node_sse["Browser live updates<br/>[server.mjs]"]
  node_briefingsave["Briefing export<br/>[save-briefing.mjs]"]
end

subgraph group_integrations["Optional integrations"]
  node_llmfactory["LLM provider factory<br/>[index.mjs]"]
  node_llmideas["LLM trade ideas<br/>[ideas.mjs]"]
  node_telegramalerts["Telegram bot and alerts<br/>[telegram.mjs]"]
  node_discordalerts["Discord alerts<br/>[discord.mjs]"]
end

node_operator(("Analyst"))
node_publicfeeds{{"Public data feeds"}}
node_llmservice{{"LLM services"}}
node_messaging{{"Telegram and Discord"}}

node_operator -->|"views"| node_dashboard
node_server -->|"runs sweep"| node_briefing
node_briefing -->|"dispatches queries"| node_adapters
node_adapters -->|"fetches data"| node_publicfeeds
node_briefing -->|"returns sweep data"| node_runstore
node_server -->|"writes and reads"| node_runstore
node_server -->|"synthesizes data"| node_synth
node_synth -->|"derives signals"| node_crosssignals
node_server -->|"computes changes"| node_delta
node_delta -->|"uses alert history"| node_memory
node_server -->|"tracks alert state"| node_memory
node_server -.->|"configures provider"| node_llmfactory
node_llmfactory -.->|"creates provider"| node_llmservice
node_server -.->|"requests ideas"| node_llmideas
node_llmideas -.->|"generates ideas"| node_llmservice
node_server -.->|"evaluates and sends alerts"| node_telegramalerts
node_server -.->|"sends alerts"| node_discordalerts
node_telegramalerts -.->|"sends and polls"| node_messaging
node_discordalerts -.->|"sends and polls"| node_messaging
node_server -->|"broadcasts updates"| node_sse
node_sse -->|"pushes data"| node_dashboard
node_server -->|"exposes briefing"| node_briefingsave
node_briefingsave -->|"saves briefing"| node_runstore

click node_server "https://github.com/calesthio/crucix/blob/master/server.mjs"
click node_briefing "https://github.com/calesthio/crucix/blob/master/apis/briefing.mjs"
click node_adapters "https://github.com/calesthio/crucix/tree/master/apis/sources"
click node_synth "https://github.com/calesthio/crucix/blob/master/dashboard/inject.mjs"
click node_crosssignals "https://github.com/calesthio/crucix/blob/master/dashboard/inject.mjs"
click node_delta "https://github.com/calesthio/crucix/blob/master/lib/delta/engine.mjs"
click node_memory "https://github.com/calesthio/crucix/blob/master/lib/delta/memory.mjs"
click node_runstore "https://github.com/calesthio/crucix/blob/master/server.mjs"
click node_dashboard "https://github.com/calesthio/crucix/tree/master/dashboard"
click node_sse "https://github.com/calesthio/crucix/blob/master/server.mjs"
click node_llmfactory "https://github.com/calesthio/crucix/blob/master/lib/llm/index.mjs"
click node_llmideas "https://github.com/calesthio/crucix/blob/master/lib/llm/ideas.mjs"
click node_telegramalerts "https://github.com/calesthio/crucix/blob/master/lib/alerts/telegram.mjs"
click node_discordalerts "https://github.com/calesthio/crucix/blob/master/lib/alerts/discord.mjs"
click node_briefingsave "https://github.com/calesthio/crucix/blob/master/apis/save-briefing.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_briefing,node_adapters toneBlue
class node_synth,node_crosssignals,node_delta,node_memory toneAmber
class node_server,node_runstore,node_dashboard,node_sse,node_briefingsave toneMint
class node_llmfactory,node_llmideas,node_telegramalerts,node_discordalerts toneRose
class node_operator,node_publicfeeds,node_llmservice,node_messaging toneIndigo
```

## Components

### Collection

- [Briefing orchestrator](https://github.com/calesthio/crucix/blob/master/apis/briefing.mjs): `apis/briefing.mjs`
- [OSINT source adapters](https://github.com/calesthio/crucix/tree/master/apis/sources): `apis/sources`

### Analysis

- [Dashboard synthesis](https://github.com/calesthio/crucix/blob/master/dashboard/inject.mjs): `dashboard/inject.mjs`
- [Cross-domain signals](https://github.com/calesthio/crucix/blob/master/dashboard/inject.mjs): `dashboard/inject.mjs`
- [Sweep delta](https://github.com/calesthio/crucix/blob/master/lib/delta/engine.mjs): `lib/delta/engine.mjs`
- [Alert memory](https://github.com/calesthio/crucix/blob/master/lib/delta/memory.mjs): `lib/delta/memory.mjs`

### Delivery

- [Sweep server](https://github.com/calesthio/crucix/blob/master/server.mjs): `server.mjs`
- [Sweep history](https://github.com/calesthio/crucix/blob/master/server.mjs): `server.mjs`
- [Live intelligence dashboard](https://github.com/calesthio/crucix/tree/master/dashboard): `dashboard`
- [Browser live updates](https://github.com/calesthio/crucix/blob/master/server.mjs): `server.mjs`
- [Briefing export](https://github.com/calesthio/crucix/blob/master/apis/save-briefing.mjs): `apis/save-briefing.mjs`

### Optional integrations

- [LLM provider factory](https://github.com/calesthio/crucix/blob/master/lib/llm/index.mjs): `lib/llm/index.mjs`
- [LLM trade ideas](https://github.com/calesthio/crucix/blob/master/lib/llm/ideas.mjs): `lib/llm/ideas.mjs`
- [Telegram bot and alerts](https://github.com/calesthio/crucix/blob/master/lib/alerts/telegram.mjs): `lib/alerts/telegram.mjs`
- [Discord alerts](https://github.com/calesthio/crucix/blob/master/lib/alerts/discord.mjs): `lib/alerts/discord.mjs`

### Other components

- **Analyst**
- **Public data feeds**
- **LLM services**
- **Telegram and Discord**

## Connections

- Analyst → Live intelligence dashboard: views
- Sweep server → Briefing orchestrator: runs sweep
- Briefing orchestrator → OSINT source adapters: dispatches queries
- OSINT source adapters → Public data feeds: fetches data
- Briefing orchestrator → Sweep history: returns sweep data
- Sweep server → Sweep history: writes and reads
- Sweep server → Dashboard synthesis: synthesizes data
- Dashboard synthesis → Cross-domain signals: derives signals
- Sweep server → Sweep delta: computes changes
- Sweep delta → Alert memory: uses alert history
- Sweep server → Alert memory: tracks alert state
- Sweep server → LLM provider factory: configures provider
- LLM provider factory → LLM services: creates provider
- Sweep server → LLM trade ideas: requests ideas
- LLM trade ideas → LLM services: generates ideas
- Sweep server → Telegram bot and alerts: evaluates and sends alerts
- Sweep server → Discord alerts: sends alerts
- Telegram bot and alerts → Telegram and Discord: sends and polls
- Discord alerts → Telegram and Discord: sends and polls
- Sweep server → Browser live updates: broadcasts updates
- Browser live updates → Live intelligence dashboard: pushes data
- Sweep server → Briefing export: exposes briefing
- Briefing export → Sweep history: saves briefing
