# midttech/lunaverta architecture

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

- Interactive diagram: https://gitdiagram.com/midttech/lunaverta
- Repository: https://github.com/midttech/lunaverta

## Overview

LunaVerta is a static, browser-based file converter and PDF editor: users select local files, choose a tool, process documents on-device, then save the result. The graph preserves the README’s major capabilities and documented local state/offline behavior. Runtime source files were not excerpted, so capability links rely on README statements rather than claims about uninspected calls.

Main entry points: [`docs/assets/app.js`](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js) (Tool interface), [`docs/assets/editor.js`](https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js) (PDF editor), [`src/static/sw.js`](https://github.com/midttech/lunaverta/blob/main/src/static/sw.js) (Offline service worker), [`docs/assets/strings.js`](https://github.com/midttech/lunaverta/blob/main/docs/assets/strings.js) (Language strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Browser experience"]
  node_interface["Tool interface<br/>[app.js]"]
  node_language["Language strings<br/>[strings.js]"]
  node_output["Saved files"]
end

subgraph group_pdf["PDF workflows"]
  node_editor["PDF editor<br/>[editor.js]"]
  node_textstream["PDF text editor<br/>[pdf-text.js]"]
  node_reader["PDF reader<br/>[viewer.js]"]
  node_redaction["Sensitive data removal<br/>[editor.js]"]
  node_forms["Forms and signatures<br/>[editor.js]"]
  node_pageops["Page operations<br/>[app.js]"]
  node_merge["Merge and split<br/>[app.js]"]
  node_compare["PDF comparison<br/>[app.js]"]
  node_ocr["OCR<br/>[app.js]"]
  node_quote["Quote pricing<br/>[editor.js]"]
end

subgraph group_conversion["Conversion tools"]
  node_documentconv["Office conversion<br/>[app.js]"]
  node_imageconv["Image conversion<br/>[app.js]"]
  node_videoconv["Video and audio<br/>[app.js]"]
  node_photoextras["Photo utilities<br/>[app.js]"]
end

subgraph group_local["Local state and offline"]
  node_settings[("Browser settings")]
  node_workstate[("Unsaved editor work")]
  node_worker["Offline service worker<br/>[sw.js]"]
end

node_user(("User"))

node_user -->|"chooses files"| node_interface
node_interface -->|"converts documents"| node_documentconv
node_interface -->|"converts images"| node_imageconv
node_interface -->|"converts media"| node_videoconv
node_interface -->|"runs photo tools"| node_photoextras
node_interface -->|"opens editor"| node_editor
node_editor -->|"edits text"| node_textstream
node_editor -->|"removes sensitive data"| node_redaction
node_editor -->|"edits forms"| node_forms
node_editor -->|"edits pages"| node_pageops
node_interface -->|"merges or splits"| node_merge
node_interface -->|"compares PDFs"| node_compare
node_interface -->|"runs OCR"| node_ocr
node_editor -->|"recalculates prices"| node_quote
node_user -->|"opens installed app"| node_reader
node_interface -->|"loads translations"| node_language
node_interface -->|"saves results"| node_output
node_editor -->|"keeps unsaved work"| node_workstate
node_interface -->|"stores preferences"| node_settings
node_worker -->|"caches app files"| node_interface

click node_interface "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_language "https://github.com/midttech/lunaverta/blob/main/docs/assets/strings.js"
click node_editor "https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js"
click node_textstream "https://github.com/midttech/lunaverta/blob/main/docs/assets/pdf-text.js"
click node_reader "https://github.com/midttech/lunaverta/blob/main/docs/assets/viewer.js"
click node_redaction "https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js"
click node_forms "https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js"
click node_pageops "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_merge "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_compare "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_ocr "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_documentconv "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_imageconv "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_videoconv "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_photoextras "https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js"
click node_quote "https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js"
click node_worker "https://github.com/midttech/lunaverta/blob/main/src/static/sw.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_interface,node_language,node_output,node_user toneBlue
class node_editor,node_textstream,node_reader,node_redaction,node_forms,node_pageops,node_merge,node_compare,node_ocr,node_quote toneAmber
class node_documentconv,node_imageconv,node_videoconv,node_photoextras toneMint
class node_settings,node_workstate,node_worker toneRose
```

## Components

### Browser experience

- [Tool interface](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Language strings](https://github.com/midttech/lunaverta/blob/main/docs/assets/strings.js): `docs/assets/strings.js`
- **Saved files**

### PDF workflows

- [PDF editor](https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js): `docs/assets/editor.js`
- [PDF text editor](https://github.com/midttech/lunaverta/blob/main/docs/assets/pdf-text.js): `docs/assets/pdf-text.js`
- [PDF reader](https://github.com/midttech/lunaverta/blob/main/docs/assets/viewer.js): `docs/assets/viewer.js`
- [Sensitive data removal](https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js): `docs/assets/editor.js`
- [Forms and signatures](https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js): `docs/assets/editor.js`
- [Page operations](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Merge and split](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [PDF comparison](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [OCR](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Quote pricing](https://github.com/midttech/lunaverta/blob/main/docs/assets/editor.js): `docs/assets/editor.js`

### Conversion tools

- [Office conversion](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Image conversion](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Video and audio](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`
- [Photo utilities](https://github.com/midttech/lunaverta/blob/main/docs/assets/app.js): `docs/assets/app.js`

### Local state and offline

- **Browser settings**
- **Unsaved editor work**
- [Offline service worker](https://github.com/midttech/lunaverta/blob/main/src/static/sw.js): `src/static/sw.js`

### Other components

- **User**

## Connections

- User → Tool interface: chooses files (evidence: `README.md`)
- Tool interface → Office conversion: converts documents (evidence: `README.md`)
- Tool interface → Image conversion: converts images (evidence: `README.md`)
- Tool interface → Video and audio: converts media (evidence: `README.md`)
- Tool interface → Photo utilities: runs photo tools (evidence: `README.md`)
- Tool interface → PDF editor: opens editor (evidence: `README.md`)
- PDF editor → PDF text editor: edits text (evidence: `README.md`)
- PDF editor → Sensitive data removal: removes sensitive data (evidence: `README.md`)
- PDF editor → Forms and signatures: edits forms (evidence: `README.md`)
- PDF editor → Page operations: edits pages (evidence: `README.md`)
- Tool interface → Merge and split: merges or splits (evidence: `README.md`)
- Tool interface → PDF comparison: compares PDFs (evidence: `README.md`)
- Tool interface → OCR: runs OCR (evidence: `README.md`)
- PDF editor → Quote pricing: recalculates prices (evidence: `README.md`)
- User → PDF reader: opens installed app (evidence: `README.md`)
- Tool interface → Language strings: loads translations (evidence: `README.md`)
- Tool interface → Saved files: saves results (evidence: `README.md`)
- PDF editor → Unsaved editor work: keeps unsaved work (evidence: `README.md`)
- Tool interface → Browser settings: stores preferences (evidence: `README.md`)
- Offline service worker → Tool interface: caches app files (evidence: `README.md`)
