# krusemediengmbh/krme-recipes architecture

> Architecture diagram of the GitHub repository krusemediengmbh/krme-recipes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krusemediengmbh/krme-recipes
- Repository: https://github.com/krusemediengmbh/krme-recipes

## Overview

##### Project type and purpose
- This is an open-source, command-line installer/utility designed to bootstrap and manage “code quality” tooling for Shopware projects. It provides a Flex-style recipe with Docker support, configuration files (PHP CS Fixer, PHPStan, PHPUnit, Rector, Infection, etc.), CI/CD pipelines (GitHub Actions, Bitbucket), and versioned manifests.

##### File structure
- Top-level:
- .github/workflows – GitHub Actions that automate “flex-cleanup” and “flex-update.”
- Readme.md – usage instructions for the installer script.
- krme/shopware-platform-tools/1.0 – versioned package root.
- Under krme/shopware-platform-tools/1.0:
- docker – Dockerfile, Makefile, and cleanup.sh for containerized code-quality runs.
- manifest.json & scripts.json – version metadata and task definitions.
- post-install.txt – post-install instructions.
- root – templates for .php-cs-fixer.dist.php, phpstan.neon, phpunit.xml.dist, rector.php, rulesets.xml, .shopware-project.yml, deploy.php, bitbucket-pipelines.yml, infection.json5, .gitattributes, .ludtwig-ignore.
- tests/TestBootstrap.php – bootstrap for running unit tests.

##### README for additional insights
- The only entrypoint for end users is a one-liner shell command that curls script.sh from this repo and pipes it to bash, optionally with a `--reset` flag to revert an existing Flex recipe.

##### Elements
- Clear labels: “Developer CLI,” “Installer Script,” “GitHub Repo,” “Docker Engine,” “Shopware Project,” “GitHub Actions,” “Bitbucket Pipelines.”
- Orange for runtime components (Container, CLI)
- Grey for local project files

## Diagram (Mermaid)

```mermaid
flowchart TD
    DeveloperCLI["Developer CLI"]:::runtime
    Installer["Installer Script\n(script.sh)"]:::runtime
    GitHubRepo["GitHub Repository"]:::external
    Manifest["Manifest Definitions\n(manifest.json)"]:::repo
    ScriptsDef["Task Definitions\n(scripts.json)"]:::repo
    subgraph "Versioned Package Root (1.0)"
        VersionedDir["krme/shopware-platform-tools/1.0"]:::repo
        subgraph "Docker Assets"
            Dockerfile["Dockerfile"]:::repo
            Makefile["Makefile"]:::repo
            CleanupSh["cleanup.sh"]:::repo
        end
        subgraph "Configuration Templates"
            PHP_CS[".php-cs-fixer.dist.php"]:::repo
            PHPStan["phpstan.neon"]:::repo
            PHPUnit["phpunit.xml.dist"]:::repo
            Rector["rector.php"]:::repo
            Rulesets["rulesets.xml"]:::repo
            Infection["infection.json5"]:::repo
            ShopwareYml[".shopware-project.yml"]:::repo
            Deploy["deploy.php"]:::repo
            BitbucketYml["bitbucket-pipelines.yml"]:::repo
            Gitattributes[".gitattributes"]:::repo
            Ludtwig[".ludtwig-ignore"]:::repo
        end
        PostInstall["Post-install Instructions\n(post-install.txt)"]:::repo
        TestBootstrap["Test Bootstrap\n(TestBootstrap.php)"]:::repo
    end
    ShopwareProject["Shopware Project\n(target)"]:::local
    DockerEngine["Docker Engine"]:::external
    Container["Docker Container"]:::runtime
    subgraph "CI/CD Pipelines"
        FlexCleanup["GitHub Actions\n(flex-cleanup)"]:::external
        FlexUpdate["GitHub Actions\n(flex-update)"]:::external
        Bitbucket["Bitbucket Pipelines"]:::external
    end

    DeveloperCLI -->|"runs curl | bash"| Installer
    Installer -->|"fetches"| Manifest
    Installer -->|"fetches"| ScriptsDef
    Manifest -->|drives version| VersionedDir
    ScriptsDef -->|defines tasks| VersionedDir
    VersionedDir -->|provides| Dockerfile
    VersionedDir -->|provides| Makefile
    VersionedDir -->|provides| CleanupSh
    VersionedDir -->|provides| PHP_CS
    VersionedDir -->|provides| PHPStan
    VersionedDir -->|provides| PHPUnit
    VersionedDir -->|provides| Rector
    VersionedDir -->|provides| Rulesets
    VersionedDir -->|provides| Infection
    VersionedDir -->|provides| ShopwareYml
    VersionedDir -->|provides| Deploy
    VersionedDir -->|provides| BitbucketYml
    VersionedDir -->|provides| Gitattributes
    VersionedDir -->|provides| Ludtwig
    VersionedDir -->|provides| PostInstall
    VersionedDir -->|provides| TestBootstrap
    Installer -->|"copies templates"| ShopwareProject
    Installer -->|"runs make build"| DockerEngine
    DockerEngine -->|"builds image"| Container
    Container -->|"executes code-quality"| ShopwareProject
    DeveloperCLI -->|"commits changes"| ShopwareProject
    ShopwareProject -->|"push triggers"| FlexCleanup
    ShopwareProject -->|"push triggers"| FlexUpdate
    ShopwareProject -->|"push triggers"| Bitbucket

    click Installer "https://github.com/krusemediengmbh/krme-recipes/blob/main/Readme.md"
    click VersionedDir "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0"
    click Manifest "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/manifest.json"
    click ScriptsDef "https://github.com/krusemediengmbh/krme-recipes/blob/main/scripts.json"
    click Dockerfile "https://github.com/krusemediengmbh/krme-recipes/tree/main/krme/shopware-platform-tools/1.0/docker/Dockerfile"
    click Makefile "https://github.com/krusemediengmbh/krme-recipes/tree/main/krme/shopware-platform-tools/1.0/docker/Makefile"
    click CleanupSh "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/docker/cleanup.sh"
    click PHP_CS "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/.php-cs-fixer.dist.php"
    click PHPStan "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/phpstan.neon"
    click PHPUnit "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/phpunit.xml.dist"
    click Rector "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/rector.php"
    click Rulesets "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/rulesets.xml"
    click Infection "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/infection.json5"
    click ShopwareYml "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/.shopware-project.yml"
    click Deploy "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/deploy.php"
    click BitbucketYml "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/bitbucket-pipelines.yml"
    click Gitattributes "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/.gitattributes"
    click Ludtwig "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/root/.ludtwig-ignore"
    click PostInstall "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/post-install.txt"
    click TestBootstrap "https://github.com/krusemediengmbh/krme-recipes/blob/main/krme/shopware-platform-tools/1.0/tests/TestBootstrap.php"
    click FlexCleanup "https://github.com/krusemediengmbh/krme-recipes/blob/main/.github/workflows/flex-cleanup.yml"
    click FlexUpdate "https://github.com/krusemediengmbh/krme-recipes/blob/main/.github/workflows/flex-update.yml"

    classDef external fill:#cce5ff,stroke:#3399ff,color:#004080;
    classDef repo fill:#e6ffe6,stroke:#33cc33,color:#004d00;
    classDef runtime fill:#ffe6cc,stroke:#ff9933,color:#804000;
    classDef local fill:#f2f2f2,stroke:#999999,color:#666666;
```
