Web-based Office Suite - WebDecks

5 minute read.

WebDecks is a fully client-side web app that supports 80% of PPTX, DOCX, XLSX for both import and export. It can also write PDFs and handles large files well.

The slide deck rendering engine fits into 132kb gzipped WASM and renders slides in milliseconds on the GPU through WebGPU.

The WebDecks slide editor rendering the title deck on the GPUWebSheets showing a gallery of chart types built from small tables

Process

The specifications for the Microsoft office formats are public.

Creating a nice table with all the features listed was an easy job for an LLM. From then on, it was a matter of first bringing up the basic rendering for a deck, and then bit by bit adding feature by feature.

Choice of Tech

Running on C/C++ with WASM and WebGPU provides maximum portability: Not only will this run on the web, but also integrate nicely on native, with WebGPU acting as the graphics API abstraction. Don’t get distracted by the “Web” prefix! It’s way more than that.

Text Rendering

One of the most important parts for the entire office suite is the text rendering. I started off with a WASM + WebGPU implementation of Slug, inspired by slug-webgpu, but it took quite an effort to get it to render a bunch of edge cases correctly.

Huge shout-out to Eric Lengyell for releasing his algorithm into the public domain.

Having a good slug implementation meant that SVG rendering could later be done through it as well, rather than rasterizing through the browser. Mostly for consistency, but also to maintain native rendering support.

If you ever wondered, if there’s still a point to licensing Slug now that it’s in public domain, let me answer that for you: Eric’s implementation will remain unmatched in performance probably forever.

Oh. And charts! Yes, also the 3D ones.

Result

I have a programmable, fast, light-weight office suite engine, that supports all chart types, video, audio, images, effects from drop shadows to glow and mirror, embedded fonts, Excel’s formula’s, is memory efficient on large excel tables, and exports to PDF and open office formats.

And it turns out, agents are really good at building documents with it, too!

Have a look at the demo documents it built:

Code Quality

I’m extremely happy with the clean C/C++, written for compilation speed and binary size. All three apps compile in less than a minute. Imagine that.

The code is written like a next-gen game engine, high test coverage, benchmarks and a massive corpus of documents to compare against other renderers.

Summary and Outlook

I have yet just matched import and export. The UI is already rich, but lacking oh so much!

Agents are doing great crafting documents in JSON, but I think giving them more control, e.g. via WebMCP would be a game changer, especially for incremental edits.

The entire project taught me to admire PowerPoint much more. It’s complexity by far exceeds Excel and Word.