Appearance
React, Vue & Livewire Apps
Your app doesn't need a Filament admin to use FilamentCraft. Keep your own UI (Inertia with React, Vue or Svelte, Livewire, Blade) for sign-up, teams, settings and the list of pages, and open FilamentCraft's visual editor full screen when someone clicks Edit.
Fastest start
Clone a ready-made app: starter-react, starter-vue or starter-livewire. Each is Laravel's official starter kit with teams, where every team builds and publishes its own website. Already started from laravel new? Follow Add it to a Laravel starter kit.
What needs Filament and what doesn't
| Part | Runs on |
|---|---|
| The visual editor and its settings panel | Filament and Livewire, in a panel only the editor uses |
Published pages, sitemaps, robots.txt, llms.txt | Plain Laravel routes and Blade. Visitors never load Filament |
| Creating sites and listing pages from your code | Plain PHP |
filamentcraft/filamentcraft requires filament/filament, so Composer installs it, but you never configure it. Your users never see a Filament screen: the editor fills the window, and its All pages link takes them back to your app.
Install
After adding the registry:
bash
composer require filamentcraft/filamentcraft
php artisan filamentcraft:install --standalone --owner="App\Models\Team"Leave out --owner for a single-site app. --path=builder moves the editor from the default /site-editor; it must be a path no other panel uses. The command publishes the config and migrations, migrates, and writes and registers app/Providers/Filament/WebsiteEditorPanelProvider.php. It then prints the remaining steps for your app, which are the ones below.
1. Let your users in
Add the contracts and one trait to your user model, then say who edits which site:
php
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasTenants;
use FilamentCraft\Concerns\HasWebsiteEditor;
class User extends Authenticatable implements FilamentUser, HasTenants
{
use HasWebsiteEditor;
public function canUseWebsiteEditor(): bool
{
return $this->hasVerifiedEmail();
}
public function editableWebsiteOwners(): Collection
{
return $this->teams->filter(fn (Team $team) => $this->can('manageWebsite', $team))->values();
}
}HasWebsiteEditor implements Filament's canAccessPanel(), getTenants() and canAccessTenant() from those two methods, so the editor and your own UI read the same rules.
Access is opt-in
canUseWebsiteEditor() returns false until you override it, so nobody can open the editor after a fresh install. Return true only for users who may edit and publish your sites: with a single site and no owner model, every user it lets in can edit that site.
A user can't open another team's pages: the editor answers 404. With a single site, skip HasTenants and editableWebsiteOwners().
The owner model implements SiteOwner and uses HasSite (see Tenancy):
php
class Team extends Model implements SiteOwner
{
use HasSite;
}2. Link to the editor
EditorUrl builds editor links from anywhere and works out the panel and the tenant segment itself. Pass them to your pages as props:
php
use FilamentCraft\Editor\EditorUrl;
use FilamentCraft\Enums\RegionName;
EditorUrl::to($site); // the site's homepage
EditorUrl::to($template); // one page
EditorUrl::to($site, RegionName::Header); // the shared header
EditorUrl::to($template, locale: 'fr'); // one languageIt returns null when there's nothing to open: a site without pages, no editor panel, or a tenant panel where the site has no owner. Use a plain <a href> for the link, not your router's link component: the editor is a full page load.
To list a site's pages in your UI:
php
Template::query()->forSite($site->getKey())->orderBy('name')->get();Adding, renaming and deleting pages happens in the editor's page menu, which also cleans up drafts and undo history.
3. Bring editors back to your app
The generated provider is yours to edit. Re-running the install with --force rewrites it only while it is still exactly as generated. Point All pages at your own page list:
php
use App\Models\Team;
use FilamentCraft\Editor\EditorPanelProvider;
use FilamentCraft\FilamentCraftPlugin;
use FilamentCraft\Models\Template;
class WebsiteEditorPanelProvider extends EditorPanelProvider
{
protected function path(): string
{
return 'builder';
}
protected function ownerModel(): ?string
{
return Team::class;
}
protected function exitUrl(Template $template): ?string
{
return route('website.show', $template->site->owner);
}
protected function configureEditor(FilamentCraftPlugin $plugin): FilamentCraftPlugin
{
return $plugin->discoverSectionsIn(app_path('Sections'));
}
}| Hook | Default | What it sets |
|---|---|---|
path() / id() | site-editor | Where the editor lives, and the panel id |
ownerModel() | null | The model that owns sites. null for a single site |
ownerSlugColumn() | slug | The owner column the public URL's slug matches |
exitUrl() / exitLabel() | null / "All pages" | Where All pages leads, and where Exit goes when the editor was opened without an earlier page. null hides it |
publicRouteName() | filamentcraft.tenant.public | The route serving owner sites |
isDefault() | true | Return false if the app also has a Filament admin panel |
configureEditor() | — | Sections, themes, blueprints, brand kit, AI… on the plugin |
configurePanel() | — | Anything else on the Filament panel (colors, domain…) |
Sign-in goes through your app's own login (Fortify, Breeze, Jetstream…), and the panel shares its session. The panel home and the tenant home return 404; other URLs under the panel's path are handled by the editor.
4. Create sites
Provision a site when a team signs up or picks a style:
php
use FilamentCraft\Blueprints\StarterFamily;
use FilamentCraft\Blueprints\StarterSiteBlueprint;
StarterSiteBlueprint::seed(StarterFamily::Editorial, owner: $team, name: $team->name, slug: $team->slug);Or provision your own site blueprint. Theme rows are created on the fly, so a fresh migrate doesn't need filamentcraft:sync-themes before the first site.
5. Serve the public sites
Add the tenant route, under a prefix of your choice:
php
Route::prefix('s')->group(fn () => Route::filamentCraftTenant(Team::class));Each live site is then served at /s/{team-slug}, with its sitemap. If you name the route yourself (name: 'website.public'), return the same name from publicRouteName() so the editor's "open live" link matches. For a single site, set 'public_routes' => true in config/filamentcraft.php instead. For custom domains and subdomains see Public Routing.
Keep slugs stable
Public URLs and editor URLs contain the owner's slug. If your app regenerates a team's slug when it's renamed, those links change and anything already shared stops working. Keep the slug set at creation, or redirect old slugs.
Add it to a Laravel starter kit
Laravel's starter kits with teams (laravel new my-app --react --teams, or --vue, --svelte, --livewire) share the same team model, roles and policy, so these steps are the same for all four. Only the page in step 6 differs. The starter kits are these steps, done.
1. Install.
bash
composer require filamentcraft/filamentcraft
php artisan filamentcraft:install --standalone --owner="App\Models\Team" --path=builder2. Teams own a website. In app/Models/Team.php, implement SiteOwner, use HasSite, and delete the static::updating(...) hook that regenerates the slug when a team is renamed. Public and editor URLs contain the slug, so it must not change.
php
use FilamentCraft\Concerns\HasSite;
use FilamentCraft\Contracts\SiteOwner;
use FilamentCraft\Models\Site;
class Team extends Model implements SiteOwner
{
use GeneratesUniqueTeamSlugs, HasFactory, HasSite, SoftDeletes;
public function website(): ?Site
{
return $this->sites()->oldest('id')->first();
}
}3. One permission. Add a case to app/Enums/TeamPermission.php, give it to owners and admins in TeamRole::permissions(), and add a policy method:
php
// app/Enums/TeamPermission.php
case ManageWebsite = 'website:manage';
// app/Policies/TeamPolicy.php
public function manageWebsite(User $user, Team $team): bool
{
return $user->hasTeamPermission($team, TeamPermission::ManageWebsite);
}4. Let users into the editor. The editor reads the same permission:
php
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasTenants;
use FilamentCraft\Concerns\HasWebsiteEditor;
class User extends Authenticatable implements FilamentUser, HasTenants, MustVerifyEmail
{
use HasTeams, HasWebsiteEditor; // next to the kit's other traits
public function canUseWebsiteEditor(): bool
{
return $this->hasVerifiedEmail();
}
public function editableWebsiteOwners(): Collection
{
return $this->teams->filter(
fn (Team $team): bool => $this->hasTeamPermission($team, TeamPermission::ManageWebsite),
)->values();
}
}5. Routes and the way back. Add the team's website page inside the kit's {current_team} group, serve public sites under a prefix, and point All pages at the website page:
php
// routes/web.php
Route::prefix('s')->group(fn () => Route::filamentCraftTenant(Team::class, name: 'website.public'));
// app/Providers/Filament/WebsiteEditorPanelProvider.php
protected function publicRouteName(): string
{
return 'website.public';
}
protected function exitUrl(Template $template): ?string
{
$team = $template->site?->owner;
return $team instanceof Team ? route('website.show', ['current_team' => $team]) : null;
}6. The website page. Authorize with manageWebsite, create the site on first visit, and list its pages with editor links:
php
public function show(Team $currentTeam): Response
{
Gate::authorize('manageWebsite', $currentTeam);
$site = $currentTeam->website();
return Inertia::render('website/show', [
'pages' => $site === null ? [] : Template::query()->forSite($site->getKey())->orderBy('name')->get()
->map(fn (Template $page) => [
'name' => $page->name,
'editUrl' => EditorUrl::to($page->setRelation('site', $site)),
]),
]);
}php
// resources/views/pages/website/⚡show.blade.php, routed with
// Route::livewire('website', 'pages::website.show')->name('website.show')
new #[Title('Website')] class extends Component {
public Team $team;
public function mount(): void
{
$this->team = Auth::user()->currentTeam;
Gate::authorize('manageWebsite', $this->team);
}
#[Computed]
public function pages(): array
{
$site = $this->team->website();
return $site === null ? [] : Template::query()->forSite($site->getKey())->orderBy('name')->get()
->map(fn (Template $page) => [
'name' => $page->name,
'editUrl' => EditorUrl::to($page->setRelation('site', $site)),
])
->all();
}
}; ?>Create the site with StarterSiteBlueprint::seed(StarterFamily::Modern, owner: $team, name: $team->name, slug: $team->slug) from an action, either on the first visit or when a team is created. Link to the editor with a plain <a href>: not Inertia's <Link>, and no wire:navigate, because the editor is a full page load.
7. Small fixes the kits need.
database/seeders/DatabaseSeeder.phpusesWithoutModelEvents. Remove it if the seeder creates sites, since provisioning relies on model events.- Add the published assets to
.gitignore:/public/css/filament,/public/fonts/filament,/public/js/filament,/public/css/filamentcraft,/public/js/filamentcraft,/public/images/filamentcraft. Thepost-autoload-dumpscript republishes them:@php artisan filament:upgradeand@php artisan filamentcraft:upgrade --no-migrate. - React and Vue kits: add
public/**to the formatter'signorePatternsinvite.config.tssonpm run format:checkskips the published assets.
Uninstall
bash
php artisan filamentcraft:uninstall
composer remove filamentcraft/filamentcraftfilamentcraft:uninstall deletes the generated panel provider and its line in bootstrap/providers.php, the published assets and config/filamentcraft.php (keep it with --keep-config). It then lists every file of yours that still uses FilamentCraft, so you can clean those up before composer remove. It never edits your own files.
Your sites stay in the database unless you pass --drop-tables, which drops the FilamentCraft tables and their published migrations, and nothing else. Uploaded media files stay on the uploads disk either way. If you keep the tables and install again later, the install reads their key type back into the new config. The command asks first, and in production it only runs with --force.
Route helpers (Wayfinder, Ziggy)
In an editor-only panel the editor route is named filament.{panel}.pages.filamentcraft.editor (since 1.41.2), so route-name tools such as Laravel Wayfinder generate valid TypeScript for it. Build editor links with EditorUrl anyway: it fills in the tenant segment.