CLI tool
mlightcad/cad-viewer avatar
mlightcad/cad-viewer

CAD-Viewer: A Browser-Only DWG/DXF Editor That Exports to a Single HTML File

The world’s first fully web-based DXF/DWG viewer and editor that runs entirely in the browser - no backend server required.

1,252 stars253 forksTypeScriptMIT

At a glance

What is it?
CAD-Viewer parses and renders DWG and DXF files entirely in the browser, no backend required. Its standout feature is one-click export to a self-contained HTML file that anyone can open offline.
Who is it for?
Adopt CAD-Viewer if you need serverless DWG/DXF viewing or editing in a web app, especially for privacy-sensitive or offline workflows, and if the one-click HTML export fits your sharing or archival needs. Skip it if your users rely on older browsers, if you need full CAD feature parity with desktop tools, or if you are not prepared to run Node.js 24 and pnpm 10.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • mlightcad/cad-viewer1,252 ★ · +375
Star history
Repository2026-08-012026-11-14
mlightcad/cad-viewer8771.3k

375 Stars in the last 105 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What CAD-Viewer Actually Solves

CAD-Viewer addresses a specific pain: viewing and editing DWG and DXF files without a backend server. Traditional web CAD tools often require a server to parse files or convert them to another format. CAD-Viewer claims to be the first web-based viewer and editor that operates entirely in the browser, parsing DWG/DXF, processing geometry, and rendering with THREE.js on the client. This means files never leave the device, which matters for privacy-sensitive workflows and air-gapped environments. The intended users are developers building cloud apps, teams needing offline access, and anyone who wants to share drawings without forcing recipients to install CAD software. The project also targets integration into platforms like CMS, Notion, and WeChat, as stated in the README.

The Single-File HTML Export Is the Differentiator

Most CAD viewers lock you into their own product. CAD-Viewer's one-click export to a single, self-contained HTML file is a genuinely different approach. The downloaded .html embeds the drawing snapshot and a lightweight viewer runtime, so recipients can open, pan, zoom, toggle layers, and measure distances in any modern browser, with no CAD app, no server, and no install. The README claims this offline viewer uses far less memory than traditional desktop tools when opening the same drawing, though no numbers are given. This export turns a live drawing into a portable artifact you can email, archive, or host on a static file server. For compliance archives or client handoffs, that is a concrete advantage over viewers that require the original application.

How It Works: Parsing and Rendering in the Browser

The core mechanism is client-side parsing. CAD-Viewer performs DWG/DXF parsing, geometry processing, and rendering directly in the browser, using THREE.js as the rendering engine. The repository is structured as a monorepo with packages, including @mlightcad/cad-simple-viewer, which contains the plugin system. Plugins implement the AcApPlugin interface and hook into viewer lifecycle via onLoad and onUnload, typically to register commands, add UI, or wire export/import pipelines. The README describes a modular architecture designed for extensibility. This means the viewer is not a monolithic app but a set of components you can integrate. The embed feature works via an iframe: you point the src to https://mlightcad.com/embed.html?url=yourfile.dwg&mode=review&toolbar=1, and the file is fetched from your URL and parsed in the visitor's browser. No upload to a third-party cloud happens.

Getting It Running: Commands and Prerequisites

The README gives explicit setup steps. You need Node.js version 24 or higher and pnpm version 10 or higher. Clone the repository, run pnpm install, then start the development server with pnpm dev for the full-featured viewer or pnpm dev:simple for the simple viewer. Building is pnpm build, and previewing is pnpm preview or pnpm preview:simple. The iframe embed is even simpler: a single line of HTML, no build step. For desktop browsers, operations are left-click to select, scroll wheel to zoom, middle-mouse drag to pan, and Del to erase. On touch devices, tap to select, pinch to zoom, single-finger drag to pan. These are the only usage instructions provided, so anything beyond them would need the API docs.

A Genuine Limitation: Browser and Feature Constraints

