cad-viewer  by mlightcad

Serverless CAD viewer and editor for the web

Created 9 months ago
811 stars

Top 42.8% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a fully web-based, serverless DXF/DWG viewer and editor that runs entirely within the browser. It addresses the limitations of traditional CAD software by enabling true offline usage, enhanced data security, and simplified sharing through self-contained HTML files. Ideal for cloud applications, privacy-sensitive workflows, and users needing to share CAD drawings without requiring recipients to install specific software or access a backend server.

How It Works

The core approach involves performing all DWG/DXF parsing, geometry processing, and rendering directly in the browser using WebGL-based rendering via THREE.js, coupled with advanced optimization techniques like custom shader materials, geometry batching, and instanced rendering. It features a modular plugin system built around @mlightcad/cad-simple-viewer, allowing for extensibility and integration of features like AI assistance, PDF/SVG export, and UI components without increasing the initial load footprint.

Quick Start & Requirements

  • Primary install/run command: Requires Node.js (>= 24) and pnpm (>= 10). Clone the repository, cd into it, and run pnpm install to set up. Development server starts with pnpm dev.
  • Prerequisites: Node.js >= 24, pnpm >= 10.
  • Links: Live Demo, API Docs, Wiki (URLs not provided in README text).

Highlighted Details

  • World's first fully web-based DXF/DWG viewer and editor.
  • One-click export to a single, self-contained HTML file embedding the drawing and viewer runtime for offline viewing.
  • High-performance viewing of large DWG/DXF files with smooth 60+ FPS rendering.
  • Extensible plugin system supporting features like an AI CAD agent (@mlightcad/cad-agent-plugin) and various export formats (@mlightcad/cad-html-plugin, @mlightcad/cad-pdf-plugin, @mlightcad/cad-svg-plugin).

Maintenance & Community

The project maintains active social media presences on X (Twitter), YouTube, Medium, and Juejin. Specific details on core maintainers, sponsorships, or dedicated community forums (like Discord/Slack) are not explicitly detailed in the provided README text.

Licensing & Compatibility

The project is licensed under the MIT license. This permissive license generally allows for commercial use and integration into closed-source applications without significant restrictions, beyond attribution.

Limitations & Caveats

External references (XRefs) are not currently supported due to browser file access limitations. DWG file compatibility can be affected by bugs in the underlying LibreDWG library, and very large DWG files may exceed memory limits during parsing with the open-source stack; a proprietary parser is available for licensing. Many advanced editing and drawing features are still marked as planned or in progress on the roadmap.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
67
Issues (30d)
7
Star History
120 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.