MKSine: Filament CMS with Plugins, Themes &amp; Blocks | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. [Composer Pacakge](https://www.msaied.com/public/articles?category=composer-pacakge)
6. /
7. MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel

   [Composer Pacakge](https://www.msaied.com/public/articles?category=composer-pacakge) [Filament](https://www.msaied.com/public/articles?category=filament) 

 MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel
====================================================================

 MKSine is a community-built Filament CMS that adds pages, posts, a block-based page builder, themes, menus, a media library, and a full plugin system with install/activate lifecycle to Laravel apps.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 1 Sep 2026 · Updated 1 Sep 2026 · 4 min read

ShareCopy linkCopied

 ![MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel](https://cdn.msaied.com/619/a6bec1a59695b3d3ffb212492862d25b.png) 

  On this page +1. [What Is MKSine?](#what-is-mksine)
2. [Installation and Bootstrap](#installation-and-bootstrap)
3. [Plugin System](#plugin-system)
4. [Hooks](#hooks)
5. [Page Builder Blocks](#page-builder-blocks)
6. [Themes, Menus, and Media](#themes-menus-and-media)
7. [Settings and Admin Console](#settings-and-admin-console)
8. [Key Takeaways](#key-takeaways)

 What Is MKSine?
---------------

Most Laravel projects that need a public-facing marketing site end up hand-rolling a content layer on top of Filament. [MKSine](https://github.com/MiranSalehi/mksine), by Miran Salehi, fills that gap. It ships pages, posts, categories, a block-based page builder, themes, menus, a media library, and a plugin system — all wired into a Filament 4/5 admin panel.

Installation and Bootstrap
--------------------------

Install the package and scaffold a Filament panel:

```bash
composer require miran/mksine
php artisan filament:install --panels

```

Before running the installer, make two manual edits:

1. Register `MksinePlugin::make()` on your panel in `AdminPanelProvider` and **remove** the default `->pages([Dashboard::class])` line — running both causes a 500 error.
2. Remove the default `Route::get('/')` handler in `routes/web.php` — MKSine serves the homepage through the active theme.

Then run:

```bash
php artisan mksine:install --migrate
php artisan mksine:create-super-admin

```

`mksine:install` publishes config, runs migrations, and calls `shield:generate --all`. If `MksinePlugin` is not registered on the panel at that moment, no MKSine permissions are created. Fix it afterwards with `php artisan shield:generate --panel=admin --all`.

Authorisation is handled by Filament Shield. The installer also patches `app/Models/User.php` to add the `FilamentUser` contract and the `InteractsWithMksine` trait, writing a timestamped backup first.

Plugin System
-------------

A MKSine plugin lives under `plugins/{id}/` with a `plugin.php` manifest and a class implementing `PluginInterface`. Generator commands handle the scaffolding:

```bash
php artisan mks-plugin:make notes --author="Your Name"
php artisan mks-plugin:discover
php artisan mks-plugin:install notes
php artisan mks-plugin:activate notes

```

Discovery caches the registry at `bootstrap/cache/mks_plugins_discovery.php`. Plugin state (discovered, installed, active, inactive, failed) is tracked in the `mks_plugins` table. If a plugin's `boot()` throws, a boot guard marks it failed and logs the message to `mks_plugins.boot_error` without taking down the rest of the app. Deactivating hides admin screens but leaves data intact; `--delete-data` is required to remove it.

Hooks
-----

MKSine provides two extension families:

- **Discovery hooks** — listener classes scanned by `php artisan mks:discover`, stored in `mks_hooks`, and togglable from the admin panel.
- **Runtime hooks** — closures or class callbacks registered via the `Hooks::` facade inside a plugin's `boot()`. These stay in memory and are not visible in the admin.

Only `FormHookManager` catches listener exceptions; table, resource, and page hooks let exceptions propagate. Listeners can implement `QueueableHookEventInterface` to queue heavy work.

Page Builder Blocks
-------------------

Blocks extend `BaseBuilderComponent` and define a Filament schema for editing and a Blade view for rendering. There is no auto-discovery — register each block manually:

```php
use Miran\Mksine\Core\PageBuilder\ComponentRegistry;

app(ComponentRegistry::class)->register(PriceTableBlock::class);

```

The page tree is stored in a `builder_payload` JSON column. Views receive a `$data` array and a `$children` array for container blocks. When a block type is missing or its view no longer exists, the renderer falls back to a yellow "Unknown component type" panel rather than throwing.

Themes, Menus, and Media
------------------------

- **Themes** — a directory under `themes/{id}/` or a Composer package; one is active at a time and supplies all storefront Blade views.
- **Menus** — nested, drag-to-reorder, supporting pages, posts, categories, and custom URLs assigned to theme locations.
- **Media library** — a custom single-disk store (not Spatie Media Library) with a `MediaPicker` component and automatic small/medium/large thumbnails. Image optimisation requires binaries such as `jpegoptim` on the server.

Settings and Admin Console
--------------------------

Plugins add settings tabs through `SettingsTabManager` rather than editing the settings page class. Every field is saved to the `settings` table by field name — prefix plugin field names to avoid overwriting core settings like `site_name`.

A super-admin-only console page runs an allowed set of Artisan and Composer commands with live output.

Key Takeaways
-------------

- Requires PHP 8.2, Laravel 11, and Filament 4 or 5 (Filament 5 needs Laravel 11.28+, Livewire 4, Tailwind 4).
- Plugin boot failures are isolated — one broken plugin does not crash the app.
- Blocks have no per-block Shield permission; guard sensitive rendered output yourself.
- Settings are saved immediately with no draft or audit trail.
- Current release is v1.5.1 — review the source before deploying to production.
- MIT licensed, community-maintained (not an official Filament project).

[Read the original article on Laravel News](https://laravel-news.com/mksine-filament-cms)

- [Laravel](https://www.msaied.com/public/articles?search=Laravel)
- [Filament](https://www.msaied.com/public/articles?search=Filament)
- [CMS](https://www.msaied.com/public/articles?search=CMS)
- [Page Builder](https://www.msaied.com/public/articles?search=Page%20Builder)
- [Plugins](https://www.msaied.com/public/articles?search=Plugins)
- [Open Source](https://www.msaied.com/public/articles?search=Open%20Source)

 Frequently asked questions 
---------------------------

  Does MKSine work with Filament 5?Yes. MKSine targets both Filament 4 and Filament 5. Filament 5 support requires Laravel 11.28 or higher, Livewire 4, and Tailwind 4.

   What happens if a MKSine plugin throws an exception during boot?A boot guard catches the exception, marks the plugin as failed in the mks\_plugins table, and writes the error message to the boot\_error column. The rest of the application continues running normally.

   How do I add a custom page builder block in MKSine?Extend BaseBuilderComponent, implement getType(), getSchema(), and getRenderView(), then register the class with the ComponentRegistry — typically from your plugin's boot() method. There is no auto-discovery.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com/public#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleCompoships: Eloquent Relationships on Multiple Columns in Laravel](https://www.msaied.com/public/articles/compoships-eloquent-relationships-on-multiple-columns-in-laravel) [Next articleForte: Parse and Rewrite Laravel Blade Templates with a Typed Syntax Tree](https://www.msaied.com/public/articles/forte-parse-and-rewrite-laravel-blade-templates-with-a-typed-syntax-tree)  

   On this page
-------------

1. [What Is MKSine?](#what-is-mksine)
2. [Installation and Bootstrap](#installation-and-bootstrap)
3. [Plugin System](#plugin-system)
4. [Hooks](#hooks)
5. [Page Builder Blocks](#page-builder-blocks)
6. [Themes, Menus, and Media](#themes-menus-and-media)
7. [Settings and Admin Console](#settings-and-admin-console)
8. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
