An embeddable content + email engine for Laravel, with AI and MCP built in.
Embed a Gutenberg-style editor, media library, taxonomy, post templates, a shared email builder, an AI writing assistant, and bidirectional MCP directly into any Laravel application — no build step, no theme system, no new user model.
The post editor, the email editor (same block engine), and a published post in a host app. Run it yourself: docs/demo.md.
Heisenberg has no users, no theme lock-in, and no frontend framework requirements. Your application keeps its existing user models, routes, and page layouts. Heisenberg brings the rich editor at /editor, structured content models, and clean service contracts to integrate seamlessly into your stack.
Installation
composer require heisenberg/heisenberg
php artisan migrate
php artisan storage:link
Open /editor (for posts) or /editor/email (for emails) in your browser. The service provider is auto-discovered, migrations run automatically, and sensible defaults are provided out of the box.
In local development (APP_ENV=local), the editor is immediately accessible without extra configuration. Production environments authenticate through your own application users via the RoleGate contract.
Optional (recommended for responsive image variants):
composer require intervention/image:^3.9
Authentication and Roles
Heisenberg connects to your existing users through the RoleGate contract with four canonical roles:
| Role | Permissions |
|---|---|
admin |
Full control, including AI and provider settings |
editor |
Publish, schedule, archive, and manage all media |
author |
Create and draft posts, upload media, edit own files |
viewer |
Read-only access to browse and select media |
The default gate supports Spatie Laravel Permission (getRoleNames()) or a standard role column on your User model:
Schema::table('users', fn (Blueprint $table) => $table->string('role')->nullable());
// Example: $user->role = 'editor';
Role mappings can be customized in config/heisenberg.php under roles. You can also configure route middleware in heisenberg.middleware.editor, .media, and .ai (defaults to ['web']).
Email Document Authoring and Personalization
Heisenberg includes a dedicated email builder surface sharing the same core block engine, translations, revisions, and AI assistant.
1. Register Host Personalization Variables
Define the metadata for variables available to your authors in config/heisenberg.php:
No comments yet.