PHPackages                             erdnaxelaweb/staticfakedesign - 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. [Templating &amp; Views](/categories/templating)
4. /
5. erdnaxelaweb/staticfakedesign

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

erdnaxelaweb/staticfakedesign
=============================

Generate realistic-looking static HTML/CSS/JS based on fake data

v1.0.0(2mo ago)018.5k↓33.3%41MITJavaScriptPHP ^8.1

Since Feb 17Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/erdnaxelaweb/staticfakedesign)[ Packagist](https://packagist.org/packages/erdnaxelaweb/staticfakedesign)[ RSS](/packages/erdnaxelaweb-staticfakedesign/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (29)Versions (10)Used By (1)

Static Fake Design Bundle
=========================

[](#static-fake-design-bundle)

The core purpose of this bundle is to generate realistic-looking static HTML/CSS/JS based on fake data.
It aims to save developers and designers time by providing a visual representation of their application with placeholder content, even before the backend is fully built by providing tools to:

StaticFakeDesignBundle is a Symfony bundle designed to streamline the development of UI components and templates with auto-generated fake data. It bridges the gap between design and development by providing tools to:

- Generate realistic fake data for UI prototyping
- Define reusable components with typed parameters
- View components in an integrated showroom interface
- Create static versions of templates for demonstration purposes

This bundle is particularly useful for frontend development, to streamline the development of UI components and templates.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Features](#features)
    - [Showroom Interface](#showroom)
    - [Static Template Rendering](#static-version-of-a-template)
- [Usage](#usage)
    - [Fake Data Generation](#fake-data-generation)
    - [Component Declaration](#component-declaration)
    - [Service Integration](#symfony-service)
- [Complex Value Objects](#complex-value-objects)
    - [Content Definitions](#content-definitions)
    - [Taxonomy Entry Definitions](#taxonomy-entry-definitions)
    - [Pager Definitions](#pager-definitions)
    - [Block Definitions](#block-definitions)
    - [Layout Definitions](#layout-definitions)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

1. First, require the package using Composer:

```
composer require erdnaxelaweb/staticfakedesign:dev-main
```

2. Add the bundle to your config/bundles.php file:

```
return [
    // ...
    ErdnaxelaWeb\StaticFakeDesignBundle\StaticFakeDesignBundle::class => ['all' => true],
];
```

Features
--------

[](#features)

### Fake Data Generation

[](#fake-data-generation)

The bundle provides a powerful system for [generating fake variables](doc/fake_variables.md) that mimic real data. This allows you to develop UI components with realistic data structures before your backend is fully implemented.

### Component Declaration

[](#component-declaration)

Create reusable, self-documenting [UI components](doc/component_declaration.md) with typed parameters, making your frontend development more structured and maintainable.

### Showroom

[](#showroom)

The bundle provides a "showroom" interface which allows you to navigate and display the [components](doc/component_declaration.md) you have created. This makes it easy to test and demonstrate your UI components in isolation.

To access this interface on the URL `/showroom`, add the following route configuration:

```
# config/routes.yaml
showroom:
    resource: "@StaticFakeDesignBundle/Resources/config/routing/showroom.yaml"
```

### Static Version of a Template

[](#static-version-of-a-template)

The bundle allows you to create static versions of your templates for demonstration purposes. To access these examples at `/static/{path to template}`, add the following route:

```
# config/routes.yaml
static:
    path: /static/{path}
    controller: ErdnaxelaWeb\StaticFakeDesignBundle\Controller\StaticController::viewAction
    requirements:
        path: .*
```

Usage
-----

[](#usage)

There are three ways to use fake generated variables:

### Fake Data Generation

[](#fake-data-generation-1)

**Twig comment:**

```
{# @fake variable_name value_type #}
```

[More information on fake variables](doc/fake_variables.md)

### Component Declaration

[](#component-declaration-1)

**Twig template declared as component:**

```
{% component {
    name: 'Component name',
    specifications: 'Optional link to the component specification',
    description: 'Optional component description',
    properties: {
        display_summary: {
            label: 'Display the summary',
            type: 'boolean',
            required: false,
            default: true
        },
        // Other properties...
    },
    parameters: {
        title: {
            label: 'Title',
            type: 'string',
            required: true,
            default: 'Default title'
        },
        // Other parameters...
    }
} %}
```

[More information on component declaration](doc/component_declaration.md)

### Symfony Service

[](#symfony-service)

Use the `ErdnaxelaWeb\StaticFakeDesign\Fake\ChainGenerator` service to programmatically generate fake data in your controllers or services:

```
// Example usage in a controller
public function exampleAction(ChainGenerator $fakeGenerator)
{
    $fakeArticle = $fakeGenerator->generate('content', ['type' => 'article']);

    return $this->render('example.html.twig', [
        'article' => $fakeArticle
    ]);
}
```

Complex Value Objects
---------------------

[](#complex-value-objects)

The bundle provides support for generating complex value objects commonly used in CMS and web applications:

- [Content](doc/value_types/content.md) - Article, Page, etc.
- [Taxonomy Entry](doc/value_types/taxonomy_entry.md) - Categories, Tags, etc.
- [Pager](doc/value_types/pager.md) - Paginated content listings
- [Block](doc/value_types/block.md) - Hero, CTA, Feature blocks, etc.

These objects are managed through the concept of "definitions". These definitions are **specifications** that allow the bundle to generate thoses complex, structured data.

### Content Definitions

[](#content-definitions)

Content definitions specify the structure of content objects:

```
# config/packages/static_fake_design.yaml
erdnaxelaweb.static_fake_design.content_definition:
    article:
        models:
            -
                name: "First article model"
                image: "article1.jpg"
            -
                name: "Second article model"
                image: "article2.jpg"
        fields:
            title:
                required: true
                type: string
            body:
                required: true
                type: richtext
            image:
                required: false
                type: image
            related_articles:
                required: false
                type: content
                options:
                    type: "article"
                    max: 3
```

### Taxonomy Entry Definitions

[](#taxonomy-entry-definitions)

Taxonomy entries follow a similar definition pattern:

```
# config/packages/static_fake_design.yaml
erdnaxelaweb.static_fake_design.taxonomy_entry_definition:
    category:
        fields:
            name:
                required: true
                type: string
            description:
                required: false
                type: text
            icon:
                required: false
                type: string
```

### Pager Definitions

[](#pager-definitions)

Pagers are configured with content types, filters, and sorting options:

```
# config/packages/static_fake_design.yaml
erdnaxelaweb.static_fake_design.pager_definition:
    articles:
        contentTypes: ["article"]
        filters:
            category:
                type: checkbox
            date:
                type: date_range
        maxPerPage: 10
        headlineCount: 3
        sorts:
            publish_date:
                type: publish_date
```

### Block Definitions

[](#block-definitions)

Blocks are configured with views, attributes, and optional models:

```
# config/packages/static_fake_design.yaml
erdnaxelaweb.static_fake_design.block_definition:
    hero:
        views:
            default: "blocks/hero/default.html.twig"
            centered: "blocks/hero/centered.html.twig"
        attributes:
            title:
                required: true
                type: string
            subtitle:
                required: false
                type: string
            background_image:
                required: true
                type: image
```

#### Layout Definitions

[](#layout-definitions)

Block layouts group blocks together by sections:

```
# config/packages/static_fake_design.yaml
erdnaxelaweb.static_fake_design.block_layout_definition:
    landing_page:
        sections:
            header:
                max: 1
                blocks: ["hero"]
            content:
                blocks: ["text", "image_text", "gallery"]
            sidebar:
                blocks: ["cta", "related_content"]
```

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

[](#documentation)

For more detailed documentation on specific features:

- [Fake Variables](doc/fake_variables.md)
- [Component Declaration](doc/component_declaration.md)
- [Content Value Type](doc/value_types/content.md)
- [Taxonomy Entry Value Type](doc/value_types/taxonomy_entry.md)
- [Block Value Type](doc/value_types/block.md)
- [Pager Value Type](doc/value_types/pager.md)

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This bundle is released under the [MIT License](LICENSE).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

Every ~95 days

Total

5

Last Release

67d ago

Major Versions

v0.2.x-dev → v1.0.02026-03-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/5da828a6299f556552632c81712f10e70c905b2e1560b1a7044eb7e590287179?d=identicon)[florianalexandre](/maintainers/florianalexandre)

---

Top Contributors

[![erdnaxelaweb](https://avatars.githubusercontent.com/u/2130120?v=4)](https://github.com/erdnaxelaweb "erdnaxelaweb (153 commits)")[![lhassanbouhou-acx](https://avatars.githubusercontent.com/u/152858392?v=4)](https://github.com/lhassanbouhou-acx "lhassanbouhou-acx (1 commits)")[![mohamed-hamdani](https://avatars.githubusercontent.com/u/138455778?v=4)](https://github.com/mohamed-hamdani "mohamed-hamdani (1 commits)")

---

Tags

bundlefakerfront-end-developmenttwigui-prototypingtwigfakersympfonyfront-end-developmentui-prototyping

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/erdnaxelaweb-staticfakedesign/health.svg)

```
[![Health](https://phpackages.com/badges/erdnaxelaweb-staticfakedesign/health.svg)](https://phpackages.com/packages/erdnaxelaweb-staticfakedesign)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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