sirserik / admin-core
Headless admin panel core for META University sites (Inertia + Vue 3 + Tiptap). Provides base Inertia controllers, Resource API, block library, and reusable Vue components.
Requires
- php: ^8.2
- inertiajs/inertia-laravel: ^2.0|^3.0
- laravel/framework: ^11.0|^12.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-07-17 12:30:09 UTC
README
Headless admin panel core for Laravel sites. Drives a full admin SPA (Inertia + Vue 3 + Tiptap) from a declarative Resource API — new admin modules are added with a single call in a service provider, with no controller or Vue page to write for the common case.
AdminCore::resource('articles', [ 'model' => \App\Models\Article::class, 'label' => 'Статьи', 'menu' => 'Контент', 'icon' => 'fa-newspaper', 'image_field' => 'featured_image', 'translatable' => ['title', 'excerpt', 'content'], 'fields' => [ ['name' => 'title', 'type' => 'text', 'label' => 'Заголовок', 'required' => true], ['name' => 'excerpt', 'type' => 'textarea', 'label' => 'Краткое описание'], ['name' => 'content', 'type' => 'editor', 'label' => 'Содержимое'], ], 'attributes' => [ ['name' => 'slug', 'type' => 'text', 'label' => 'Slug'], ['name' => 'is_published', 'type' => 'boolean', 'label' => 'Опубликована'], ['name' => 'published_at', 'type' => 'datetime-local', 'label' => 'Дата публикации'], ], ]);
That call produces:
- Sidebar entry under Контент
/admin/articles— paginated list with search/admin/articles/create— form with locale tabs (RU/KK/EN), Tiptap editor for thecontentfield, image upload, sidebar with plain attributes/admin/articles/{id}/edit— pre-filled edit form- Auto-generated validation from types
- CRUD routes dispatched through a single generic controller
- Toggle-publish action
No ArticleController. No Articles/Index.vue. No
Articles/Form.vue. All driven by the config.
Features
- Declarative resources — full CRUD from one config array
- Translatable fields with per-locale inputs (RU/KK/EN by default)
- Typed attributes (text, email, url, number, date, select, boolean, color…) with auto-generated validation
- Dynamic FK selects via closure-based
options - Rich-text editing — Tiptap / ProseMirror (replaces TinyMCE)
- Image uploads — single image per resource, with storage, URL helpers, delete-on-destroy
- Pluggable — per-resource Vue page overrides, custom controllers, mixed legacy + declarative resources
- Sidebar composition — resources + ad-hoc
menuItem()entries, grouped by section, ordered - Dashboard stats — pluggable card providers
- Inertia + Vue 3 — modern SPA admin over a Laravel backend
- Package-discoverable — drop it in, boot, go
Installation — one command
In a fresh or existing Laravel 11/12 app:
composer require meta/admin-core php artisan admin-core:install
That's it. The installer will:
- Publish
config/admin-core.php+ Inertia root view - Scaffold
resources/js/admin-spa.js+resources/css/admin-spa.css - Register
HandleInertiaRequestsmiddleware inbootstrap/app.php - Patch
vite.config.js(addsadmin-spa.{js,css}+@admin-corealias +preserveSymlinks) - Run migrations
- Create an admin user (
admin@example.com/password) - Install npm deps + run
npm run build
Then open http://your-site/admin and log in. Start registering resources in AppServiceProvider::boot():
use Meta\AdminCore\Facades\AdminCore; AdminCore::resource('articles', [ 'model' => \App\Models\Article::class, // ... ]);
Full setup options: php artisan admin-core:install --help. See also docs/installation.md for the long-form walkthrough.
Register middleware in bootstrap/app.php:
$middleware->web(append: [ \Meta\AdminCore\Http\Middleware\HandleInertiaRequests::class, ]);
Vite entry:
import { bootAdminCore } from '@admin-core/admin-spa.js'; import AdminLayout from '@admin-core/layouts/AdminLayout.vue'; const sitePages = import.meta.glob('./admin-spa/pages/**/*.vue'); const corePages = import.meta.glob('../../vendor/meta/admin-core/resources/js/pages/**/*.vue'); bootAdminCore({ sitePages, corePages, AdminLayout, title: 'My Admin' });
Documentation
Full reference lives in docs/:
Getting started
Core concepts
- Resource API reference
- Translatable fields
- Attribute types
- Dynamic FK selects
- Images
- Navigation & dashboard
- Validation
- Routing
Customisation
Reference
Contributing
Requirements
| Stack | Version |
|---|---|
| PHP | ^8.2 |
| Laravel | ^11.0 || ^12.0 |
| inertiajs/inertia-laravel | ^2.0 || ^3.0 |
| Node.js | ^18 |
| Vue | ^3.4 |
| Vite | ^5 or ^6 |
Status
v0.x — in active use by META University sites. Config shape is stable
within 0.2+ but breaking changes may still happen at minor-version
bumps until 1.0.
See CHANGELOG for release history.
License
Proprietary. Available under the VCS at sirserik/meta-admin-core.