BACK_TO_CASE_STUDIES
// DESKTOP_PRODUCT_CASE_STUDY / REVELITH

The office suitethat preserves the file.

ReveLith is an offline-first intelligent office suite for modern engineering, writing, and analysis—built around local privacy, native file fidelity, and AI that works inside the documents people already use.

06
OFFICE SURFACES
15
SHARED PACKAGES
1.1.4
CURRENT RELEASE
100%
TEST COVERAGE CLAIM
03
DESKTOP TARGETS
LOCAL
PRIVACY MODEL
// THE_PROBLEM

Office software usually makes you choose between fidelity, privacy, and intelligence.

Traditional editors reserialize complex files and can damage templates, macros, layouts, styles, or unsupported structures. Cloud-first AI adds a second concern: the document and prompt leave the machine. ReveLith treats the original file as a source of truth and brings context-aware assistance into a local desktop boundary.

// THE_THESIS

Patch what changed. Keep what works.

Every editor owns its native model, the AI layer operates through typed tools and streamed context, and saves modify only intentional dirty structures. The result is a unified office shell without flattening the formats that make professional documents valuable.

// END_TO_END_PRODUCT_FLOW

From double-click to durable artifact.

ReveLith’s differentiator is not one editor; it is the complete path connecting desktop orchestration, native parsing, local AI, surgical mutation, and release-grade verification.

/01

OPEN THE WORKSPACE

The Electron shell owns the desktop window, tabbed workspace, project switching, theme state, and isolated renderer surfaces for each editor.

/02

READ THE NATIVE FILE

A document is fingerprinted and archived before parsing. DOCX, XLSX, PPTX, PDF, and Markdown enter their own specialized model instead of being flattened into generic text.

/03

BUILD CONTEXT

The file-parse and AI-search layers extract text, structure, metadata, links, and visual context for the embedded copilot and tool surface.

/04

STREAM THE COPILOT

Agent Core streams model deltas, phases, tool calls, tool results, errors, and mutation summaries through a provider-neutral transport.

/05

PATCH THE ARTIFACT

AI and user operations mutate the typed document model. Only dirty structures are changed; untouched OOXML, layout, styles, and embedded elements remain protected.

/06

SAVE WITHOUT DRIFT

Focused deltas are injected back into the original container, while Markdown and exports use atomic writes so a crash cannot silently truncate the target file.

/07

VERIFY AND SHIP

Unit, integration, visual, fidelity, and Playwright end-to-end checks validate the result before CI builds Windows, macOS, and Linux installers.

// APPLICATION_SURFACE

Six surfaces. One document-aware shell.

// DOCS

Word documents without destructive round trips

A byte-preserving DOCX engine tokenizes OOXML into a block tree, tracks XML offsets, and patches only modified structures. Pagination, tracked changes, comments, equations, and ink remain part of the document surface.

// SHEETS

Spreadsheet analysis with a native calculation path

The Sheets surface combines an in-house Rust calculation engine with an XLSX sidecar, dynamic charts, pivot tables, slicers, formula tracing, conditional styling, and edit/save coverage.

// SLIDES

Presentation editing on the real OOXML model

Custom PPTX parsing preserves master and layout inheritance, shape transforms, non-destructive image cropping, connectors, SmartArt, tables, notes, animation, and smart layout snapping.

// PDF

Direct page-content editing

The PDF surface handles page content streams, font-preserving text updates, form filling, digital signatures, vector annotations, and export behavior without pretending a PDF is a plain document.

// MARKDOWN

A technical writing surface with plain-text truth

Block-based rich editing stays synchronized with Markdown, supports images and slash commands, and exports to DOCX and PDF while retaining a transparent source format.

// SHELL

The workspace that makes the suite feel like one product

The central shell coordinates tabs, projects, editor WebContentsViews, renderer URLs, shared IPC, themes, AI settings, release packaging, and the unified desktop experience.

// FORMAT_FIDELITY_MODEL

The original binary stays in the loop.

ReveLith avoids the dangerous “load everything into a new model and rewrite the file” shortcut. It fingerprints and archives the original, maps the structure, isolates dirty nodes, writes focused deltas, and validates the output against real fixtures and visual baselines.

NON_DESTRUCTIVE / BYTE_PRESERVING / ROUND_TRIP_AWARE
01 / SOURCEoriginal binary + fingerprint
02 / PARSEblock tree + XML offsets + native model
03 / ISOLATEuser and AI modifications only
04 / PATCHdirty OOXML structures
05 / REBUILDcompatible document container
06 / VERIFYfidelity fixtures + visual regression
// ENGINE_AND_AGENT_LAYERS

