CAD Blueprint plugin screenshot
No dark mode support
No multilingual support
Supports v5.x

CAD Blueprint by Maxim Tsatsura

Community

Interactive 2D CAD blueprint viewer and parametric drawing engine with layers, GOST dimensions, and SVG/DXF export.

Tags: Form Field Infolist Entry Forms Developer Tool
Supported versions:
5.x 4.x
Maxim Tsatsura avatar Author: Maxim Tsatsura

Package health

Automated checks of this plugin's Composer package

82 / 100
Security 68
Maintenance 100
Ecosystem 100
15 checks
  • Skipped: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
  • Skipped: Dependency update cooldown configured
  • Failed: Provides a security policy — View details on Plumb
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
  • Passed: composer.lock not committed by library — composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.2 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 2 weeks ago

Documentation

CAD Blueprint for Filament

Latest Version on Packagist Total Downloads NPM Core Engine License

Integration of the lightweight parametric 2D CAD blueprint engine cad-blueprint for Filament.

Render interactive engineering drawings, product configurator blueprints, cross-sections, and technical schemas directly inside Filament Forms and Infolists — with smooth pan & zoom, layer management, GOST & ISO dimension styles, and one-click SVG / DXF export.

Interactive CAD Blueprint Viewer UI

#Features

  • Interactive Pan & Zoom Viewer: Mouse wheel zoom to cursor, drag-to-pan, double-click to fit, and pinch-to-zoom on touch screens.
  • Lazy-Loaded Assets (x-load): The CAD engine bundle is loaded asynchronously on demand only on pages that render a blueprint.
  • Infolist & Form Components: Ready-to-use CadEntry for read-only views and CadViewerField for reactive Livewire forms.
  • Two-Way Livewire Integration: Automatically updates the drawing when Livewire state changes (preserving current zoom/pan) and dispatches cad-object-selected events when users click entities with an id.
  • Built-in Export: One-click download to SVG (paper-accurate millimeters) and DXF (R2007 UTF-8 / R2000).
  • Layer Control: Show, hide, or isolate CAD layers (Outline, Axes, Dimensions, Hatching) directly in the viewer.
  • Zero Node.js Requirement: Pre-compiled standalone ESM bundle included — works out of the box via php artisan filament:assets.

#Installation

Install the package via Composer and publish the Filament assets:

composer require maxim-tsatsura/filament-cad-blueprint
php artisan filament:assets

Optionally, you can publish the configuration file:

php artisan vendor:publish --tag="filament-cad-blueprint-config"

#Usage

#Infolist Entry (Read-only CAD Viewer)

Use CadEntry inside your resource Infolist to display a blueprint stored as a compact JSON string (generated by stringifyDocument(doc) from cad-blueprint):

use MaximTsatsura\FilamentCadBlueprint\Infolists\Components\CadEntry;
use Filament\Infolists\Infolist;

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist->schema([
        CadEntry::make('drawing_json')
            ->label('Engineering Blueprint')
            ->height('600px')
            ->toolbar(true)
            ->paperColor('#ffffff')
            ->fitMargin(16),
    ]);
}

#Form Field (Reactive CAD Viewer)

Use CadViewerField inside Filament forms. When the underlying state is updated in Livewire (for example, when recalculating a parametric drawing from form inputs), the viewer smoothly updates the blueprint while keeping the user's current zoom and pan position:

use MaximTsatsura\FilamentCadBlueprint\Forms\Components\CadViewerField;
use Filament\Forms\Form;

public static function form(Form $form): Form
{
    return $form->schema([
        CadViewerField::make('drawing_json')
            ->label('Product Blueprint')
            ->height('550px')
            ->toolbar(true)
            ->paperColor('#ffffff')
            ->fitMargin(24),
    ]);
}

#Dynamic Configuration with Closures

All configuration methods (height(), toolbar(), paperColor(), fitMargin()) accept closures that receive standard Filament utilities ($record, $get, $state):

CadEntry::make('drawing_json')
    ->height(fn ($record): string => $record->is_detailed ? '750px' : '450px')
    ->toolbar(fn (): bool => auth()->user()->can('export_blueprints'))

#Listening to Object Selection in Livewire

When a user clicks on a CAD entity that has an id assigned, the viewer dispatches a cad-object-selected Livewire event with the entity's id, layer, and model coordinates [x, y]:

use Livewire\Attributes\On;

#[On('cad-object-selected')]
public function onCadObjectSelected(string $id, ?string $layer, array $point): void
{
    // Example: highlight or open settings for the clicked part ID
    $this->selectedPartId = $id;
}

#Panel Plugin Registration (Optional)

While CadEntry and CadViewerField work as standalone components out of the box, you can optionally register the plugin in your PanelProvider to configure panel-wide defaults:

use MaximTsatsura\FilamentCadBlueprint\CadBlueprintPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(
            CadBlueprintPlugin::make()
                ->defaultScale('1:10')
                ->gost(true)
        );
}

#Generating Blueprints (cad-blueprint)

Drawings can be generated on the frontend, in a Node.js worker/microservice, or imported from DXF using the cad-blueprint engine and saved as compact JSON in a database column (text / json):

import { CadDocument, CadPath, polygon, dimLinear, stringifyDocument } from 'cad-blueprint';

const doc = new CadDocument({ gost: true, settings: { scale: '1:10' } });
doc.layers.create('Outline', { color: '#0f172a', lineWeight: 0.5 });
doc.layers.create('Dimensions', { color: '#0284c7', lineWeight: 0.2 });

const part = CadPath.start(0, 0).right(700).up(300).left(700).close().filletAll(20).build();
doc.addSheet('Main', [
    polygon(part, { layer: 'Outline', id: 'plate-main' }),
    dimLinear([0, 0], [700, 0], { offset: -60, layer: 'Dimensions' }),
    dimLinear([700, 0], [700, 300], { direction: 'vertical', offset: -60, layer: 'Dimensions' }),
]);

// Save this compact string to your Eloquent model's `drawing_json` attribute:
const drawingJson = stringifyDocument(doc);

#License

Distributed under the Mozilla Public License 2.0 (MPL-2.0). See LICENSE for details.

The author

Maxim Tsatsura avatar Author: Maxim Tsatsura

Full-stack developer specializing in Laravel, Filament, TypeScript, and 2D/3D web graphics. Creator of the cad-blueprint parametric CAD engine and engineering configurator tools.

Plugins
1
Stars
2