Search by

mvplounge / meshfactory

mcs-labs-dk

Meshu® Labs | MVP Lounge - DOM Element Factory for PHP.

dev-main 2026-05-27 00:00 UTC

This package is auto-updated.

Last update: 2026-11-04 16:04:14 UTC


README

Browser UI elements generated through a PHP Factory model.

This README is the primary summary for the platform.

Documentation Model

Recent Repository Updates

  • Adopted domain-coded documentation naming across docs domains.
  • Domain codes now include AX (Architecture), BV (Behavior), TK (Task), and AG (Agents).
  • Promoted docs/.instructions.md to the canonical docs entrypoint and index.
  • Distributed governance/instruction content into domain-owned files for maintainability.
  • Renamed clarification output location from docs/clarifications/ to docs/behavior.
  • Replaced monolithic governance text with routing entrypoints in AGENTS.md and docs/agents/AG-repository-governance.md.
  • Standardized clarification report output naming to BV-*.md.

Platform Summary

MeshFactory builds DOM and HTML element output through a predictable PHP factory structure:

  • Enum layer defines elements and attributes.
  • Abstract layer defines shared behavior and contracts.
  • Concrete classes provide element-specific behavior.
  • Attribute management remains the dynamic extension layer.

Behavioral Clarification Workflow

Use the clarification workflow when evaluating new ideas, implementation examples, or edge-case behavior:

Documentation Conventions

  • Use domain-prefixed markdown names in docs domains using {DomainCode}-{name}.md.
  • Domain codes: AX for Architecture, BV for Behavior, TK for Task, and AG for Agents.
  • Examples: AX-system-overview.md, BV-20261011-initial-meshfactory-distribution.md, TK-architecture-clarification-task.md, and AG-repository-governance.md.
  • Use lowercase directory names, for example architecture, tasks, and agents.
  • Keep reserved index filenames in uppercase where conventional, for example README.md and AGENTS.md.

Documentation Structure

  • Docs entrypoint: docs/.instructions.md
  • Architecture encyclopedia: docs/architecture/
  • Behavioral clarifications: docs/behavior/
  • Task workflows: docs/tasks/
  • Agent governance docs: docs/agents/

Development and Releases

Branch from dev and submit PRs to dev. Approved accounts or Copilot promote dev to main through reviewed PRs. main refreshes Packagist; approved release accounts can run the Publish workflow on main to create versioned releases.

An administrator must activate the supplied rulesets, set dev as the default branch, and configure protected publishing environments before this is enforced. See the branching and publishing setup.

Installation

This package requires PHP 8.2 or later.

composer require mvplounge/meshfactory

Composer loads the package classes automatically. For manual bootstrap, include Composer's autoloader:

require __DIR__ . '/vendor/autoload.php';

Quick Start

Every element is one class. Build it with a fluent chain or a params array, then render it:

use MvpLounge\MeshFactory\Element\TextContent\Div;
use MvpLounge\MeshFactory\Element\InlineTextSemantics\Anchor;

echo (new Div())->addId('hero')->addClass('card')->addContent('Hello')->string();
// <div id="hero" class="card">Hello</div>

echo (new Anchor(['href' => '/home', 'target' => '_blank', 'content' => 'Home']))->string();
// <a class="generic-a" href="/home" target="_blank">Home</a>

Read AX-element-factory-pattern.md for the full pattern, tables, forms, and extension recipes.

Working With The Library

Task Command
Run the full sandbox suite composer test
Regenerate the element inventory composer inventory
Build an installable artifact composer artifact -- --version=dev-local

Packaging, local consumption through Composer, and testing inside the EELC instance are covered in TK-package-and-xamppire-consumption.md. Known gaps are tracked as Given-When-Then stories in BV-element-factory-implementation-backlog.md.