# arnaudhrn/obsidian-share architecture

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

- Interactive diagram: https://gitdiagram.com/arnaudhrn/obsidian-share
- Repository: https://github.com/arnaudhrn/obsidian-share

## Overview

Obsidian Share turns a local vault into a password-protected website: preparation converts notes and assets, optional Dataview and STL processing enriches them, and FTP publishes the result for PHP rendering and browsing. The browser UI, authentication, and 3D viewer are distinct user-facing capabilities. Some implementation details are unsampled; edges are limited to README statements and source-index references.

Main entry points: [`scripts/prepare_folder.py`](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/prepare_folder.py) (Prepare notes), [`scripts/dataview/__init__.py`](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/__init__.py) (Dataview facade), [`scripts/ftp_utils.py`](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/ftp_utils.py) (FTP transfer), [`scripts/dataview/executor.py`](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/executor.py) (Query execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Local preparation"]
  node_prepare["Prepare notes<br/>[prepare_folder.py]"]
  node_config["Deployment config<br/>[config.py]"]
  node_ftp["FTP transfer<br/>[ftp_utils.py]"]
end

subgraph group_dataview["Dataview processing"]
  node_dataview_api["Dataview facade<br/>[__init__.py]"]
  node_parser["Query parser<br/>[parser.py]"]
  node_extract["Note data extraction<br/>[data_extractor.py]"]
  node_executor["Query execution<br/>[executor.py]"]
  node_evaluator["Expression evaluation<br/>[evaluator.py]"]
  node_functions["Query functions<br/>[functions.py]"]
  node_renderer["Markdown output<br/>[renderer.py]"]
end

subgraph group_web["Published site"]
  node_published[("Published notes<br/>[config.json]")]
  node_auth_ui["Login and browser UI<br/>[index.php]"]
  node_markdown["Markdown rendering<br/>[view.php]"]
  node_stl_viewer["3D STL viewer<br/>[viewer.php]"]
end

subgraph group_assets["Asset processing"]
  node_stl_facade["STL processor<br/>[__init__.py]"]
  node_stl_extract["STL link detection<br/>[extractor.py]"]
  node_stl_process["STL copy and rewrite<br/>[processor.py]"]
end

node_vault(("Obsidian vault"))
node_visitor(("Site visitor"))

node_vault -->|"prepares"| node_prepare
node_prepare -->|"invokes"| node_dataview_api
node_dataview_api -->|"uses"| node_parser
node_dataview_api -->|"uses"| node_executor
node_dataview_api -->|"uses"| node_renderer
node_executor -->|"reads data"| node_extract
node_executor -->|"uses"| node_functions
node_renderer -->|"uses"| node_functions
node_prepare -->|"invokes"| node_stl_facade
node_stl_facade -->|"detects links"| node_stl_extract
node_stl_facade -->|"rewrites files"| node_stl_process
node_stl_process -->|"extracts links"| node_stl_extract
node_prepare -->|"reads settings"| node_config
node_ftp -->|"reads settings"| node_config
node_prepare -->|"uploads via"| node_ftp
node_ftp -->|"publishes files"| node_published
node_visitor -->|"opens site"| node_auth_ui
node_auth_ui -->|"serves notes"| node_published
node_auth_ui -->|"renders notes"| node_markdown
node_visitor -->|"views models"| node_stl_viewer

click node_prepare "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/prepare_folder.py"
click node_config "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/config.py"
click node_ftp "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/ftp_utils.py"
click node_dataview_api "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/__init__.py"
click node_parser "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/parser.py"
click node_extract "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/data_extractor.py"
click node_executor "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/executor.py"
click node_evaluator "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/evaluator.py"
click node_functions "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/functions.py"
click node_renderer "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/renderer.py"
click node_stl_facade "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/__init__.py"
click node_stl_extract "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/extractor.py"
click node_stl_process "https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/processor.py"
click node_published "https://github.com/arnaudhrn/obsidian-share/blob/main/server/config.json"
click node_auth_ui "https://github.com/arnaudhrn/obsidian-share/blob/main/server/index.php"
click node_markdown "https://github.com/arnaudhrn/obsidian-share/blob/main/server/view.php"
click node_stl_viewer "https://github.com/arnaudhrn/obsidian-share/blob/main/server/viewer.php"

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_prepare,node_config,node_ftp toneBlue
class node_dataview_api,node_parser,node_extract,node_executor,node_evaluator,node_functions,node_renderer toneAmber
class node_published,node_auth_ui,node_markdown,node_stl_viewer toneMint
class node_stl_facade,node_stl_extract,node_stl_process toneRose
class node_vault,node_visitor toneIndigo
```

## Components

### Local preparation

- [Prepare notes](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/prepare_folder.py): `scripts/prepare_folder.py`
- [Deployment config](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/config.py): `scripts/config.py`
- [FTP transfer](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/ftp_utils.py): `scripts/ftp_utils.py`

### Dataview processing

- [Dataview facade](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/__init__.py): `scripts/dataview/__init__.py`
- [Query parser](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/parser.py): `scripts/dataview/parser.py`
- [Note data extraction](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/data_extractor.py): `scripts/dataview/data_extractor.py`
- [Query execution](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/executor.py): `scripts/dataview/executor.py`
- [Expression evaluation](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/evaluator.py): `scripts/dataview/evaluator.py`
- [Query functions](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/functions.py): `scripts/dataview/functions.py`
- [Markdown output](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/dataview/renderer.py): `scripts/dataview/renderer.py`

### Published site

- [Published notes](https://github.com/arnaudhrn/obsidian-share/blob/main/server/config.json): `server/config.json`
- [Login and browser UI](https://github.com/arnaudhrn/obsidian-share/blob/main/server/index.php): `server/index.php`
- [Markdown rendering](https://github.com/arnaudhrn/obsidian-share/blob/main/server/view.php): `server/view.php`
- [3D STL viewer](https://github.com/arnaudhrn/obsidian-share/blob/main/server/viewer.php): `server/viewer.php`

### Asset processing

- [STL processor](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/__init__.py): `scripts/stl/__init__.py`
- [STL link detection](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/extractor.py): `scripts/stl/extractor.py`
- [STL copy and rewrite](https://github.com/arnaudhrn/obsidian-share/blob/main/scripts/stl/processor.py): `scripts/stl/processor.py`

### Other components

- **Obsidian vault**
- **Site visitor**

## Connections

- Obsidian vault → Prepare notes: prepares (evidence: `README.md`)
- Prepare notes → Dataview facade: invokes (evidence: `scripts/prepare_folder.py`)
- Dataview facade → Query parser: uses (evidence: `scripts/dataview/__init__.py`)
- Dataview facade → Query execution: uses (evidence: `scripts/dataview/__init__.py`)
- Dataview facade → Markdown output: uses (evidence: `scripts/dataview/__init__.py`)
- Query execution → Note data extraction: reads data (evidence: `scripts/dataview/executor.py`)
- Query execution → Query functions: uses (evidence: `scripts/dataview/executor.py`)
- Markdown output → Query functions: uses (evidence: `scripts/dataview/renderer.py`)
- Prepare notes → STL processor: invokes (evidence: `scripts/prepare_folder.py`)
- STL processor → STL link detection: detects links (evidence: `scripts/stl/__init__.py`)
- STL processor → STL copy and rewrite: rewrites files (evidence: `scripts/stl/__init__.py`)
- STL copy and rewrite → STL link detection: extracts links (evidence: `scripts/stl/processor.py`)
- Prepare notes → Deployment config: reads settings (evidence: `scripts/prepare_folder.py`)
- FTP transfer → Deployment config: reads settings (evidence: `scripts/ftp_utils.py`)
- Prepare notes → FTP transfer: uploads via (evidence: `scripts/prepare_folder.py`)
- FTP transfer → Published notes: publishes files (evidence: `README.md`)
- Site visitor → Login and browser UI: opens site (evidence: `README.md`)
- Login and browser UI → Published notes: serves notes (evidence: `README.md`)
- Login and browser UI → Markdown rendering: renders notes (evidence: `server/index.php`)
- Site visitor → 3D STL viewer: views models (evidence: `README.md`)
