# yashagrawall/knowledge-base architecture

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

- Interactive diagram: https://gitdiagram.com/yashagrawall/knowledge-base
- Repository: https://github.com/yashagrawall/knowledge-base

## Overview

Yash’s Knowledge Base is a static browser viewer for an Obsidian vault. Readers navigate or search notes, open them in a multi-tab workspace, and explore rendered content, context, and graph connections. The documented author workflow compiles Markdown into browser-ready data; the graph includes this preparation stage because it produces the runtime vault data. Relationships are based on README statements and sampled source; unsampled wiring is not inferred.

Main entry points: [`vault-app.jsx`](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx) (Workspace and routing), [`vault-editor.jsx`](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-editor.jsx) (Note reader), [`build-vault.js`](https://github.com/yashagrawall/knowledge-base/blob/obsidian/build-vault.js) (Vault compiler), [`vault-rightpanel.jsx`](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-rightpanel.jsx) (Note context panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Vault preparation"]
  node_compiler["Vault compiler<br/>[build-vault.js]"]
  node_vaultdata["Compiled vault data<br/>[vault-data.js]"]
end

subgraph group_workspace["Reader workspace"]
  node_webapp["Workspace and routing<br/>[vault-app.jsx]"]
  node_search["Command search<br/>[vault-app.jsx]"]
  node_explorer["File explorer<br/>[vault-sidebar.jsx]"]
end

subgraph group_content["Content and context"]
  node_editor["Note reader<br/>[vault-editor.jsx]"]
  node_dataview["Dataview queries<br/>[vault-editor.jsx]"]
  node_context["Note context panel"]
end

subgraph group_exploration["Knowledge exploration"]
  node_graph["Force-directed graph<br/>[vault-graph.jsx]"]
  node_graphsettings["Graph settings<br/>[vault-graph.jsx]"]
end

subgraph group_presentation["Presentation controls"]
  node_tweaks["Reader preferences<br/>[vault-app.jsx]"]
  node_theme["Themes and layout<br/>[index.html]"]
  node_icons["Icon components<br/>[vault-icons.jsx]"]
end

node_author(("Vault author"))
node_reader(("Vault reader"))

node_author -->|"compiles vault"| node_compiler
node_compiler -->|"generates data"| node_vaultdata
node_reader -->|"opens viewer"| node_webapp
node_webapp -->|"reads notes"| node_vaultdata
node_webapp -->|"offers search"| node_search
node_webapp -->|"shows tree"| node_explorer
node_webapp -->|"opens tabs"| node_editor
node_editor -->|"evaluates queries"| node_dataview
node_webapp -->|"shows context"| node_context
node_context -->|"navigates headings"| node_editor
node_webapp -->|"opens graph"| node_graph
node_graphsettings -->|"adjusts physics"| node_graph
node_webapp -->|"sets preferences"| node_tweaks
node_webapp -.->|"renders themed UI"| node_theme
node_webapp -.->|"uses icons"| node_icons

click node_compiler "https://github.com/yashagrawall/knowledge-base/blob/obsidian/build-vault.js"
click node_vaultdata "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-data.js"
click node_webapp "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx"
click node_search "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx"
click node_explorer "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-sidebar.jsx"
click node_editor "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-editor.jsx"
click node_dataview "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-editor.jsx"
click node_context "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-rightpanel.jsx"
click node_graph "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-graph.jsx"
click node_graphsettings "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-graph.jsx"
click node_tweaks "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx"
click node_theme "https://github.com/yashagrawall/knowledge-base/blob/obsidian/index.html"
click node_icons "https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-icons.jsx"

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_compiler,node_vaultdata toneBlue
class node_webapp,node_search,node_explorer toneAmber
class node_editor,node_dataview,node_context toneMint
class node_graph,node_graphsettings toneRose
class node_tweaks,node_theme,node_icons,node_author,node_reader toneIndigo
```

## Components

### Vault preparation

- [Vault compiler](https://github.com/yashagrawall/knowledge-base/blob/obsidian/build-vault.js): `build-vault.js`
- [Compiled vault data](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-data.js): `vault-data.js`

### Reader workspace

- [Workspace and routing](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx): `vault-app.jsx`
- [Command search](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx): `vault-app.jsx`
- [File explorer](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-sidebar.jsx): `vault-sidebar.jsx`

### Content and context

- [Note reader](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-editor.jsx): `vault-editor.jsx`
- [Dataview queries](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-editor.jsx): `vault-editor.jsx`
- [Note context panel](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-rightpanel.jsx): `vault-rightpanel.jsx`

### Knowledge exploration

- [Force-directed graph](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-graph.jsx): `vault-graph.jsx`
- [Graph settings](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-graph.jsx): `vault-graph.jsx`

### Presentation controls

- [Reader preferences](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-app.jsx): `vault-app.jsx`
- [Themes and layout](https://github.com/yashagrawall/knowledge-base/blob/obsidian/index.html): `index.html`
- [Icon components](https://github.com/yashagrawall/knowledge-base/blob/obsidian/vault-icons.jsx): `vault-icons.jsx`

### Other components

- **Vault author**
- **Vault reader**

## Connections

- Vault author → Vault compiler: compiles vault (evidence: `README.md`)
- Vault compiler → Compiled vault data: generates data (evidence: `README.md`)
- Vault reader → Workspace and routing: opens viewer (evidence: `README.md`)
- Workspace and routing → Compiled vault data: reads notes (evidence: `README.md`)
- Workspace and routing → Command search: offers search (evidence: `README.md`)
- Workspace and routing → File explorer: shows tree (evidence: `README.md`)
- Workspace and routing → Note reader: opens tabs (evidence: `README.md`)
- Note reader → Dataview queries: evaluates queries (evidence: `vault-editor.jsx`)
- Workspace and routing → Note context panel: shows context (evidence: `README.md`)
- Note context panel → Note reader: navigates headings (evidence: `vault-rightpanel.jsx`)
- Workspace and routing → Force-directed graph: opens graph (evidence: `README.md`)
- Graph settings → Force-directed graph: adjusts physics (evidence: `vault-graph.jsx`)
- Workspace and routing → Reader preferences: sets preferences (evidence: `vault-app.jsx`)
- Workspace and routing → Themes and layout: renders themed UI (evidence: `README.md`)
- Workspace and routing → Icon components: uses icons (evidence: `vault-icons.jsx`)
