# dhruvharani1/spidey-sense architecture

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

- Interactive diagram: https://gitdiagram.com/dhruvharani1/spidey-sense
- Repository: https://github.com/dhruvharani1/spidey-sense

## Overview

Spidey Sense is an always-on-top Windows desktop widget that turns live PC vitals and local activity into a comic-themed spider-sense dashboard. The principal workflow is: the Electron host samples system metrics, evaluates alert conditions, and sends updates to the widget, which displays status and may tingle, chirp, or notify. Users also invoke focused features through the widget, tray, hotkeys, or Karen. The graph preserves documented capabilities whose implementation was not sampled; those relationships are cited to the README rather than treated as inspected source.

Main entry points: [`main.js`](https://github.com/dhruvharani1/spidey-sense/blob/main/main.js) (Electron host), [`renderer/karen.js`](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/karen.js) (Karen assistant), [`notifications.js`](https://github.com/dhruvharani1/spidey-sense/blob/main/notifications.js) (Windows inbox reader), [`updater.js`](https://github.com/dhruvharani1/spidey-sense/blob/main/updater.js) (Auto-updater)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Desktop host"]
  node_host["Electron host<br/>[main.js]"]
  node_autostart["Login startup<br/>[autostart.js]"]
  node_speech["Spoken replies<br/>[speech.js]"]
end

subgraph group_widget["Widget experience"]
  node_widget["Spider widget<br/>[app.js]"]
  node_radar["Vitals radar<br/>[spider.js]"]
  node_webtimer["Focus timer<br/>[app.js]"]
  node_karen["Karen assistant<br/>[karen.js]"]
  node_llm["Local model bridge<br/>[karen-llm.js]"]
  node_capture["Comic capture<br/>[capture.js]"]
  node_comic["Panel rendering<br/>[comic.js]"]
end

subgraph group_safety["Sensing and safety"]
  node_guardian["Guardian monitor<br/>[guardian.js]"]
  node_edith["E.D.I.T.H. scan<br/>[edith.js]"]
  node_inboxsource["Windows inbox reader<br/>[notifications.js]"]
  node_inbox["Notification inbox<br/>[inbox.js]"]
end

subgraph group_personal["Personal tools"]
  node_reminders["Reminders<br/>[reminders.js]"]
  node_dailyweb["Daily Web<br/>[bugle.js]"]
  node_daystats["Daily counters<br/>[daystats.js]"]
  node_suits["Suit Locker<br/>[suits.js]"]
end

subgraph group_help["Help and updates"]
  node_cli["Manual CLI<br/>[spidey.js]"]
  node_helpdata["Command reference<br/>[help-data.js]"]
  node_updater["Auto-updater<br/>[updater.js]"]
end

node_user(("User"))
node_ollama{{"Ollama"}}
node_windows{{"Windows services"}}
node_releases{{"GitHub releases"}}

node_user -->|"opens widget"| node_host
node_host -->|"shows dashboard"| node_widget
node_host -->|"syncs startup"| node_autostart
node_host -->|"uses speech"| node_speech
node_host -->|"starts monitor"| node_guardian
node_host -->|"runs scan"| node_edith
node_host -->|"starts polling"| node_inboxsource
node_host -->|"starts updates"| node_updater
node_host -->|"sends vitals"| node_radar
node_radar -->|"renders status"| node_widget
node_host -->|"reads system state"| node_windows
node_guardian -->|"checks activity"| node_windows
node_edith -->|"reads security facts"| node_windows
node_inboxsource -->|"reads notifications"| node_windows
node_inboxsource -->|"sends notifications"| node_inbox
node_user -->|"asks"| node_karen
node_karen -->|"delegates unknowns"| node_llm
node_llm -->|"queries locally"| node_ollama
node_karen -->|"creates reminders"| node_reminders
node_karen -->|"opens recap"| node_dailyweb
node_user -->|"starts capture"| node_capture
node_capture -->|"renders panel"| node_comic
node_user -->|"starts focus"| node_webtimer
node_webtimer -->|"shows timer"| node_widget
node_dailyweb -->|"uses counters"| node_daystats
node_user -->|"earns and equips"| node_suits
node_user -->|"requests help"| node_cli
node_cli -->|"reads commands"| node_helpdata
node_user -->|"checks updates"| node_updater
node_updater -->|"checks releases"| node_releases

click node_host "https://github.com/dhruvharani1/spidey-sense/blob/main/main.js"
click node_autostart "https://github.com/dhruvharani1/spidey-sense/blob/main/autostart.js"
click node_speech "https://github.com/dhruvharani1/spidey-sense/blob/main/speech.js"
click node_widget "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/app.js"
click node_radar "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/spider.js"
click node_webtimer "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/app.js"
click node_karen "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/karen.js"
click node_llm "https://github.com/dhruvharani1/spidey-sense/blob/main/karen-llm.js"
click node_capture "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/capture.js"
click node_comic "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/comic.js"
click node_guardian "https://github.com/dhruvharani1/spidey-sense/blob/main/guardian.js"
click node_edith "https://github.com/dhruvharani1/spidey-sense/blob/main/edith.js"
click node_inboxsource "https://github.com/dhruvharani1/spidey-sense/blob/main/notifications.js"
click node_inbox "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/inbox.js"
click node_reminders "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/reminders.js"
click node_dailyweb "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/bugle.js"
click node_daystats "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/daystats.js"
click node_suits "https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/suits.js"
click node_cli "https://github.com/dhruvharani1/spidey-sense/blob/main/bin/spidey.js"
click node_helpdata "https://github.com/dhruvharani1/spidey-sense/blob/main/help-data.js"
click node_updater "https://github.com/dhruvharani1/spidey-sense/blob/main/updater.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_host,node_autostart,node_speech,node_user toneBlue
class node_widget,node_radar,node_webtimer,node_karen,node_llm,node_capture,node_comic toneAmber
class node_guardian,node_edith,node_inboxsource,node_inbox toneMint
class node_reminders,node_dailyweb,node_daystats,node_suits toneRose
class node_cli,node_helpdata,node_updater,node_ollama,node_windows,node_releases toneIndigo
```

## Components

### Desktop host

- [Electron host](https://github.com/dhruvharani1/spidey-sense/blob/main/main.js): `main.js`
- [Login startup](https://github.com/dhruvharani1/spidey-sense/blob/main/autostart.js): `autostart.js`
- [Spoken replies](https://github.com/dhruvharani1/spidey-sense/blob/main/speech.js): `speech.js`

### Widget experience

- [Spider widget](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/app.js): `renderer/app.js`
- [Vitals radar](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/spider.js): `renderer/spider.js`
- [Focus timer](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/app.js): `renderer/app.js`
- [Karen assistant](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/karen.js): `renderer/karen.js`
- [Local model bridge](https://github.com/dhruvharani1/spidey-sense/blob/main/karen-llm.js): `karen-llm.js`
- [Comic capture](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/capture.js): `renderer/capture.js`
- [Panel rendering](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/comic.js): `renderer/comic.js`

### Sensing and safety

- [Guardian monitor](https://github.com/dhruvharani1/spidey-sense/blob/main/guardian.js): `guardian.js`
- [E.D.I.T.H. scan](https://github.com/dhruvharani1/spidey-sense/blob/main/edith.js): `edith.js`
- [Windows inbox reader](https://github.com/dhruvharani1/spidey-sense/blob/main/notifications.js): `notifications.js`
- [Notification inbox](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/inbox.js): `renderer/inbox.js`

### Personal tools

- [Reminders](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/reminders.js): `renderer/reminders.js`
- [Daily Web](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/bugle.js): `renderer/bugle.js`
- [Daily counters](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/daystats.js): `renderer/daystats.js`
- [Suit Locker](https://github.com/dhruvharani1/spidey-sense/blob/main/renderer/suits.js): `renderer/suits.js`

### Help and updates

- [Manual CLI](https://github.com/dhruvharani1/spidey-sense/blob/main/bin/spidey.js): `bin/spidey.js`
- [Command reference](https://github.com/dhruvharani1/spidey-sense/blob/main/help-data.js): `help-data.js`
- [Auto-updater](https://github.com/dhruvharani1/spidey-sense/blob/main/updater.js): `updater.js`

### Other components

- **User**
- **Ollama**
- **Windows services**
- **GitHub releases**

## Connections

- User → Electron host: opens widget (evidence: `README.md`)
- Electron host → Spider widget: shows dashboard (evidence: `README.md`)
- Electron host → Login startup: syncs startup (evidence: `main.js`)
- Electron host → Spoken replies: uses speech (evidence: `main.js`)
- Electron host → Guardian monitor: starts monitor (evidence: `main.js`)
- Electron host → E.D.I.T.H. scan: runs scan (evidence: `main.js`)
- Electron host → Windows inbox reader: starts polling (evidence: `main.js`)
- Electron host → Auto-updater: starts updates (evidence: `main.js`)
- Electron host → Vitals radar: sends vitals (evidence: `README.md`)
- Vitals radar → Spider widget: renders status (evidence: `README.md`)
- Electron host → Windows services: reads system state (evidence: `README.md`)
- Guardian monitor → Windows services: checks activity (evidence: `README.md`)
- E.D.I.T.H. scan → Windows services: reads security facts (evidence: `README.md`)
- Windows inbox reader → Windows services: reads notifications (evidence: `notifications.js`)
- Windows inbox reader → Notification inbox: sends notifications (evidence: `README.md`)
- User → Karen assistant: asks (evidence: `README.md`)
- Karen assistant → Local model bridge: delegates unknowns (evidence: `renderer/karen.js`)
- Local model bridge → Ollama: queries locally (evidence: `karen-llm.js`)
- Karen assistant → Reminders: creates reminders (evidence: `renderer/karen.js`)
- Karen assistant → Daily Web: opens recap (evidence: `renderer/karen.js`)
- User → Comic capture: starts capture (evidence: `README.md`)
- Comic capture → Panel rendering: renders panel (evidence: `README.md`)
- User → Focus timer: starts focus (evidence: `README.md`)
- Focus timer → Spider widget: shows timer (evidence: `README.md`)
- Daily Web → Daily counters: uses counters (evidence: `README.md`)
- User → Suit Locker: earns and equips (evidence: `README.md`)
- User → Manual CLI: requests help (evidence: `README.md`)
- Manual CLI → Command reference: reads commands (evidence: `bin/spidey.js`)
- User → Auto-updater: checks updates (evidence: `README.md`)
- Auto-updater → GitHub releases: checks releases (evidence: `README.md`)
