HN
Today

Silurus/ooxml: Pixel-faithful Office documents, rendered in the browser

This project unveils Silurus/ooxml, a browser-based viewer for Microsoft Office documents, distinguished by its pixel-faithful rendering directly to an HTML Canvas element. Its unprecedented nature on Hacker News stems from the astonishing fact that its entire codebase was implemented by Claude, an AI assistant, without human application code. This remarkable achievement showcases advanced AI capabilities in generating complex, functional software from iterative prompts.

4
Score
0
Comments
#2
Highest Rank
4h
on Front Page
First Seen
Jun 7, 6:00 PM
Last Seen
Jun 7, 9:00 PM
Rank Over Time
6245

The Lowdown

Silurus/ooxml is an open-source project presenting a robust, browser-based viewer for Office Open XML (OOXML) document formats, including DOCX, XLSX, and PPTX. What sets this project apart is its truly unique origin: the entire application, from Rust parsers compiled to WebAssembly to TypeScript renderers, tests, and tooling, was generated by Anthropic's Claude AI through iterative prompting, containing no human-written application code. This impressive feat of AI-driven development results in a tool capable of pixel-faithful rendering of complex Office documents directly within a web browser's HTML Canvas.

  • AI-Generated Codebase: The project's most notable aspect is that 100% of its application code was written by Claude, demonstrating significant advancements in AI's ability to generate production-ready software.
  • Browser-Based Rendering: It provides a client-side solution for viewing DOCX, XLSX, and PPTX files, rendering them onto an HTML Canvas element with pixel fidelity.
  • Technical Architecture: Rust parsers are compiled to WebAssembly for efficient document processing, operating within Web Workers. The rendering logic, implemented in TypeScript, utilizes the Canvas 2D API on the main thread, primarily to leverage the document's FontFaceSet for accurate text layout.
  • Modularity and Extensibility: The library offers distinct viewers (DocxViewer, XlsxViewer, PptxViewer) and headless engines, allowing developers to integrate document viewing capabilities into custom UIs.
  • Comprehensive Feature Support: The viewer boasts extensive support for various document features across Word, Excel, and PowerPoint, including text formatting, tables, images, charts, and even complex elements like math equations (opt-in via MathJax).
  • Companion Tools: Beyond the core viewer, the project includes utility packages such as a Markdown converter, Node.js parsers for server-side use, a VS Code extension for in-editor viewing, and a Rust-based MCP server designed for AI agents to query OOXML files.
  • Security and Privacy: Emphasizes canvas-only rendering (no script execution), ZIP decompression limits for DoS prevention, XXE-safe XML parsing, and an opt-in approach for external dependencies like Google Fonts, ensuring user privacy by default. This project represents a significant technical achievement, not just in its functionality as a comprehensive OOXML viewer, but predominantly as a showcase of advanced AI capabilities in crafting an entire, complex software system. It offers developers a powerful and privacy-conscious tool for handling Office documents in web environments, all while pushing the boundaries of what's possible with AI code generation.