Docs

Module manifests

uticms.modules.manifests · verified 2026-07-11

Overview

Scope
Operational contracts below the high-level module lifecycle

Key concepts

Manifest Name
Module runtime identity declared by module.json; it is distinct from public slug.
Manifest Slug
Lowercase public/runtime identifier accepted by module asset lookup.
Module Env
Database overrides for values declared in env.json; it is not arbitrary editable module metadata.
Module Setting
Typed key-value operational data owned by a module.
Eligible Public Runtime
A core module or a module with an active database record.

Structure

  • Manifest Sections
    • name
    • slug
    • version
    • priority
    • is_core
    • dependencies
    • providers
    • routes
    • views
    • migrations
    • seeders
    • assets
    • site_layout_driver
    • install
    • autoload
  • Persistent Configuration
    • Declaration Defaultsmodules/<ModuleName>/env.json
    • Database Overridesmodules.env JSON
    • Operational Valuesmodule_settings table
  • Public Runtime
    • Gateapp/Services/Modules/ModuleRuntimeGate.php
    • Viewsapp/Services/Modules/ModuleViewLoader.php
    • Assetsapp/Services/Modules/ModuleAssetLoader.php

Facts

  • ModuleRuntimeGate permits public views, assets, and layout drivers only for manifests marked is_core or modules active in the modules table. authoritative
  • ModuleViewLoader registers a Blade namespace from manifest views.namespace and views.path, with resources/views/<namespace> taking precedence over the module view directory. authoritative
  • A missing namespaced view can trigger a targeted manifest lookup and registration when its module remains eligible for public runtime. authoritative
  • Preparing views for a Site registers general eligible module views and asks ModuleLayoutDriverBootstrap to register the site's layout driver. authoritative
  • ModuleAssetLoader resolves an eligible asset from public/module/<slug> first and from the module Resources path through the dynamic route second. authoritative
  • Asset lookup accepts a manifest slug, normalized manifest name, or normalized folder name. authoritative
  • The module asset helper can append the module database version, falling back to manifest version. authoritative
  • ModuleAssetLoader is a singleton and memoizes URL resolution, version lookup, module directory, and published/source paths within a single HTTP request. authoritative
  • module_settings is unique by module_id and key and stores value, type, description, and public visibility independently from modules.env. authoritative

How-to guides

Add Module View

  1. declare views.namespace and views.path in module.json
  2. create the view under the declared module path or an application override path
  3. ensure the module is core or active
  4. render through namespace::view and verify runtime registration

Publish Asset

  1. declare or locate the module asset root
  2. install or activate the module, or run the module asset publication command
  3. request the public module URL
  4. verify dynamic fallback only if no published file is available

Rules

Architectural rule

Do not expose module Blade views, source assets, or a module-provided layout merely because its folder exists.

Architectural rule

Do not use modules.env as storage for mutable module identity, manifest, or operational settings.

Examples

Module Asset Blade

Use manifest slug (shop-b2c), not runtime name (ShopB2C).

modules/ShopB2C/Views/partials/scripts.blade.php

Manifest Identity

name for isModule(); slug for module_asset(); id_marketplace for entitlement only.

{ "name": "ShopB2C", "slug": "shop-b2c", "id_marketplace": "ShopB2C" }

modules/ShopB2C/module.json