A powerful Filament plugin that enables rapid scaffolding and generation of Eloquent models, migrations, factories, seeders, and Filament resources through an intuitive wizard interface.
[!TIP] Try the live demo — architect.filamentcomponents.com
[!IMPORTANT] Upgrading from
v0.2.xor earlier?v1.0.0introduces new database migrations.composer require lartisan/filament-architect:^1.0 php artisan architect:upgradeSee
UPGRADE.mdfor the full upgrade steps.
It gives you a wizard for defining a table schema, then generates and updates the matching:
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.
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 section, or review
UPGRADE.md.
composer require lartisan/filament-architect
php artisan architect:install
use Lartisan\Architect\ArchitectPlugin;
->plugins([
ArchitectPlugin::make(),
])
Architect can generate:
List, Create, Edit, and View pagesWhen files already exist, you can choose how Architect behaves:
create — only create missing blueprintsmerge — refresh managed/generated sections while preserving custom code where possiblereplace — rewrite generated blueprints and unlock destructive rebuild workflowsmerge is the default and the safest mode for day-to-day iteration.
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
HasFactory, SoftDeletes, HasUuids, HasUlids$fillablebelongsTo relationships for foreign-key-like columnsFactory
definition() keysSeeder
Filament Resource
form(), table(), and infolist() sections; preserves custom entries; keeps missing page classes*Form.php, *Infolist.php, *Table.php); thin resource only syncs imports and getEloquentQuery()Architect stores blueprint revisions after successful generation.
That revision history is used to make migration previews and sync migrations smarter:
Architect supports guarded schema changes for existing tables:
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:
definition() arraysv3 flat structure also supported via ARCHITECT_FILAMENT_VERSION=v3)v4/v5 domain by default, v3 flat as legacy) — controlled by ARCHITECT_FILAMENT_VERSIONPanelsRenderHook::GLOBAL_SEARCH_BEFOREPanelsRenderHook::GLOBAL_SEARCH_AFTERPanelsRenderHook::USER_MENU_AFTERThe Architect action is hidden in production by default unless explicitly enabled.
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
premium.blocks or premium.revisions.browserBlock registry
UI extension registry
Post-generation hooks
Versioned revision snapshots
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
}
);
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.
These features are already shipped in the premium package:
Visual revision history
Blueprint comments / notes
Blueprint approval workflows
Audit log browser
These features are planned for future PRO releases:
Rollback / restore workflows
Legacy adoption / reverse engineering
Advanced relationship tooling
Full team collaboration
Priority support
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.
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:
^8.3^4.0|^5.0composer require lartisan/filament-architect
php artisan architect:install
Then register the plugin in your Filament panel provider:
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use Lartisan\Architect\ArchitectPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ArchitectPlugin::make(),
]);
}
}
architect:install publishes assets and migrations, runs php artisan migrate, and registers a Composer hook for filament:assets.
If you are upgrading from any pre-1.0.0 release (v0.2.x, v0.1.x, etc.):
composer require lartisan/filament-architect:^1.0
php artisan architect:upgrade
architect:upgrade publishes the new migrations, runs php artisan migrate, and backfills initial revisions for existing blueprints.
Tip: Run
php artisan architect:upgrade --dry-runfirst to preview which blueprints will be backfilled without writing any changes.
For a detailed walkthrough, see UPGRADE.md.
Register the plugin in your panel provider:
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use Lartisan\Architect\ArchitectPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ArchitectPlugin::make(),
]);
}
}
Optional plugin customization:
use Filament\View\PanelsRenderHook;
use Lartisan\Architect\ArchitectPlugin;
ArchitectPlugin::make()
->iconButton()
->renderHook(PanelsRenderHook::USER_MENU_AFTER);
Architect uses sensible runtime fallbacks, but the available options are defined in config/architect.php.
Key options include:
showgenerate_factorygenerate_seedergenerate_resourcedefault_generation_modeformat_generated_filesformattermodels_namespacefactories_namespaceseeders_namespaceresources_namespacefilament_versionExample configuration:
return [
'show' => env('ARCHITECT_SHOW', false),
'generate_factory' => env('ARCHITECT_GENERATE_FACTORY', true),
'generate_seeder' => env('ARCHITECT_GENERATE_SEEDER', true),
'generate_resource' => env('ARCHITECT_GENERATE_RESOURCE', true),
'default_generation_mode' => env('ARCHITECT_DEFAULT_GENERATION_MODE', 'merge'),
'format_generated_files' => env('ARCHITECT_FORMAT_GENERATED_FILES', true),
'formatter' => env('ARCHITECT_FORMATTER', 'pint_if_available'),
'models_namespace' => env('ARCHITECT_MODELS_NAMESPACE', 'App\\Models'),
'factories_namespace' => env('ARCHITECT_FACTORIES_NAMESPACE', 'Database\\Factories'),
'seeders_namespace' => env('ARCHITECT_SEEDERS_NAMESPACE', 'Database\\Seeders'),
'resources_namespace' => env('ARCHITECT_RESOURCES_NAMESPACE', 'App\\Filament\\Resources'),
'filament_version' => env('ARCHITECT_FILAMENT_VERSION', 'v4'),
];
Useful environment variables:
ARCHITECT_SHOW=true
ARCHITECT_GENERATE_FACTORY=true
ARCHITECT_GENERATE_SEEDER=true
ARCHITECT_GENERATE_RESOURCE=true
ARCHITECT_DEFAULT_GENERATION_MODE=merge
ARCHITECT_FORMAT_GENERATED_FILES=true
ARCHITECT_FORMATTER=pint_if_available
ARCHITECT_MODELS_NAMESPACE=App\Models
ARCHITECT_FACTORIES_NAMESPACE=Database\Factories
ARCHITECT_SEEDERS_NAMESPACE=Database\Seeders
ARCHITECT_RESOURCES_NAMESPACE=App\Filament\Resources
ARCHITECT_FILAMENT_VERSION=v4
Architect supports two resource output structures depending on your installed Filament version.
Set ARCHITECT_FILAMENT_VERSION in your .env file:
| Value | Target | Structure |
|---|---|---|
v4 (default) |
Filament 4 / 5 | Domain folder per model (Resources/Users/) with separate Schemas/ and Tables/ sub-classes |
v3 |
Filament 3 | Flat structure (Resources/UserResource.php) with inline form, table and infolist |
# Filament 4 or 5 (default)
ARCHITECT_FILAMENT_VERSION=v4
# Filament 3
ARCHITECT_FILAMENT_VERSION=v3
Supported formatter values:
pint_if_available — run Pint only when a local binary existspint — try to run Pint from the local projectnone — disable formatter executionYou define the table structure:
id, uuid, or ulidreplace mode when the table already existsSupported column types in the wizard:
stringtextintegerunsignedBigIntegerbooleanjsondatedateTimeforeignIdforeignUuidforeignUlidPer-column options:
For foreign-key-like columns, you can also provide:
You choose:
You can:
Current code previews include:
Architect stores blueprints in the database so you can iterate over time.
Current blueprint management features:
Blueprint revisions are used to improve migration preview and sync generation accuracy across multiple iterations.
Current behavior: deleting a blueprint from the table is destructive. It also drops the related database table (if present), removes matching migration records, deletes generated files, and removes generated Filament resource pages.
Location depends on models_namespace.
Generated behavior includes:
$fillable from defined columnsHasFactorySoftDeletes / HasUuids / HasUlids when applicablebelongsTo relationships for foreign-key-like columnsRelationship inference currently supports columns such as:
user_idauthor_uuidcategory_ulidArchitect can generate:
Location depends on factories_namespace.
Generated definitions are inferred from column names and types, including special handling for:
Location depends on seeders_namespace.
Generated seeders use a managed region strategy so repeated generations can refresh the generated seeding block without wiping custom logic outside it.
Location depends on resources_namespace and filament_version.
Generated resource support includes:
Architect generates a thin resource that delegates to dedicated schema and table classes.
app/Filament/Resources/
└── Users/ # domain folder = Str::pluralStudly(model)
├── UserResource.php # thin — delegates to Form / Infolist / Table classes
├── Pages/
│ ├── CreateUser.php
│ ├── EditUser.php
│ ├── ListUsers.php
│ └── ViewUser.php
├── Schemas/
│ ├── UserForm.php # form()->components([...])
│ └── UserInfolist.php # infolist()->components([...])
└── Tables/
└── UsersTable.php # table()->columns([...])
In merge mode each file is updated independently: form fields merge into UserForm.php, table columns into UsersTable.php, and the thin UserResource.php only receives new imports and the getEloquentQuery() method if needed.
Architect generates a single monolithic resource with form, infolist, and table defined inline, matching the classic Filament v3 layout.
app/Filament/Resources/
├── UserResource.php # form(), infolist(), table() all inline
└── UserResource/
└── Pages/
├── CreateUser.php
├── EditUser.php
├── ListUsers.php
└── ViewUser.php
To use v3 output, add ARCHITECT_FILAMENT_VERSION=v3 to your .env.
When working against existing tables, Architect supports a safer regeneration workflow.
If a blueprint has prior revisions, Architect compares against the latest generated revision first.
This means:
| Blueprint | Managed / generated updates in merge mode |
Preserved in merge mode |
|---|---|---|
| Model | Missing imports, framework traits, $fillable, inferred belongsTo relationships |
Existing custom methods and existing relationship overrides |
| Factory | Missing definition() keys and generated imports |
Existing custom field values and custom state/helper methods |
| Seeder | Managed generated block inside run() |
Custom logic outside the managed seed region |
| Filament Resource (v3) | Managed form(), table(), infolist(), generated filters / bulk actions, missing page wiring |
Clearly custom unmatched entries where possible, existing page classes |
| Filament Resource (v4) | Thin resource: new imports + getEloquentQuery() if missing; *Form.php, *Infolist.php, *Table.php each merged independently |
Custom components in each schema/table file; custom page classes |
| Resource Pages | Missing generated page classes | Existing page classes and their custom logic |
| Migration Preview / Sync | Revision-aware diffing from the latest stored blueprint revision | Previous revisions stay as the baseline instead of being re-added from stale DB state |
merge mode is intended to refresh generated structure without flattening the whole file.replace mode is the option to use when you intentionally want Architect to rewrite generated blueprints.Architect is hidden in production by default.
To explicitly enable it:
ARCHITECT_SHOW=true
Render hook and icon button options are configured through ArchitectPlugin:
ArchitectPlugin::make()
->iconButton(true)
->renderHook(\Filament\View\PanelsRenderHook::GLOBAL_SEARCH_BEFORE);
Customize the color of the Architect action button or icon button:
ArchitectPlugin::make()
->actionColor('success')
When no custom color is provided, the action keeps Filament's default primary color.
Change where the Architect action is rendered in your panel:
use Filament\View\PanelsRenderHook;
ArchitectPlugin::make()
->renderHook(PanelsRenderHook::GLOBAL_SEARCH_BEFORE)
By default, the action is rendered at PanelsRenderHook::GLOBAL_SEARCH_BEFORE when the panel topbar is enabled, and at PanelsRenderHook::SIDEBAR_NAV_END when the panel uses ->topbar(false).
Available render hooks:
PanelsRenderHook::GLOBAL_SEARCH_BEFORE (default when the topbar is enabled)PanelsRenderHook::GLOBAL_SEARCH_AFTERPanelsRenderHook::USER_MENU_AFTERPanelsRenderHook::SIDEBAR_NAV_STARTPanelsRenderHook::SIDEBAR_NAV_END (default when the topbar is hidden)PanelsRenderHook::SIDEBAR_FOOTEROnce installed and configured, the Architect plugin adds an action button to your Filament panel. Click the "Architect" button to open the generation wizard.
Define your database table structure:
id (default), uuid, or ulidConfigure what to generate:
Model Name: Automatically generated from table name (e.g., projects → Project)
Generation Options (configurable via config/architect.php):
gen_factory: Generate model factory (default: true)gen_seeder: Generate database seeder (default: true)gen_resource: Generate Filament resource with CRUD pages (default: true)Note: Migrations and Models are always generated as they are core to the plugin's functionality.
Review your configuration and click "Save & Generate" to:
In the "Blueprints" tab, you can:
When you use the Architect wizard, it generates the following files:
app/Models/{ModelName}.phpdatabase/migrations/{timestamp}_create_{table_name}_table.phpdatabase/factories/{ModelName}Factory.phpdatabase/seeders/{ModelName}Seeder.phpOutput structure depends on ARCHITECT_FILAMENT_VERSION (default: v4).
v4 / v5 — domain structure:
app/Filament/Resources/{Models}/ (e.g. Resources/Users/UserResource.php)Schemas/{Model}Form.phpSchemas/{Model}Infolist.phpTables/{Models}Table.phpPages/List{Models}.php, Create{Model}.php, Edit{Model}.php, View{Model}.phpv3 — flat / monolithic:
app/Filament/Resources/{Model}Resource.php{Model}Resource/Pages/List{Models}.php, etc.Run tests:
composer test
Format code:
composer format
Lint with Pint:
composer lint
Architect currently focuses on fast CRUD scaffolding and safe regeneration loops for Laravel + Filament projects.
The strongest supported workflows today are:
merge modePlanned premium work is aimed at visual revision tooling, rollback workflows, legacy-project adoption, advanced relationships, and team-oriented collaboration features.
The MIT License (MIT). Please see LICENSE for more information.
How can I help you explore Laravel packages today?