1. Overview & Architecture

MarkView is a modern, high-performance desktop Markdown application engineered with Tauri 2, Rust, React 19, TypeScript, and Tailwind CSS 4.

Unlike heavy Chromium-based Electron applications that consume hundreds of megabytes of RAM, MarkView uses the operating system's native webview (WebKitGTK on Linux, WebView2 on Windows, WKWebView on macOS) coupled with a multi-threaded Rust backend for directory traversals, regex searches, and file watching.

Technology Stack: • Desktop Framework: Tauri 2.x • Backend Core: Rust (std::fs, walkdir, regex, notify) • Frontend Framework: React 19 + TypeScript • Styling & Design: Tailwind CSS 4 • Code Highlighting: Shiki (25+ VS Code languages & themes) • Math & Equations: KaTeX (inline $...$ and block $$...$$) • Diagram Pipeline: Mermaid (flowchart, sequence, class, state) • Sanitization: rehype-sanitize whitelist schema

2. Installation & Packages

Standalone binaries are published for Linux. Download your target package:

AppImage (x86_64) DEB (amd64) DEB (arm64) RPM (x86_64)

Linux Command Line Installation

# 1. Run AppImage: chmod +x MarkView-1.0.0-x86_64.AppImage ./MarkView-1.0.0-x86_64.AppImage # 2. Install on Debian / Ubuntu / Linux Mint: sudo dpkg -i MarkView_1.0.0_amd64.deb # 3. Install on Fedora / RHEL / CentOS: sudo rpm -i MarkView-1.0.0-x86_64.rpm

3. Keyboard Shortcuts

MarkView includes full keyboard navigation for mouse-free document exploration:

Shortcut Action Description
Ctrl + P Quick Open Fuzzy search and instantly switch files in workspace
Ctrl + Shift + F Workspace Search Full regex content search across all workspace files
Ctrl + F In-Document Search Highlight matches in active document with Enter / Shift+Enter
Ctrl + [ / ] Back / Forward History stack navigation between visited markdown files
Ctrl + O Open File/Folder Launch system native file chooser dialog

4. Syntax, KaTeX & Diagrams

Code Blocks with Shiki

MarkView uses Shiki for accurate syntax highlighting. Theme choices include GitHub Dark, GitHub Light, One Dark Pro, Nord, Dracula, and Vitesse.

```rust fn main() { println!("Hello from MarkView!"); } ```

Mathematical Formulas with KaTeX

Write inline formulas with $E = mc^2$ or display blocks:

$$ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $$

Mermaid Diagrams

MarkView natively renders Mermaid diagrams:

```mermaid graph TD A[Markdown File] --> B[Rust AST Parser] B --> C[React 19 Renderer] C --> D[Shiki & KaTeX] ```

5. Workspace & File Watcher

When you open a workspace directory, MarkView launches a debounced filesystem watcher using Rust's notify crate.

  • External Edits: Edits made in external IDEs (VS Code, Neovim) are instantly detected and updated in MarkView without re-rendering flashes.
  • Scroll Preservation: Your scroll offset is automatically retained when documents re-render.
  • Relative Links: Clicking markdown links like [Setup](./setup.md) instantly navigates to that file in the workspace.
  • Local Images: Relative image paths (![Image](./assets/diagram.png)) are securely resolved through Tauri's local streaming protocol.

7. Security & Sandboxing

Security is central to MarkView's design:

  • AST HTML Sanitization: Raw HTML is strictly sanitized using rehype-sanitize, preventing XSS injection attacks.
  • External Links: Web URLs (https://...) never open in the local webview; they are delegated to your default OS browser via Tauri's Opener plugin.
  • 100% Offline: No telemetry, analytics, or remote API calls are executed. All engines run entirely locally.

8. Building from Source

To compile MarkView from source:

# 1. Clone repository: git clone https://github.com/dev-hints/MarkView.git cd MarkView # 2. Install dependencies: npm install # 3. Run in development mode: npm run tauri dev # 4. Build release binaries: npm run tauri build