<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mojtaba Hassani</title>
    <description>The latest articles on DEV Community by Mojtaba Hassani (@mojtaba_hassani_334c9c0d7).</description>
    <link>https://dev.to/mojtaba_hassani_334c9c0d7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4270267%2Fb246a7d8-d367-40bc-9833-170083d9821d.gif</url>
      <title>DEV Community: Mojtaba Hassani</title>
      <link>https://dev.to/mojtaba_hassani_334c9c0d7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mojtaba_hassani_334c9c0d7"/>
    <language>en</language>
    <item>
      <title>Building an Offline Single-File (&lt;900KB) Markdown &amp; Bidirectional Document Studio</title>
      <dc:creator>Mojtaba Hassani</dc:creator>
      <pubDate>Sat, 28 Nov 2026 07:55:12 +0000</pubDate>
      <link>https://dev.to/mojtaba_hassani_334c9c0d7/building-an-offline-single-file-900kb-markdown-bidirectional-document-studio-83l</link>
      <guid>https://dev.to/mojtaba_hassani_334c9c0d7/building-an-offline-single-file-900kb-markdown-bidirectional-document-studio-83l</guid>
      <description>&lt;p&gt;When converting technical Markdown documents into presentation-ready DOCX, PDF, or print deliverables, developers routinely hit three frustrating edge cases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Mixed-Script Bidi Layout Breakage:&lt;/strong&gt; When a document mixes RTL scripts (such as Persian or Arabic) with LTR English words, inline code runs (&lt;code&gt;&amp;lt;code&amp;gt;const x = 1;&amp;lt;/code&amp;gt;&lt;/code&gt;), or Latin heading identifiers, standard Markdown renderers often flip question marks (&lt;code&gt;?Why&lt;/code&gt;), misalign tables, or break list indentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy Binary &amp;amp; Spatial Spreadsheet Formats:&lt;/strong&gt; Opening older binary &lt;code&gt;.xls&lt;/code&gt; exports (OLE2 Compound File / BIFF8 records) or FastReport &lt;code&gt;.fp3&lt;/code&gt; coordinate-based XML reports normally pulls in bloated third-party dependencies or requires sending sensitive financial data to an external cloud server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry &amp;amp; Destructive Cloud Silos:&lt;/strong&gt; Sensitive engineering and administrative documents need an offline-first, zero-telemetry studio that operates reliably from &lt;code&gt;file://&lt;/code&gt; or &lt;code&gt;127.0.0.1&lt;/code&gt; and guarantees that user revisions are never silently destroyed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this, I open-sourced &lt;strong&gt;DocLoom&lt;/strong&gt; under the MIT license.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is DocLoom?
&lt;/h2&gt;

&lt;p&gt;DocLoom is a self-contained document compiler and live studio bundled into a single standalone HTML file under &lt;code&gt;900 KB&lt;/code&gt; (including inlined subset WOFF2 fonts), an installable Progressive Web App (PWA), and an optional zero-dependency Node.js companion server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Architectural Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pure-JS Zero-Dependency OLE2 &amp;amp; BIFF8 Engine:&lt;/strong&gt; Parses binary &lt;code&gt;.xls&lt;/code&gt; files directly in memory using custom OLE2 sector allocation tables (FAT/DIFAT/mini-FAT) and BIFF8 record streams without external libraries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FastReport (.fp3) Spatial Table Reconstruction:&lt;/strong&gt; Delivers a pure geometric layout algorithm that turns arbitrary 2D memo coordinates into structured, semantic HTML tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-Block Bidi Direction Engine:&lt;/strong&gt; Automatically inspects typography script vectors per paragraph, heading, list item, and table while strictly isolating inline code spans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client-Side OOXML (.docx) Package Generator:&lt;/strong&gt; Builds native Word documents directly in the browser via clean XML stream generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;410 Unit &amp;amp; Fuzzing Tests:&lt;/strong&gt; Features a deterministic mutation fuzzing harness exercising corrupted sector chains, boundary splits, and extreme coordinate values.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Live in Browser
&lt;/h2&gt;

&lt;p&gt;No installation or registration required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Studio (PWA):&lt;/strong&gt; &lt;a href="https://mojtabahasani.github.io/DocLoom/" rel="noopener noreferrer"&gt;https://mojtabahasani.github.io/DocLoom/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Download Single-File HTML (~744 KB):&lt;/strong&gt; &lt;a href="https://mojtabahasani.github.io/DocLoom/DocLoom.html" rel="noopener noreferrer"&gt;https://mojtabahasani.github.io/DocLoom/DocLoom.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code on GitHub:&lt;/strong&gt; &lt;a href="https://github.com/mojtabahasani/DocLoom" rel="noopener noreferrer"&gt;https://github.com/mojtabahasani/DocLoom&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback, bug reports, and pull requests are warmly welcomed!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>markdown</category>
    </item>
  </channel>
</rss>