Native engines underneath an AI control loop.

// DOCX_ENGINE

OOXML tokenizer, block tree, offset mapping, delta patching, fidelity fixtures, and round-trip verification.

// PPTX_ENGINE / RENDER

Presentation parser, layout inheritance, transforms, media, tables, charts, notes, SmartArt, animation, and canvas rendering.

// FILE_PARSE

Multi-format text and metadata extraction that feeds searchable, context-aware AI operations.

// AGENT_CORE

Tool-schema contracts, streamed provider requests, multi-turn loops, skill dispatch, compaction, cancellation, truncation handling, and mutation snapshots.

// AI_PROVIDER

Resilient streaming abstraction for local and hosted model backends, with provider settings and normalized response handling.

// AI_SEARCH

Web search, documentation lookup, image synthesis, link display, and context tools exposed to the copilot.

// UI / ELECTRON_UTILS

Shared design tokens, localized UI, validated IPC, navigation guards, safe external URLs, atomic writes, and desktop utilities.

// AI_COPILOT_LOOP

Context-aware assistance that can explain what it changed.

The copilot is not a floating chat box detached from the file. It receives the active document context and typed tool contracts, streams work visibly, returns display-only images and links outside model context, and marks mutations so the editor can surface history and rollback paths.

01
REQUEST

The editor sends a typed operation with document context, selected content, attachments, settings, and available tool schemas.

02
STREAM

A local or hosted provider emits normalized deltas, phase changes, parsed tool calls, stop reasons, and completion signals.

03
EXECUTE

Tools run in the correct main-process or renderer boundary. The UI receives human-readable summaries and side-channel images or links.

04
MUTATE

When an operation changes a document, the runtime marks it as mutated and captures a pre-mutation snapshot for one-click rollback paths.

05
CONTINUE

Tool results return to the model as structured messages while display-only data stays outside the model context.

06
COMMIT

The user sees the result in the native editor, can review the diff or history, and saves through the format-specific persistence path.

// LOCAL_SECURITY_BOUNDARY

Privacy is a runtime property.

ReveLith places the sensitive path inside the desktop boundary: local files, prompts, editor state, and writes stay local unless the user explicitly configures a model provider or external tool. Privileged operations remain in the main process behind narrow IPC contracts.

LOCAL_FIRST

Document processing and editing run on the local machine. Files, prompts, and edits are not sent to unsolicited telemetry services.

RENDERER_ISOLATION

Electron renderers are isolated from privileged capabilities; system actions are exposed through narrow, validated bridges rather than arbitrary access.

SAFE_IPC

Main/renderer requests use typed channel contracts, schema-checked payloads, sender/session validation, and explicit operation handlers.

SAFE_NETWORK

External navigation and remote image retrieval validate protocols, reject private or link-local targets, and follow redirects under policy.

ATOMIC_PERSISTENCE

Same-directory temporary files and rename retries protect saves from crashes, antivirus locks, indexers, and partial writes.

FIRMWARE_OF_FIDELITY

Original binaries remain the source of truth; only intentional dirty nodes are patched, reducing drift in complex customer documents.

// QUALITY_AND_RELEASE

Fidelity is tested at every layer.

// UNIT SUITES

Engine-level tests cover OOXML patches, slide transforms, tables, media, charts, typography, Markdown nodes, agent loops, AI providers, and utility contracts.

// FIDELITY TOOLS

Pagination baselines, Word fidelity scripts, visual comparisons, theme-color checks, fixture generation, and third-party license checks protect regressions.

// E2E DESKTOP

Playwright scenarios cover onboarding, file tabs, Markdown, Sheets editing and save flows, insertion galleries, theme pipelines, and visual desktop behavior.

// RELEASE PIPELINE

CI runs across parallel Ubuntu runners, caches Rust builds, validates package locks, uploads release assets, and builds platform-specific installers.

// DISTRIBUTION_SURFACE

One codebase, three desktop targets.

STATUS::RELEASED / V1.1.4
WINDOWS

.exe installer via Electron packaging.

MACOS

.dmg builds for Apple Silicon and Intel, including universal Rust targets.

LINUX

.AppImage, .deb, and .rpm distribution paths.

DEVELOPMENT

Node 22.12+, npm 10+, Rust cargo, workspace scripts, targeted app dev servers, and full-suite build commands.

// IMPLEMENTATION_STACK
ElectronReactTypeScriptRustWebAssemblyOOXMLPDFiumVitestPlaywrightNode 22WindowsmacOSLinux