A Server-Driven UI (SDUI) framework for Laravel + Inertia.js + React + shadcn/ui.
┌───────────┐ UI Schema (JSON) ┌───────────┐
│ Laravel │ ──────────────────────► │ React │
│ (PHP) │ "render this" │ (client) │
└───────────┘ └───────────┘
RocketPHP sends widget definitions, table schemas, form configurations, and page blocks from PHP. The React layer is stateless — it renders whatever it receives. One source of truth, no duplicated validation, no client-side API surface to design.
- PHP 8.2+
- Laravel 11 / 12 / 13
- Inertia.js v3 (
inertiajs/inertia-laravel) - Tailwind CSS v4 in the host app
- React 19 +
@inertiajs/react - shadcn/ui components
composer require maherelgamil/rocketphpThen wire up Tailwind and Vite — see the Installation guide.
php artisan rocket:make-panel Admin
php artisan rocket:make-resource Useruse App\Models\User;
use MaherElGamil\Rocket\Resources\Resource;
use MaherElGamil\Rocket\Tables\Columns\TextColumn;
use MaherElGamil\Rocket\Tables\Table;
final class UserResource extends Resource
{
protected static string $model = User::class;
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('id')->sortable(),
TextColumn::make('name')->sortable(),
TextColumn::make('email')->sortable()->copyable(),
])
->searchable(['name', 'email']);
}
}Visit /admin/users — you get a sortable, searchable, paginated table,
policy-gated and ready to extend. Add a form() to unlock create/edit.
Full walkthrough: Quick Start.
- Resources — auto-generated list, create, edit, view pages
- Tables — columns, filters, row + bulk actions, pagination, search
- Forms — 15 field types, layout grouping, server-side validation
- Widgets — stats, charts, tables, recent records, activity feeds
- Relation managers — manage related records inline on edit/view
- Custom pages — drop a class in
Pages/, it's auto-discovered - Authorization — policy-gated at every level (nav, page, action)
- Global search —
Cmd+Kacross resources - Notifications — bell in the header, backed by
Notification::send() - i18n + RTL — locale switcher, JSON translations, automatic RTL
Full reference in docs/.
| Installation | Requirements and wiring |
| Quick Start | Your first panel + resource |
| Panel Configuration | Every -> method, default, and behavior |
| Resources | Model binding, pages, navigation |
| Tables | Columns, filters, actions |
| Forms | Field types, validation, layout |
| Widgets | Dashboard + resource widgets |
| Authorization | Policies and visibility |
| i18n & RTL | Locale switcher, translations, logical layout |
| Configuration | config/rocket.php reference and vendor:publish tags |
git clone https://github.com/maherelgamil/rocketphp.git
cd rocketphp
composer install
./vendor/bin/pestPRs welcome — see the contributing guide.
MIT © Maher El Gamil