Skip to content

Modules ​

Introduction ​

A module is a feature of the site delivered as Composer packages — redirects, SEO, contact forms, custom fields, backups. Modules are to kitloom what plugins are to WordPress, with one important difference: code is installed by Composer during deployment, never uploaded through the admin panel. The admin then switches installed modules on and off.

The shape of a module ​

Every module is split into a domain package and one admin package per panel:

text
kitloom/seo               domain: head meta, robots.txt, sitemaps, schema.org
kitloom/seo-filament      admin: the SEO section and form blocks in Filament
kitloom/seo-nova          admin: the same in Nova

The domain package holds everything that works without an admin: models, migrations, config, what the module adds to the site's pages, REST routes, middleware, console commands, tools for AI agents. It never imports Filament or Nova.

The admin package holds resources, pages, form blocks and the module's menu section. It depends on the domain package and on its panel.

This split is what lets one module serve both Filament and Nova sites, and lets a headless site install only the domain package.

What a module does on its own ​

Once installed, a module wires itself in. A site does not:

  • register service providers — Laravel package discovery does it;
  • add admin resources to a panel — the admin package attaches its section and puts it in its place in the menu;
  • add middleware, rewrite rules, page parts, REST routes or page scripts — the domain package adds them;
  • list the module's permissions — they appear on Users → Roles;
  • implement interfaces for the module — the module asks registries what exists on the site.

A site changes a module's behaviour with config (the module's config/kitloom-<name>.php and its admin switches), with the module's settings page in the admin, by binding its own implementation of a contract, or by swapping a model in the model registry — see Data.

Core packages and modules ​

Not every package is a module. A module is a package that declares itself one; everything else is always loaded and does not appear on the Modules screen. The platform packages:

PackageRole
kitloom/wp-schemaThe WordPress data model: models, the model registry, post type and taxonomy registries, meta, capabilities, contracts
kitloom/siteThe public site, the way WordPress handles a request: rewrite rules, the main query, the template hierarchy, themes, page parts, the REST root /wp-json/
kitloom/site-inertiaVue and React themes for the site
kitloom/settingsSite options, read in one query and cached
kitloom/shortcodes[tag attr="value"] parsing and rendering
kitloom/mediaAttachments, image sizes, featured images, uploads
kitloom/navigationMenus and menu locations, managed in the admin
kitloom/modulesThe Modules screen's catalog, switching modules on and off, the generators kitloom:make-module and kitloom:make-theme
kitloom/access, kitloom/permissionsSection permissions and roles

Besides these, the admin packages of the platform — wp-schema-*, settings-*, site-*, media-filament / media-nova, navigation-*, shortcodes-*, modules-*, permissions-* and the visual editors visual-editor-filament / visual-editor-nova — are not modules either, nor is kitloom/sandbox, which runs demo sites. Themes are not modules: they are switched on Appearance → Themes.

A package becomes a module by declaring itself in composer.json:

json
{
    "name": "kitloom/redirects",
    "extra": {
        "kitloom": {
            "module": {
                "name": "Redirections",
                "description": "301 redirects and the 404 monitor."
            }
        }
    }
}

Declared modules are listed on the Modules screen and can be deactivated. Their admin packages are found automatically: any installed package whose name ends in -filament or -nova and that requires the module directly. A module's README is its How it works page in the admin, so it is written for the person who configures the module.

Licences ​

Every kitloom package is commercial, under the kitloom License. A license buys one edition, Filament or Nova, with the core, every module, the visual editor and the themes — see Pricing.

Next ​

kitloom — modules and themes for Laravel.
Pricing · Services · License · Refunds · Privacy · Community · [email protected]