Skip to content
Back to catalogue

Desktop Application

InkWell

InkWell is a Rust and Tauri desktop workspace for reviewing Word drafts offline, editing embedded images, and preparing PDFs for print. I built the Rust commands that export accepted DOCX edits into a new copy and convert PDFs to CMYK with Ghostscript while preserving selectable text and vectors.

How it’s built View architecture

How it’s built

InkWell · Rust and Tauri desktop workspace for offline Word revision, AI image edits and CMYK PDFs

InkWell is a Windows and Linux desktop app for people preparing Word documents and print-ready PDFs. I built it in Rust, Tauri 2 and TypeScript: 12 Tauri commands drive an offline rule-based paraphrase engine across 16 rule modules, a DOCX image studio that sends one selected image to the OpenAI Images Edits API, and a two-pass Ghostscript pipeline that converts PDFs to CMYK with adjustable ink density. Export rewrites only accepted OOXML parts, and 100 Rust tests and 22 Playwright tests cover it.

Tauri commands
12
offline paraphrase rule modules
16
Rust tests
100
Playwright UI tests
22
lines of Rust
~12,800
GitHub Actions workflows
3

Technology and what it does here

Rust
All document processing, validation and API calls run in the native backend
Tauri 2
Desktop shell exposing 12 IPC commands plus native file dialogs
Ghostscript
Pdfwrite CMYK conversion with transfer-function ink density, bundled in Windows installer
lopdf
Validates PDF structure and checks page count is preserved after conversion
zip + roxmltree
Read and rewrite DOCX OOXML parts while raw-copying unchanged members
reqwest
Multipart calls to OpenAI Images Edits from Rust, never from the frontend
image crate
Decodes PNG, JPEG and WebP embedded images and enforces size limits
spaCy (optional)
Local Python clause-boundary parsing that guides structural sentence rewrites
TypeScript + Vite
Paraphrase, image studio and PDF optimizer interfaces
docx-preview
Renders Word pages in an isolated shadow root with local pagination
Playwright
Headless UI tests with mocked native IPC and OpenAI responses
GitHub Actions
Windows installer builds, upgrade test and private-key edition build

Implementation details

  • PDF conversion runs Ghostscript twice: a first pass strips document transfer functions, the second applies the chosen density as t(x)=1-d+d*x, then lopdf verifies the page count before an atomic save.
  • DOCX handling enforces limits of 80 MB archive, 256 MB expanded and 12 MB per XML part to reject zip bombs before parsing.
  • The spaCy mode is optional: the Rust side locates a Python interpreter (INKWELL_SPACY_PYTHON or python3/python) and falls back to built-in rules when it is missing or its draft fails validation.
  • A private two-person edition compiles an OpenAI key in through the opt-in Cargo feature private-key from a CI secret, and the workflow refuses to run in a public repo.

System architecture

InkWell uses a TypeScript interface and Rust commands in Tauri for offline Word review, image editing, and CMYK PDF conversion.

Drag to rotate

Offline Word review

  1. Passes to the next component: Selected paragraph
  2. Passes to the next component: Proposed wording and review checks

Word image editing

  1. Passes to the next component: Image and instructions
  2. Passes to the next component: Edited image

Print PDF conversion

  1. Passes to the next component: PDF and density
  2. Passes to the next component: Converted document

Component details

Technologies

  • Tauri
  • Rust
  • TypeScript
  • Ghostscript
  • OOXML

Next project · Full Stack Software Engineer

ACAIR Platform

Portfolio assistant

Gabriel’s projects, experience, and research