Back to projects
Document Conversion Web App · 2026

MD2TXT: Markdown-to-Document Engine

Turns Markdown and TeX from AI study notes into faithful documents, with rendered math and chemistry instead of leftover LaTeX commands, exported to clipboard, TXT, PDF, or DOCX.

[ EVD ]

Engineering evidence

My contribution
Solo · Product design, conversion architecture, frontend, and export service
Outcome
Live, MIT-licensed, with opt-in real-browser export tests
Decision record 01
Used a shared parsed document model instead of scraping the rendered DOM, so preview, clipboard, TXT, PDF, and DOCX keep the same meaning.

Live preview

[ ARC ]

Architecture

One parsed document tree drives every output, so the preview and each export agree. The server reparses the source rather than trusting the client.

  1. 01

    Parse (web worker)

    • unified + remark-gfm
    • remark-math, mhchem
    • Diagnostics with source links
  2. 02

    Document tree

    • Shared MathJax 4 adapter
    • Unsupported input kept visible
  3. 03

    Browser outputs

    • Formatted preview
    • Rich clipboard
    • Unicode TXT
  4. 04

    Export service

    • Playwright Chromium → PDF
    • docx + equation images → DOCX
    • 422 on hidden errors
[ KEY ]

Technical highlights

  1. 01

    Treated Markdown structure and TeX notation as separate parsing concerns, normalised into one model for every format.

  2. 02

    Blocked raw HTML and remote resource fetching, isolated each export in its own browser context, and made fallback exports an explicit user decision.

  3. 03

    Supports English, Bangla, Greek, and scientific symbols across outputs.

[ STK ]

Stack

  • TypeScript
  • Vite
  • Unified / Remark
  • MathJax 4
  • Playwright
  • docx
  • Node.js
  • Vercel