PHPackages                             lartisan/filament-architect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lartisan/filament-architect

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lartisan/filament-architect
===========================

A step-by-step wizard to generate full Eloquent and Filament resources straight from the Filament panel

v1.0.9(2mo ago)411.2k—0.9%4MITPHPPHP ^8.3CI passing

Since Mar 2Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/lartisan/filament-architect)[ Packagist](https://packagist.org/packages/lartisan/filament-architect)[ Docs](https://github.com/lartisan/filament-architect)[ RSS](/packages/lartisan-filament-architect/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (26)Versions (21)Used By (0)

Filament Architect
==================

[](#filament-architect)

A powerful [Filament](https://filamentphp.com) plugin that enables rapid scaffolding and generation of Eloquent models, migrations, factories, seeders, and Filament resources through an intuitive wizard interface.

[![Latest Version on Packagist](https://camo.githubusercontent.com/aa7e7c8d8953484429a0539d42e2d6feff0fc8673e391a95b94c4af678c85777/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172746973616e2f66696c616d656e742d6172636869746563742e737667)](https://packagist.org/packages/lartisan/filament-architect)[![GitHub Tests](https://camo.githubusercontent.com/ed72fe7a34c424a5f179a71157ced3bdec14cfab258f01a6d275a0af8afb6393/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6172746973616e2f66696c616d656e742d6172636869746563742f74657374732e796d6c3f6c6162656c3d5465737473)](https://github.com/lartisan/filament-architect/actions)[![Total Downloads](https://camo.githubusercontent.com/827ff586afffe3d233aee34082a94ec05a386339a4942db1489e3a4e6f24e19a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172746973616e2f66696c616d656e742d6172636869746563742e737667)](https://packagist.org/packages/lartisan/filament-architect)[![License](https://camo.githubusercontent.com/fa890a0dbb9748122e50c064f9e97d5a5e1e844efa02981627c4470e5e25217e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172746973616e2f66696c616d656e742d6172636869746563742e737667)](https://packagist.org/packages/lartisan/filament-architect)[![Live Demo](https://camo.githubusercontent.com/4744038d20051cdd6f1f8fb77194f56d7eea27ad5fabba4d5db09393ed161ad0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6976655f44656d6f2d6172636869746563742e66696c616d656e74636f6d706f6e656e74732e636f6d2d626c7565)](https://architect.filamentcomponents.com/)

[![Architect](https://private-user-images.githubusercontent.com/7920412/577085674-a49a605b-0d33-4321-aa92-114e8b96f9d5.jpeg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMDU3NDIsIm5iZiI6MTc4MjEwNTQ0MiwicGF0aCI6Ii83OTIwNDEyLzU3NzA4NTY3NC1hNDlhNjA1Yi0wZDMzLTQzMjEtYWE5Mi0xMTRlOGI5NmY5ZDUuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjIyVDA1MTcyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlYzNkOTYyYThmY2JiN2IyYTNhYTViNzQwY2YyMTMyN2Q0MmI4ZTNjOTIwYjgxYWIxYjYzOTg3YjQxMzJiMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRmpwZWcifQ.OaxP3nF4Wwb_yijehfTX2OV5ndp5PioNorcROO0W4E4)](https://private-user-images.githubusercontent.com/7920412/577085674-a49a605b-0d33-4321-aa92-114e8b96f9d5.jpeg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMDU3NDIsIm5iZiI6MTc4MjEwNTQ0MiwicGF0aCI6Ii83OTIwNDEyLzU3NzA4NTY3NC1hNDlhNjA1Yi0wZDMzLTQzMjEtYWE5Mi0xMTRlOGI5NmY5ZDUuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjIyVDA1MTcyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlYzNkOTYyYThmY2JiN2IyYTNhYTViNzQwY2YyMTMyN2Q0MmI4ZTNjOTIwYjgxYWIxYjYzOTg3YjQxMzJiMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRmpwZWcifQ.OaxP3nF4Wwb_yijehfTX2OV5ndp5PioNorcROO0W4E4)

Tip

**Try the live demo** — [architect.filamentcomponents.com](https://architect.filamentcomponents.com/)

Important

**Upgrading from `v0.2.x` or earlier?** `v1.0.0` introduces new database migrations.

```
composer require lartisan/filament-architect:^1.0
php artisan architect:upgrade
```

See [`UPGRADE.md`](UPGRADE.md) for the full upgrade steps.

It gives you a wizard for defining a table schema, then generates and updates the matching:

- Eloquent model
- migration
- factory
- seeder
- Filament resource and page classes

The current implementation is built for iterative work, not just first-time scaffolding. Existing blueprints can be created, merged, or replaced depending on the selected generation mode.

Quick Start
-----------

[](#quick-start)

> Prerequisite: you already have a Laravel app with a Filament panel set up.

> Upgrading from a pre-1.0.0 release? Skip to the [Upgrade](#upgrading-from-pre-100) section, or review [`UPGRADE.md`](UPGRADE.md).

1. Install the package.
2. Run the Architect installer.
3. Register the plugin in your Filament panel.
4. Open the **Architect** action in your panel and generate your first resource stack.

```
composer require lartisan/filament-architect
php artisan architect:install
```

```
use Lartisan\Architect\ArchitectPlugin;

->plugins([
    ArchitectPlugin::make(),
])
```

---

Highlights
----------

[](#highlights)

### Wizard-driven scaffolding inside Filament

[](#wizard-driven-scaffolding-inside-filament)

- Multi-step wizard with database, Eloquent, and review steps
- Live previews for:
    - migration
    - model
    - factory
    - seeder
    - Filament resource
- Existing blueprints can be listed, loaded back into the wizard, and deleted

### Generates the full stack around a model

[](#generates-the-full-stack-around-a-model)

Architect can generate:

- Eloquent models
- create migrations
- sync/update migrations for existing tables
- model factories
- seeders
- Filament resources
- Filament `List`, `Create`, `Edit`, and `View` pages

### Three generation modes

[](#three-generation-modes)

When files already exist, you can choose how Architect behaves:

- `create` — only create missing blueprints
- `merge` — refresh managed/generated sections while preserving custom code where possible
- `replace` — rewrite generated blueprints and unlock destructive rebuild workflows

`merge` is the default and the safest mode for day-to-day iteration.

### Merge-aware updates for existing code

[](#merge-aware-updates-for-existing-code)

The plugin now updates existing generated files instead of blindly overwriting them.

For models, factories, and Filament resources, the merge flow is parser-aware and uses `nikic/php-parser` to preserve custom code while refreshing generated structure. Seeders use a managed generated-region strategy.

Current merge support includes:

- **Model**

    - merges missing imports
    - merges traits like `HasFactory`, `SoftDeletes`, `HasUuids`, `HasUlids`
    - updates `$fillable`
    - adds inferred `belongsTo` relationships for foreign-key-like columns
    - preserves existing custom methods
- **Factory**

    - merges missing `definition()` keys
    - preserves existing custom values
    - preserves custom methods/state helpers
- **Seeder**

    - merges only the managed generated seeding region
    - preserves custom logic outside that region
    - hides managed markers from preview output
- **Filament Resource**

    - **v3 (monolithic):** merges generated `form()`, `table()`, and `infolist()` sections; preserves custom entries; keeps missing page classes
    - **v4 (domain):** merges each schema/table file independently (`*Form.php`, `*Infolist.php`, `*Table.php`); thin resource only syncs imports and `getEloquentQuery()`
    - removes stale managed fields when columns are removed from the blueprint
    - preserves existing page classes; creates missing ones

### Revision-aware migration previews and sync generation

[](#revision-aware-migration-previews-and-sync-generation)

Architect stores blueprint revisions after successful generation.

That revision history is used to make migration previews and sync migrations smarter:

- migration preview compares the current blueprint against the **latest generated revision**, not only the live database state
- sync migration generation follows the same revision-aware diff baseline
- this avoids re-showing or re-generating fields that belonged to a previous revision but were not yet applied in the database

### Safer schema evolution

[](#safer-schema-evolution)

Architect supports guarded schema changes for existing tables:

- additive sync migrations for new columns
- column type / nullable / default / index / unique changes
- likely rename detection
- destructive change gating for removed columns
- soft delete add/remove handling
- optional immediate migration execution
- automatic warning/defer behavior when risky schema operations are not explicitly allowed

### Better generated-file readability

[](#better-generated-file-readability)

When enabled, Architect will try to run a formatter after writing generated files.

It also normalizes merged output for several blueprint types so updated files stay readable, including:

- multiline resource arrays and fluent chains
- spacing between class members in models and factories
- multiline factory `definition()` arrays

### Filament panel integration

[](#filament-panel-integration)

- Works with **Filament 4 and 5** (legacy `v3` flat structure also supported via `ARCHITECT_FILAMENT_VERSION=v3`)
- Generates resources in the correct structure for your Filament version (`v4`/`v5` domain by default, `v3` flat as legacy) — controlled by `ARCHITECT_FILAMENT_VERSION`
- Registers as a global panel action through the plugin
- Can render as a normal button or icon button
- Supports these render hooks:
    - `PanelsRenderHook::GLOBAL_SEARCH_BEFORE`
    - `PanelsRenderHook::GLOBAL_SEARCH_AFTER`
    - `PanelsRenderHook::USER_MENU_AFTER`

### Production-aware visibility

[](#production-aware-visibility)

The Architect action is hidden in production by default unless explicitly enabled.

### Extension points for Premium / third-party packages

[](#extension-points-for-premium--third-party-packages)

Architect Core now exposes a small set of stable extension points so premium modules or internal packages can build on the OSS workflow without forking the generators.

- **Capability resolver**

    - resolve named capabilities such as `premium.blocks` or `premium.revisions.browser`
    - defaults to a safe false-y resolver until another package defines a capability
- **Block registry**

    - merge additional block definitions into an existing block list while preserving base ordering
    - useful for premium-only content blocks or internal blueprint presets
- **UI extension registry**

    - register additional Architect tabs
    - append create/edit schema fragments
    - append existing-resource fragments
- **Post-generation hooks**

    - run logic after a blueprint is generated and its revision is recorded
    - useful for audit trails, premium revision tooling, or project-specific follow-up automation
- **Versioned revision snapshots**

    - blueprint revisions now expose a versioned snapshot payload plus metadata
    - gives future diff / restore tooling a stable contract to build on

Minimal access example:

```
use Lartisan\Architect\ArchitectPlugin;

ArchitectPlugin::capabilities()->define('premium.blocks', true);

ArchitectPlugin::blocks()->register([
    'type' => 'premium-carousel',
    'label' => 'Premium Carousel',
]);

ArchitectPlugin::generationHooks()->afterGenerate(
    function ($blueprint, $blueprintData, $plan, bool $shouldRunMigration): void {
        // custom follow-up logic
    }
);
```

---

Planned premium edition
-----------------------

[](#planned-premium-edition)

Architect today is focused on strong open-source CRUD scaffolding and safe regeneration loops.

A premium edition — **Architect PRO** — builds on that foundation with workflows especially useful for larger teams, legacy projects, and more complex data models.

### Available in Architect PRO

[](#available-in-architect-pro)

These features are already shipped in the premium package:

- **Visual revision history**

    - browse stored blueprint revisions
    - GitHub-style diff view of changes between snapshots
- **Blueprint comments / notes**

    - annotate blueprints with inline notes
    - basic team communication around blueprint changes
- **Blueprint approval workflows**

    - request and track approval for blueprint changes
    - basic review flow (full team mode in development)
- **Audit log browser**

    - inspect a searchable log of blueprint-related activity

### Coming soon

[](#coming-soon)

These features are planned for future PRO releases:

- **Rollback / restore workflows**

    - one-click restore of a previous blueprint revision
    - streamline reverting generated files and related schema changes
- **Legacy adoption / reverse engineering**

    - import existing models, tables, and resources into Architect
    - generate an editable blueprint from an existing Laravel project
- **Advanced relationship tooling**

    - many-to-many and pivot-table support
    - polymorphic relationship support
    - richer Filament relationship generation flows
- **Full team collaboration**

    - blueprint locks and ownership
    - broader audit trails and collaboration tooling (approvals and comments are available now)
- **Priority support**

    - commercial support for teams that want faster feedback and help

> Some PRO features are already available; others are still in development. The open-source package described in this README is the free, currently available product.

### Waiting list / early-bird pricing

[](#waiting-list--early-bird-pricing)

Before the premium edition launches, a waiting list is planned.

The idea is to offer **early-bird launch pricing** to people who join that waiting list before release.

Until pricing and packaging are finalized, it is safest to describe this as:

- planned early-access / waiting-list announcement
- likely early-bird pricing for pre-launch signups
- final details to be confirmed at launch

[Join the waiting list](https://filamentcomponents.com/wailtlist/architect?source=github)
-----------------------------------------------------------------------------------------

[](#join-the-waiting-list)

Requirements
------------

[](#requirements)

- PHP `^8.3`
- Filament `^4.0|^5.0`

---

Installation
------------

[](#installation)

### Fresh install

[](#fresh-install)

```
composer require lartisan/filament-architect
php artisan architect:install
```

Then register the plugin in your Filament panel provider:

```