CAD-Viewer is not a full replacement for desktop CAD. The README mentions 'offline and online editing workflows' but does not list the full set of editing operations. The visible operations are select, zoom, pan, and erase. That is a limited editing surface compared to what AutoCAD or DraftSight offer. Also, the viewer relies on modern browser features and THREE.js, so older browsers will likely not work. The README says 'any modern browser' for the exported HTML, but that is a moving target. If your users are on legacy browsers or you need advanced CAD operations like dimensioning, layers management beyond toggling, or block editing, CAD-Viewer may be the wrong tool. The memory comparison claim is not backed by data in the README, so you cannot rely on it without testing.

The Real Alternative: A Server-Based CAD Viewer

The obvious alternative is a server-side approach like Autodesk Forge or a self-hosted conversion service that turns DWG into SVG or PDF on the server, then displays it in the browser. The difference is fundamental: those tools shift the parsing and rendering load to a backend, which means the client can be thin and the compatibility with complex drawings can be higher, but you must maintain a server, handle file uploads, and manage data privacy. CAD-Viewer eliminates that server entirely, but it pushes all the work to the client, so the browser must handle large files. The README claims high-performance viewing of large files with 60+ FPS, but that depends on the client hardware. If you already have a backend or need server-side processing for other reasons, a server-based viewer might integrate better. If you want zero infrastructure, CAD-Viewer wins.

Maintenance and Licensing: What the Repository Shows

The project is under the MIT license, which is permissive and allows commercial use, modification, and redistribution, with attribution. The repository is not archived, and the last push was August 24, 2026, with releases v1.6.3, v1.6.2, and v1.6.1 in the same month. That suggests active maintenance. The README lists community apps and integrations, including a Nextcloud app, a VS Code extension, and Linux packages via AUR and AppImage, which indicate a broader ecosystem. However, the README is the only source here; there is no changelog or migration guide visible. For upgrade cost, you would need to check the releases on GitHub. The plugin system means you can extend the viewer, but that also means you must keep your plugins compatible with the AcApPlugin interface across versions. The documentation is hosted on Read the Docs and GitHub Pages, so there is material to consult.

Editorial conclusion

Adopt CAD-Viewer if you need serverless DWG/DXF viewing or editing in a web app, especially for privacy-sensitive or offline workflows, and if the one-click HTML export fits your sharing or archival needs. Skip it if your users rely on older browsers, if you need full CAD feature parity with desktop tools, or if you are not prepared to run Node.js 24 and pnpm 10. Before adopting, verify that your target drawing set parses correctly and that the export HTML works in the browsers your recipients actually use. The project is actively maintained, with releases in August 2026, but you should still test the specific DWG versions you handle.

Frequently asked questions

Does CAD Viewer need a server to open a DWG file?

The library itself does not. Parsing, geometry processing and rendering happen in the browser, and an exported drawing opens as a single self-contained HTML file in any modern browser with no CAD app and no install.

Which packages does the CAD Viewer project publish?

At least three. One is a full Vue 3 application with menus, ribbons, dialogs, a command line and a status bar, one is a minimal vanilla TypeScript host that lazy-loads export plugins, and there is also a command-line tool with its own build and browser setup steps.

What license does CAD Viewer use?

The repository manifest declares MIT and a licence file is present at the root. The tree also contains a document named PROPRIETARY-PARSER, with a Chinese translation alongside it, which the page does not explain.

How does the CAD Viewer embed code get the file?

The iframe points at the vendor's embed page with the file address in a url query parameter, and the visitor's browser fetches and parses it. That means your file host has to allow a cross-origin read, and the drawing's address is visible in the embed URL.

Can I open a CAD drawing with no internet connection?

Yes, through the self-contained HTML export, which embeds a snapshot of the drawing and a lightweight viewer runtime. Among the community Linux packages, the Arch binary package bundles fonts and templates for fully offline opening, while the smaller source package relies on the system Electron.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mlightcad-cad-viewer.svg)](https://hysenlabs.com/projects/mlightcad-cad-viewer)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/mlightcad-cad-viewer.svg)](https://hysenlabs.com/projects/mlightcad-cad-viewer)

Was this useful?