PHPackages                             symkit/builder-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. symkit/builder-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

symkit/builder-bundle
=====================

Visual Content Builder Bundle

00PHPCI passing

Since Feb 23Pushed 4mo agoCompare

[ Source](https://github.com/SymKit/builder-bundle)[ Packagist](https://packagist.org/packages/symkit/builder-bundle)[ RSS](/packages/symkit-builder-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

Symkit Builder Bundle
=====================

[](#symkit-builder-bundle)

[![CI](https://github.com/symkit/builder-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/symkit/builder-bundle/actions)[![Latest Version](https://camo.githubusercontent.com/d078e5e97a186706b5bc0c362c2d6932fa04acdca7273a64d9a98f9f268b96f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796d6b69742f6275696c6465722d62756e646c652e737667)](https://packagist.org/packages/symkit/builder-bundle)[![PHPStan Level 9](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](https://phpstan.org/)

A powerful, strategy-based block building system for Symfony applications. This bundle provides a flexible architecture for managing, editing, and rendering dynamic content blocks.

Features
--------

[](#features)

- **Strategy Pattern Architecture**: Extensible system where each block type is handled by a dedicated strategy.
- **Dual-View Rendering**:
    - **Editor**: Complex, interactive templates (Twig + Stimulus + LiveComponents) for the admin interface.
    - **Frontend**: Lightweight, clean HTML structures defined in the database for performance and separation of concerns.
- **Markdown Import**: Intelligent service to convert Markdown content into structured blocks, delegating logic to strategies.
- **Live Components Integration**: Built-in support for Symfony UX Live Components for a rich editing experience.
- **13 Built-in Block Types**: paragraph, image, quote, table, list, code, infobox, cta, howto, separator, video, faq\_block, and snippet.
- **183 Tailwind CSS Snippets**: Pre-built UI components across 32 categories, optionally loadable via sync command.

Documentation
-------------

[](#documentation)

- [Installation &amp; Usage](README.md)
- [Technical Architecture](TECHNICAL.md)
- [How to Add a New Block Type](HOWTO_ADD_BLOCK.md)

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

[](#installation)

1. **Require the bundle**:

    ```
    composer require symkit/builder-bundle
    ```
2. **Enable the bundle** (if not auto-enabled):

    ```
    // config/bundles.php
    return [
        // ...
        Symkit\BuilderBundle\SymkitBuilderBundle::class => ['all' => true],
    ];
    ```

Configuration
-------------

[](#configuration)

All features are enabled by default. You can override entity classes and toggle features in `config/packages/symkit_builder.yaml`:

```
symkit_builder:
    admin:
        enabled: true
        route_prefix: admin   # URL prefix for admin routes (default: admin)
    doctrine:
        enabled: true
        entity:
            block_class: Symkit\BuilderBundle\Entity\Block
            block_repository_class: Symkit\BuilderBundle\Repository\BlockRepository
            block_category_class: Symkit\BuilderBundle\Entity\BlockCategory
            block_category_repository_class: Symkit\BuilderBundle\Repository\BlockCategoryRepository
    twig:
        enabled: true
    assets:
        enabled: true
    command:
        enabled: true
    live_component:
        enabled: true
```

### Routes

[](#routes)

Include the bundle admin routes in your app (e.g. `config/routes.yaml`):

```
symkit_builder:
    resource: '@SymkitBuilderBundle/Resources/config/routing.yaml'
    prefix: '%symkit_builder.admin.route_prefix%'
```

This registers routes such as `admin_block_list`, `admin_block_create`, `admin_block_edit`, `admin_block_category_*`. Change `route_prefix` in config to alter the URL prefix (e.g. `/back-office/blocks`).

### Dependencies

[](#dependencies)

Ensure you have the following bundles enabled and configured:

- `Symfony\UX\LiveComponent\LiveComponentBundle`
- `Symfony\UX\TwigComponent\TwigComponentBundle`
- `Symfony\UX\StimulusBundle\StimulusBundle`

Usage
-----

[](#usage)

### 1. Rendering Blocks

[](#1-rendering-blocks)

Two Twig functions are available for rendering blocks in your frontend templates.

Render a **single block** (accepts an array):

```
{# templates/page/show.html.twig #}

{% for block in page.content %}
    {{ symkit_render_block(block) }}
{% endfor %}
```

Render **all blocks at once** (accepts a JSON string or an array):

```
{{ symkit_render_content_blocks(page.content) }}
```

Or manually via the service:

```
use Symkit\BuilderBundle\Contract\BlockRendererInterface;

public function show(BlockRendererInterface $renderer, array $blocks)
{
    // Render a single block
    $html = $renderer->renderBlock($block);

    // Or render all blocks at once
    $html = $renderer->renderBlocks($blocks);
}
```

### 2. Synchronizing Blocks

[](#2-synchronizing-blocks)

Blocks are defined within the `BlockSynchronizer` service. To ensure your database is updated with the latest block definitions, run the synchronization command:

```
php bin/console builder:sync-blocks
```

To also include the 183 Tailwind CSS snippets:

```
php bin/console builder:sync-blocks --snippets
```

This command uses an idempotent "upsert" logic, updating existing blocks by their code and creating new ones as needed.

### 3. Built-in Block Types

[](#3-built-in-block-types)

The bundle ships with 13 core block types across 6 categories:

CategoryBlock TypeDescription`text``paragraph`Rich text content (visual / HTML modes)`text``quote`Blockquote with optional author`media``image`Image via media manager`media``video`Embedded video (YouTube, etc.)`layout``table`Data table with optional header row`layout``separator`Horizontal rule (solid, dashed, dotted)`content``list`Ordered or unordered list`content``code`Syntax-highlighted code block`design``infobox`Highlighted info box (info, success, warning, error)`marketing``cta`Call-to-action with button and URL`marketing``howto`Step-by-step guide`marketing``faq_block`FAQ section (requires `symkit/faq-bundle`)*(snippets)*`snippet`Pre-built Tailwind CSS component### 4. Adding a New Block Type

[](#4-adding-a-new-block-type)

To add a block type without custom logic, register it in `BlockSynchronizer` and use `AbstractBlockStrategy` as the default fallback. See [How to Add a New Block Type](HOWTO_ADD_BLOCK.md) for the full guide.

For complex blocks (e.g., fetching data, processing URLs), create a **Strategy**:

1. Create a class implementing `BlockStrategyInterface` (or extending `AbstractBlockStrategy`).
2. Implement `supports()`, `prepareData()`, `render()`.
3. Implement `supportsNode()` and `createFromNode()` for Markdown import support.

```
namespace App\Block\Strategy;

use Symkit\BuilderBundle\Render\Strategy\AbstractBlockStrategy;

class MyCustomBlockStrategy extends AbstractBlockStrategy
{
    public function supports(array $block): bool
    {
        return $block['type'] === 'my_custom_block';
    }

    // ... implement other methods
}
```

The service will be automatically tagged and used by the `BlockRenderer`.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance52

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/077eba6702dc23a795ee2262dff92505e3c8ead08f7cb205be80d8aae0a6b8e5?d=identicon)[sdieunidou](/maintainers/sdieunidou)

---

Top Contributors

[![sdieunidou](https://avatars.githubusercontent.com/u/570763?v=4)](https://github.com/sdieunidou "sdieunidou (10 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (3 commits)")

### Embed Badge

![Health badge](/badges/symkit-builder-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/symkit-builder-bundle/health.svg)](https://phpackages.com/packages/symkit-builder-bundle)
```

###  Alternatives

[matt-daneshvar/laravel-survey

Create surveys inside your Laravel app

28780.8k](/packages/matt-daneshvar-laravel-survey)[mischasigtermans/laravel-altitude

Claude Code agents for the TALL stack, powered by Laravel Boost

12216.4k](/packages/mischasigtermans-laravel-altitude)

PHPackages © 2026

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