A native Nextcloud app providing DWG and DXF file viewing capabilities based on @mlightcad/cad-viewer.
- View DWG and DXF files directly in the Nextcloud web interface
- Fast browser-based rendering using WebGL technology
- Interactive controls: Zoom, pan, fit-to-view
- Layer management: Toggle layer visibility
- Theme support: Dark and light mode
- Fullscreen mode for detailed viewing
- Responsive design for desktop and mobile
| Nextcloud | 33+ |
| PHP | 8.2+ |
| Node.js | 24+ (development only) |
| pnpm | 10+ (development only) |
- Log in as an administrator
- Go to Settings → Apps
- Search for "CAD Viewer"
- Click Download and enable
# Clone to Nextcloud apps directory
git clone https://github.com/ashcoft/nextcloud-cad-viewer.git /path/to/nextcloud/apps/cad_viewer
# Build frontend assets
cd /path/to/nextcloud/apps/cad_viewer
pnpm install
pnpm run build- Navigate to any DWG or DXF file in Nextcloud
- Click the file to open it in the CAD Viewer
- Use toolbar controls to zoom, pan, toggle layers, or switch themes
| Format | Extension | MIME Types |
|---|---|---|
| AutoCAD DWG | .dwg |
application/acad, application/dwg, image/vnd.dwg |
| AutoCAD DXF | .dxf |
image/vnd.dxf, application/dxf, image/x-dxf |
# Install dependencies
pnpm install
# Development build with watch
pnpm run dev
# Production build
pnpm run build
# Lint and fix
pnpm run lint --fix
# Run tests
pnpm testnextcloud-cad-viewer/
├── src/ # Vue.js frontend
│ ├── main.js
│ ├── App.vue
│ ├── components/
│ ├── router/
│ └── utils/
├── lib/ # PHP backend
│ ├── AppInfo/
│ ├── Controller/
│ └── Listener/
├── appinfo/ # App metadata
├── css/
├── js/ # Compiled JavaScript
├── templates/
└── docs/
The release workflow automatically updates version files when a tag is pushed:
- package.json and package-lock.json via
pnpm version - appinfo/info.xml via sed
- CHANGELOG.md with new version entry
- Creates git commit and pushes changes
# Update version files locally
pnpm version 0.0.9 --no-git-tag-version
# Or via workflow_dispatch with version inputNo additional configuration required. File permissions are managed through Nextcloud's standard controls.
| Issue | Solution |
|---|---|
| Files not displaying | Verify app is enabled, check file format, check permissions |
| Slow loading | Optimize CAD file, check server resources |
| Missing layers | Ensure layers are not frozen in the source application |
| Mobile display issues | Use landscape orientation |
pnpm test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make changes and run linter/tests (
pnpm run lint --fix && pnpm test) - Build (
pnpm run build) - Commit and push (
git commit -m 'Add amazing feature' && git push) - Open a Pull Request
MIT License - see LICENSE file.