🚀 What do you want to build ship today?
From idea to a working LaravelApp in minutes. No coding required.
- âś… Entity generation with
builder:create
- 🟡 Generate all available contexts and presets
- 🟡 Generate simple and nested taxonomies
- 🚧 Entity deletion with
builder:delete
- 🚧 Bring back the build command to create packages
- âś… Implements more Blocks and Presets
- 🟡 Offers advanced features like Publish, Author, Relations
- 🚧 Package generation with
builder:package
- 🚧 App (Panel) generation with
builder:app
- 🚧 Frontend generation with
builder:frontend
- 🚧 UI for creating entities with custom blocks
- 🚧 UI for creating packages
- 🚧 UI for managing apps (panels)
- 🚧 UI for managing frontend (themes)
- 🚧 UI for managing versions
- 🚧 Generate complete packages or apps as zip
Moox Builder is a Laravel Package and Filament UI to build complete applications and packages with zero coding:
- 🚀 Generate complete Filament Resources in App or Package context
- 🚀 Generate and Publish Laravel Packages
- 🚀 Preview and test everything instantly
- 🔧 Production-ready code
- 🔧 Dependency free, remove anytime
- 🔧 Fully extensible
These two commmands are all you need to install the package:
composer require moox/builder
php artisan mooxbuilder:install
Curious what the install command does? See manual installation below.
- Laravel 11
- PHP 8.3
- Filament 3.2
- Livewire 3
- Tailwind CSS 3
- PHPStan 2
- Pest 3
All generated code is:
- Type-safe with full type declarations
- PSR-12 compliant via Laravel Pint
- PHPStan Level 5 validated
- Pest tested
- Ready for production
- App: Direct application integration
- Package: Laravel package generation
- Preview: Instant testing environment
- Custom contexts via configuration
Building blocks for your entities:
- Fields: Text, Number, Date, Select, etc.
- Features: SoftDelete, Publish, Author
- Sections: Logical field groupings
Presets are pre-configured collections of blocks:
Simple Item
: Basic CRUD resourcePublishable Item
: With publishing workflowFull Item
: All available featuresSimple Taxonomy
: For tag-like structuresNested Taxonomy
: For category-like structures, using nested set- Custom presets via configuration
Generators combine Blocks and Templates to generate the files. They are located in the src/Generators
directory. They are divided into Entity
and Package
generators. You can implement own Generators and Templates in the contexts
config array, see Configuration.
Templates are PHP stub files with simple markers to be replaced by the Generator. You can implement own Templates in the contexts
config array, see Configuration. They are organized in the src/Templates
directory into App
, Entity
and Package
folders.
The service layer manages the generation workflow:
Block Services
BlockFactory
: Creates block instances from configurationBlockReconstructor
: Reconstructs blocks from database records
Build Services
BuildManager
: Orchestrates the build lifecycle and state transitionsBuildRecorder
: Persists build data and manages build historyBuildStateManager
: Tracks and manages build states across contextsVersionManager
: Handles version control for packages and builds
Entity Services
ContextAwareService
: Base class for entity services to handle contextEntityCreator
: Creates new entities with initial configurationEntityRebuilder
: Updates existing entities with new blocks/settingsEntityGenerator
: Generates all entity-related filesEntityImporter
: Imports entities from existing migrationsEntityTablesRemover
: Manages database table cleanup
File Services
FileManager
: Handles file operations, path normalization, and content formatting
Migration Services
MigrationAnalyzer
: Analyzes existing migrations to extract structureMigrationCreator
: Generates new migrations from entity configuration
Package Services
- This part is not implemented yet
Preview Services
PreviewManager
: Manages the preview context
-
Entity Definition
- Command/UI initiates build
- Option to generate from migration
- Block configuration (or Preset)
- Context selection
-
Generation
- Creates DB entries for entity and build
- Generates files from templates and blocks
-
Integration
- Preview functionality
- Production deployment
- Package publishing
Types are currently only partly implemented and only used for the EntityImporter.
Commands allow to create and delete an Entity using a Preset.
- AbstractBuilderCommand
- CreateEntityCommand
- DeleteEntityCommand
This command builder:create
creates an Entity. If you call it without any parameters, it will ask you some questions. With these parameters you can preset all needed information:
Name your Entity:
php artisan builder:create Post
# Model will be Post, table will be posts
Choose your context:
php artisan builder:create Post --app
# Generates in App/Filament
php artisan builder:create Post --package
# Asks for the Package
php artisan builder:create Post --preview
# Generates in App/Builder and migrates
# To preview: https://your.test/builder/
Choose your preset:
php artisan builder:create Post --preview --preset=simple-item
php artisan builder:create Post --preview --preset=publishable-item
php artisan builder:create Post --preview --preset=full-item
php artisan builder:create Post --preview --preset=simple-taxonomy
php artisan builder:create Post --preview --preset=nested-taxonomy
Generate a package entity:
php artisan builder:create Post --package=My/Blog --preset=simple-item
# will also work --package=My\Blog
To delete an entity including the migration and the migrated tables in the database, you can use the delete command. This command will search for a package in app or preview context or it will ask for a namespace, if it does not find the Entity.
php artisan builder:delete Post
# Searches and deletes the entity
# Asks to remove the database table
You can force the command to just remove everything:
php artisan builder:delete Post --force
# Searches and deletes the entity
# and the migrated db table
And you can specify a namespace to also remove the entity from there:
php artisan builder:delete --package=My/Blog
# will also work --package=My\Blog
You can change nearly everything, Blocks, Generators, Templates, Presets and Contexts in the Moox Builder configuration.
Take a look at the Configuration for more information.
You can opt-out of any Moox dependency, but these niceties you'll miss then:
Moox Core provides Dynamic Tabs and Translatable Config. See Moox Core docs.
The item also support 'item' types, means you are able to configure selectable types for your Entity. By default, we provide "Post" and "Page" as example. If you don't want to use types, just empty the array and the field and column become invisible.
/*
|--------------------------------------------------------------------------
| Item Types
|--------------------------------------------------------------------------
|
| This array contains the types of items entities. You can delete
| the types you don't need and add new ones. If you don't need
| types, you can empty this array like this: 'types' => [],
|
*/
'types' => [
'post' => 'Post',
'page' => 'Page',
],
You can configure the user model used for displaying Authors. By default it is tied to App User:
/*
|--------------------------------------------------------------------------
| Author Model
|--------------------------------------------------------------------------
|
| This sets the user model that can be used as author. It should be an
| authenticatable model and support the morph relationship.
| It should have fields similar to Moox User or WpUser.
|
*/
'user_model' => \App\Models\User::class,
You may probably use Moox User
'user_model' => \Moox\User\Models\User::class,
or Moox Press User instead:
'user_model' => \Moox\Press\Models\WpUser::class,
If you want to use the Preview feature, you may add the following to your .gitignore
:
/app/Builder/*
/config/previews/*
/lang/*/previews/*
Instead of using the install-command php artisan mooxbuilder:install
you are able to install this package manually step by step:
// Publish and run the migrations:
php artisan vendor:publish --tag="builder-migrations"
php artisan migrate
// Publish the config file with:
php artisan vendor:publish --tag="builder-config"
Please review our security policy on how to report security vulnerabilities.
We value every contribution. Moox is developed in the Moox Monorepo, that uses All Contributors for managing contributions. Please refer to the Monorepo docs for more information.
- Single Responsibility
- Services have ONE responsibility
- Generators collect files
- FileManager handles operations
- BuildContext manages paths
- Never
- Use direct file operations
- Handle paths manually
- Format files directly
- Assume types or interfaces
- Always
- Use FileManager for files
- Use BuildContext for paths
- Validate inputs
- Document changes
- Type Safety
- Full type declarations
- PHPStan level 8
- No assumed signatures
- Validated inputs
- All services follow these principles:
- Type-safe implementations
- Context awareness where needed
- Clear responsibility boundaries
- Proper error handling
Please see CHANGELOG for more information on what has changed recently.
See DEVLOG.md for the current tasks and ideas for the future.
The MIT License (MIT). Please see License File for more information.