PHPackages                             mcoredev/tailor-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mcoredev/tailor-blocks

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mcoredev/tailor-blocks
======================

Framework-agnostic PHP block content engine with YAML definitions and admin builder UI.

v0.1.0(1mo ago)01↓75%MITPHPPHP ^8.2CI passing

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/mcoredev/tailor-blocks)[ Packagist](https://packagist.org/packages/mcoredev/tailor-blocks)[ RSS](/packages/mcoredev-tailor-blocks/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Tailor Blocks
=============

[](#tailor-blocks)

Tailor Blocks is a framework-agnostic PHP content engine for structured block content. Blocks are defined in YAML, edited through the bundled browser editor, validated and normalized by PHP, stored as JSON by your CMS, and compiled into frontend-ready JSON.

Tailor Blocks is not a CMS. Your application owns routing, persistence, authentication, authorization, uploads, search persistence, and frontend rendering.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Composer
- `ext-intl`

Installation
------------

[](#installation)

```
composer require mcoredev/tailor-blocks
```

Drop-in CMS Integration
-----------------------

[](#drop-in-cms-integration)

For an existing CMS, use the endpoint-first drop-in flow:

1. Publish assets from `vendor/mcoredev/tailor-blocks/dist/`.
2. Add a `GET` endpoint that returns `EditorMountConfig` JSON.
3. Add a `POST` endpoint that sends `editor.sync()` JSON through `TailorBlocksEngine::process(...)`.
4. Store normalized `content_json` and derived `compiled_json`.

Start with the [Drop-in CMS Integration](docs/guide/getting-started/drop-in-cms-integration.md)guide and the copy-paste [controller skeleton](docs/public/examples/drop-in-controller.php).

Assets
------

[](#assets)

After Composer installation, copy or publish the built assets from `vendor/mcoredev/tailor-blocks/dist/` into a public admin asset directory:

```
mkdir -p public/assets/vendor/tailor-blocks
cp -R vendor/mcoredev/tailor-blocks/dist/* public/assets/vendor/tailor-blocks/
```

Production integrations should normally load the published all-in-one bundle:

```

```

For debugging or split loading, the package also ships:

- `tailor-blocks-core.min.js`
- `tailor-blocks-widgets.min.js`
- `tailor-blocks-editor.min.js`
- `tailor-blocks.js`

The unminified split files are included for development and debugging.

Minimal PHP Usage
-----------------

[](#minimal-php-usage)

```
use TailorBlocks\Context\ContentContext;
use TailorBlocks\Editor\EditorMountOptions;
use TailorBlocks\EngineConfig;
use TailorBlocks\ProcessOptions;
use TailorBlocks\TailorBlocksEngine;

$engine = TailorBlocksEngine::createFromDirectory(
    __DIR__ . '/definitions',
    EngineConfig::builder()->build(),
);

$context = new ContentContext(
    siteKey: 'site-sk',
    permissions: ['content.edit'],
);

$editorConfig = $engine->editorConfig(
    $storedContent,
    $context,
    EditorMountOptions::default()
        ->withOutputSelector('#content_json')
        ->withDefaultCommandShortcuts(),
);

$processed = $engine->process(
    $submittedJson,
    $context,
    new ProcessOptions(strict: true, previousContent: $storedContent),
);
```

Minimal Browser Usage
---------------------

[](#minimal-browser-usage)

```

  TailorBlocks.mount('#tailor-editor', editorConfig);

```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79f1dccdd224ef38fbf76e1d87b2d6f0976ad6c2fa85e21a37fa85db6b818d91?d=identicon)[mcoredev](/maintainers/mcoredev)

---

Top Contributors

[![mcoredev](https://avatars.githubusercontent.com/u/18698910?v=4)](https://github.com/mcoredev "mcoredev (2 commits)")

---

Tags

yamlblock contentadmin-buildercontent-engine

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mcoredev-tailor-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/mcoredev-tailor-blocks/health.svg)](https://phpackages.com/packages/mcoredev-tailor-blocks)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.5k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.3k42.4k21](/packages/tempest-framework)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12323.1k](/packages/rcsofttech-audit-trail-bundle)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103629.7k74](/packages/friendsoftypo3-content-blocks)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1718.2k18](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
