# muisedestiny/zotero-style architecture

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

## Overview

Ethereal Style is a Zotero add-on that enriches the library with reading, tagging, rating, publication, and graph views. The main runtime path initializes the add-on, chooses a metadata store, registers event handling, and builds Zotero UI features. README capabilities are represented even where their implementations were only partially sampled. Edges follow shown startup calls, imports, or README descriptions; unsampled internals and external service wiring are not inferred.

Main entry points: [`src/modules/views.ts`](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/views.ts) (Column and view UI), [`src/hooks.ts`](https://github.com/muisedestiny/zotero-style/blob/master/src/hooks.ts) (Startup hooks), [`src/modules/events.ts`](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/events.ts) (Library events), [`src/modules/graphView.ts`](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/graphView.ts) (Relation graph)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime setup"]
  node_entry["Addon entry<br/>[index.ts]"]
  node_addon["Addon lifecycle<br/>[addon.ts]"]
  node_hooks["Startup hooks<br/>[hooks.ts]"]
  node_events["Library events<br/>[events.ts]"]
end

subgraph group_storage["Metadata storage"]
  node_itemstore[("Note-backed store<br/>[item.ts]")]
  node_filestore[("File-backed store<br/>[localStorage.ts]")]
end

subgraph group_library["Library features"]
  node_views["Column and view UI<br/>[views.ts]"]
  node_tags["Nested tags<br/>[tags.ts]"]
  node_publication["Publication ranks<br/>[easyscholar.ts]"]
  node_utils["Publication updates<br/>[utils.ts]"]
  node_requests["Request helpers<br/>[requests.ts]"]
end

subgraph group_visuals["Reading visuals"]
  node_graph["Relation graph<br/>[graphView.ts]"]
  node_bubble["Graph tooltips<br/>[bubble.ts]"]
  node_progress["Reading progress<br/>[progress.ts]"]
  node_raphael["Vector rendering<br/>[zotero-raphael.js]"]
end

subgraph group_preferences["Settings and locale"]
  node_prefs["Preferences<br/>[prefs.ts]"]
  node_locale["Localization<br/>[locale.ts]"]
end

node_zotero(("Zotero"))

node_zotero -->|"loads plugin"| node_entry
node_entry -->|"creates"| node_addon
node_addon -->|"registers hooks"| node_hooks
node_hooks -->|"registers settings"| node_prefs
node_hooks -->|"initializes locale"| node_locale
node_hooks -->|"selects storage"| node_itemstore
node_hooks -->|"selects storage"| node_filestore
node_hooks -->|"starts event handling"| node_events
node_hooks -->|"creates views"| node_views
node_events -->|"uses storage"| node_itemstore
node_events -->|"uses storage"| node_filestore
node_views -->|"renders progress"| node_progress
node_views -->|"uses rank data"| node_publication
node_views -->|"updates publication data"| node_utils
node_views -->|"creates graph view"| node_graph
node_views -->|"initializes tag view"| node_tags
node_graph -->|"creates tooltips"| node_bubble
node_progress -->|"renders curves"| node_raphael
node_views -->|"reads metadata"| node_itemstore
node_views -.->|"reads metadata"| node_filestore
node_views -->|"supports nested tags"| node_tags
node_views -->|"shows reading progress"| node_progress
node_views -->|"shows item graph"| node_graph

click node_entry "https://github.com/muisedestiny/zotero-style/blob/master/src/index.ts"
click node_addon "https://github.com/muisedestiny/zotero-style/blob/master/src/addon.ts"
click node_hooks "https://github.com/muisedestiny/zotero-style/blob/master/src/hooks.ts"
click node_events "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/events.ts"
click node_itemstore "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/item.ts"
click node_filestore "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/localStorage.ts"
click node_views "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/views.ts"
click node_tags "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/tags.ts"
click node_publication "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/easyscholar.ts"
click node_utils "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/utils.ts"
click node_graph "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/graphView.ts"
click node_bubble "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/bubble.ts"
click node_progress "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/progress.ts"
click node_raphael "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/zotero-raphael.js"
click node_prefs "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/prefs.ts"
click node_locale "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/locale.ts"
click node_requests "https://github.com/muisedestiny/zotero-style/blob/master/src/modules/requests.ts"

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_addon,node_hooks,node_events toneBlue
class node_itemstore,node_filestore toneAmber
class node_views,node_tags,node_publication,node_utils,node_requests toneMint
class node_graph,node_bubble,node_progress,node_raphael toneRose
class node_prefs,node_locale,node_zotero toneIndigo
```

## Components

### Runtime setup

- [Addon entry](https://github.com/muisedestiny/zotero-style/blob/master/src/index.ts): `src/index.ts`
- [Addon lifecycle](https://github.com/muisedestiny/zotero-style/blob/master/src/addon.ts): `src/addon.ts`
- [Startup hooks](https://github.com/muisedestiny/zotero-style/blob/master/src/hooks.ts): `src/hooks.ts`
- [Library events](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/events.ts): `src/modules/events.ts`

### Metadata storage

- [Note-backed store](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/item.ts): `src/modules/item.ts`
- [File-backed store](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/localStorage.ts): `src/modules/localStorage.ts`

### Library features

- [Column and view UI](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/views.ts): `src/modules/views.ts`
- [Nested tags](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/tags.ts): `src/modules/tags.ts`
- [Publication ranks](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/easyscholar.ts): `src/modules/easyscholar.ts`
- [Publication updates](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/utils.ts): `src/modules/utils.ts`
- [Request helpers](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/requests.ts): `src/modules/requests.ts`

### Reading visuals

- [Relation graph](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/graphView.ts): `src/modules/graphView.ts`
- [Graph tooltips](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/bubble.ts): `src/modules/bubble.ts`
- [Reading progress](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/progress.ts): `src/modules/progress.ts`
- [Vector rendering](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/zotero-raphael.js): `src/modules/zotero-raphael.js`

### Settings and locale

- [Preferences](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/prefs.ts): `src/modules/prefs.ts`
- [Localization](https://github.com/muisedestiny/zotero-style/blob/master/src/modules/locale.ts): `src/modules/locale.ts`

### Other components

- **Zotero**

## Connections

- Zotero → Addon entry: loads plugin (evidence: `src/index.ts`)
- Addon entry → Addon lifecycle: creates (evidence: `src/index.ts`)
- Addon lifecycle → Startup hooks: registers hooks (evidence: `src/addon.ts`)
- Startup hooks → Preferences: registers settings (evidence: `src/hooks.ts`)
- Startup hooks → Localization: initializes locale (evidence: `src/hooks.ts`)
- Startup hooks → Note-backed store: selects storage (evidence: `src/hooks.ts`)
- Startup hooks → File-backed store: selects storage (evidence: `src/hooks.ts`)
- Startup hooks → Library events: starts event handling (evidence: `src/hooks.ts`)
- Startup hooks → Column and view UI: creates views (evidence: `src/hooks.ts`)
- Library events → Note-backed store: uses storage (evidence: `src/modules/events.ts`)
- Library events → File-backed store: uses storage (evidence: `src/modules/events.ts`)
- Column and view UI → Reading progress: renders progress (evidence: `src/modules/views.ts`)
- Column and view UI → Publication ranks: uses rank data (evidence: `src/modules/views.ts`)
- Column and view UI → Publication updates: updates publication data (evidence: `src/modules/views.ts`)
- Column and view UI → Relation graph: creates graph view (evidence: `src/modules/views.ts`)
- Column and view UI → Nested tags: initializes tag view (evidence: `src/modules/views.ts`)
- Relation graph → Graph tooltips: creates tooltips (evidence: `src/modules/graphView.ts`)
- Reading progress → Vector rendering: renders curves (evidence: `src/modules/progress.ts`)
- Column and view UI → Note-backed store: reads metadata (evidence: `src/modules/views.ts`)
- Column and view UI → File-backed store: reads metadata (evidence: `src/modules/views.ts`)
- Column and view UI → Nested tags: supports nested tags (evidence: `README.md`)
- Column and view UI → Reading progress: shows reading progress (evidence: `README.md`)
- Column and view UI → Relation graph: shows item graph (evidence: `README.md`)
