PHPackages                             k2gl/pragmatic-franken - 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. k2gl/pragmatic-franken

ActiveProject[Templating &amp; Views](/categories/templating)

k2gl/pragmatic-franken
======================

Pragmatic FrankenPHP — PHP 8.5 / Symfony 8 starter: Vertical Slices + CQRS over Messenger, FrankenPHP worker mode, real prod image, agent-ready docs

v1.1.2(1mo ago)331[2 PRs](https://github.com/k2gl/pragmatic-franken/pulls)MITPHPPHP &gt;=8.5CI passing

Since Jun 12Pushed 6d ago1 watchersCompare

[ Source](https://github.com/k2gl/pragmatic-franken)[ Packagist](https://packagist.org/packages/k2gl/pragmatic-franken)[ Docs](https://github.com/k2gl/pragmatic-franken)[ RSS](/packages/k2gl-pragmatic-franken/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (94)Versions (9)Used By (0)

Pragmatic FrankenPHP
====================

[](#pragmatic-frankenphp)

[![CI](https://camo.githubusercontent.com/49916dfddfb966726632ae8cbb19c7a9ae74f63469a28b6c93cefef2e147bc16/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b32676c2f707261676d617469632d6672616e6b656e2f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4349266c6f676f3d676974687562)](https://github.com/k2gl/pragmatic-franken/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/bc25ac45c6eab59905f70e165cf078e26295c075939b0d781760067b10642367/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b32676c2f707261676d617469632d6672616e6b656e3f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/k2gl/pragmatic-franken)[![PHP 8.5](https://camo.githubusercontent.com/76bc314ba83b0f129fc17df511d367a5cb210dabe2c8af0bb429a75bc52b2333/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352d3737376262343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/releases/8.5/)[![FrankenPHP 1.x](https://camo.githubusercontent.com/5df722defc3ef618ac48ecba7325f96af5c7e7a4b91b88cb05c1ba0c43bc7da0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616e6b656e5048502d312e782d3030366235623f6c6f676f3d646f636b6572266c6f676f436f6c6f723d7768697465)](https://frankenphp.dev/)[![Symfony 8](https://camo.githubusercontent.com/029babe1877b30127823cca997efd987b7a8e3ceb0cd835916734d01cdc6da21/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d382d3030303030303f6c6f676f3d73796d666f6e79266c6f676f436f6c6f723d7768697465)](https://symfony.com/)[![PHPStan Level 10](https://camo.githubusercontent.com/1507fccba410dc268b908bebeed281aa239971fbb42a8a258f6eed892fff5ddf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c25323031302d3261356561373f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://phpstan.org)[![License](https://camo.githubusercontent.com/98f4c2aef78da24ed44415616b16cf19a5830a63eda19eb3b6f69b6261f13ea1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b32676c2f707261676d617469632d6672616e6b656e3f636f6c6f723d79656c6c6f77677265656e)](https://packagist.org/packages/k2gl/pragmatic-franken)

**Pragmatic FrankenPHP** is a PHP 8.5 / Symfony 8 / FrankenPHP starter that real production projects actually grew out of — and the lessons were ported back. Vertical Slices + CQRS over Messenger, PostgreSQL 17, worker mode, real prod image, supply-chain attestations. The goal: fork it and ship a real product on day one, operated by humans and AI agents alike.

**The promises are CI-proven, not vibes:**

- the **production image boots** on every PR (`prod-image` job: build → run → `/ready`);
- **scaffolded code passes PHPStan 10 + tests untouched** (`agent-smoke` job);
- release images carry **SLSA build provenance**, and the deploy gate verifies it (ADR-0014);
- docs are **linted against reality** (`make docs-check`: routes, Makefile targets, ADR sync).

For architecture rules and code-level guidance, see **[AGENTS.md](AGENTS.md)** — the single source of truth, ≤ 2 000 tokens, equally usable by developers and AI tools.

Stack
-----

[](#stack)

LayerChoiceWhyApplication serverFrankenPHP 1.x (Caddy + worker mode)one binary, HTTP/3, kernel kept hotFrameworkSymfony 8.0mature, attribute-based wiringBusSymfony Messenger (CQRS)sync commands/queries, async eventsDatabasePostgreSQL 17Doctrine ORM 3QueueMessenger on Doctrine transportno extra extension, inspectable, production-provenCacheRedis 7 (Predis)ready for caching and custom needsFrontend (default)AssetMapper + Twigno Webpack/Vite needed for HTML-firstCode styleLaravel Pint (PSR-12)one-flag autofixStatic analysisPHPStan level 10enforced in CITestsPHPUnit 12 + Zenstruck (Foundry, Browser, Messenger-Test) + DAMA + Faker + Fluent Assertionspyramid 60/30/10Quickstart
----------

[](#quickstart)

**Path 1 — template + Docker** (nothing but Docker needed):

```
gh repo create my-app --template k2gl/pragmatic-franken --clone && cd my-app
# or: git clone https://github.com/k2gl/pragmatic-franken.git my-app
make install                  # env, containers, deps, migrations
make init name=my-app         # rename + real secrets (optionally: prune=1 reset-git=1)
make smoke                    # bin/console + /ready
```

**Path 2 — composer create-project** (needs PHP ≥ 8.5 on the host):

```
composer create-project k2gl/pragmatic-franken my-app
cd my-app && make install && make init name=my-app
```

The app comes up at `https://my-app.localhost:${HTTPS_PORT:-4750}` (browsers resolve `*.localhost` automatically — no `/etc/hosts` edits). Try the example API: `POST /tasks`, `GET /tasks`, `POST /tasks/{id}/complete` — completion pushes a Mercure live update on `/tasks`.

Why not just symfony/skeleton?
------------------------------

[](#why-not-just-symfonyskeleton)

**pragmatic-franken**symfony/skeletondunglas/symfony-dockerAPI PlatformArchitecture opinionVertical Slices + CQRS, 18 ADRsnonenoneAPI-first frameworkProd imagebuilt, booted &amp; scanned per PR—builtbuiltReal example verticalentity→migration→factory→tests——generated CRUDDeploy storyblue-green to a VDS + backups + DR drill——k8s helmSupply chainattestations + offline verifier + gate———Agent affordancesAGENTS.md (≤2k tokens) + CI-proven scaffolding———Best whenproduct API/app on one VDS, agents in the loopyou want vanillayou want plain Dockeryour product *is* the APIHonest non-goals: no auth in core (recipe instead), no bundled SPA, no Kubernetes, no multi-DB.

Daily commands
--------------

[](#daily-commands)

CommandEffect`make up` / `make down`start / stop containers`make shell` (alias `make e`)shell inside the app container`make test`PHPUnit, fail-fast`make check`Pint + PHPStan (pre-commit gate)`make ci`lint-check + analyze + test (CI parity)`make smoke`end-to-end smoke check`make slice context=Foo feature=Bar`scaffold a vertical slice`make adr title="My Decision"`scaffold a new ADR`make docs-check`lint docs against reality (routes, targets, budgets)`make agent-smoke`prove scaffolded code passes all gates untouched`make db-seed`demo data (`app:seed`)Project layout
--------------

[](#project-layout)

```
src/                              # application code
  Kernel.php                      # App\Kernel (Symfony MicroKernel)
  SharedKernel/                   # cross-context infra (repository base, problem+json listeners)
  Context/{Name}/                 # bounded contexts: Entity/, Repository/, Features/{Feature}/
    Health/Features/Healthz/      # reference slice (JSON, /healthz + /ready)
    Home/Features/Index/          # reference slice (Twig + AssetMapper, /)
config/  bin/  public/  assets/   # standard Symfony layout
migrations/                       # Doctrine migrations
docs/                             # ADRs and guides (Tier 2)
  adr/                            # ADRs with YAML front-matter
  guides/                         # development, testing, worker-mode, …
dev/                              # codegen helpers (create-slice, new-adr, check-docs)
ops/                              # deployment scripts
tests/                            # mirrors src/ — tests/Context/{Name}/Features/{Feature}/
docker/                           # Dockerfile, Caddyfile, php.ini
AGENTS.md                         # Tier-1 agent context, ≤ 2 000 tokens

```

The example slices (`Health/Healthz`, `Home/Index`, `Task`) are reference implementations — `Healthz` is normative for ADR-0005 health checks, `Task` for the full entity → migration → factory → tests vertical; `Home/Index` is non-normative (drop it for API-only or SPA projects).

Architecture decisions
----------------------

[](#architecture-decisions)

All decisions live in [`docs/adr/`](docs/adr/). Each ADR carries YAML front-matter (`status`, `date`, `audience`, `summary`) so agents can skim without loading the full body.

ADRTopicStatus[0001](docs/adr/0001-vertical-slices.md)Vertical SlicesAccepted[0002](docs/adr/0002-messenger-transport.md)Messenger TransportAccepted[0003](docs/adr/0003-pragmatic-symfony-architecture.md)Pragmatism CharterAccepted[0004](docs/adr/0004-frankenphp-runtime.md)FrankenPHP RuntimeAccepted[0005](docs/adr/0005-health-checks.md)Health ChecksAccepted[0006](docs/adr/0006-memory-management.md)Memory ManagementAccepted[0007](docs/adr/0007-asset-mapper.md)AssetMapperAccepted[0008](docs/adr/0008-testing-strategy.md)Testing StrategyAccepted[0009](docs/adr/0009-shared-architecture.md)Shared ArchitectureAccepted[0010](docs/adr/0010-documentation-and-ai-layout.md)Documentation &amp; AI LayoutAccepted[0011](docs/adr/0011-event-sourcing-lite.md)Event Sourcing LiteAccepted[0012](docs/adr/0012-ubiquitous-language.md)Ubiquitous Language &amp; Entity PlacementAccepted[0013](docs/adr/0013-doctrine-repository-pattern.md)Doctrine Repository PatternAccepted[0014](docs/adr/0014-supply-chain-security.md)Supply-Chain SecurityAccepted[0015](docs/adr/0015-scheduler-and-periodic-tasks.md)Scheduler &amp; Periodic TasksAccepted[0016](docs/adr/0016-http-response-contract.md)HTTP Response ContractAccepted[0017](docs/adr/0017-parallel-agent-sessions.md)Parallel Agent SessionsAccepted[0018](docs/adr/0018-input-validation-and-invariants.md)Input Validation &amp; Domain InvariantsAcceptedGuides
------

[](#guides)

- [`docs/guides/development.md`](docs/guides/development.md) — daily commands, slice scaffolding details
- [`docs/guides/testing.md`](docs/guides/testing.md) — concrete PHPUnit + Foundry + Messenger-Test patterns
- [`docs/guides/worker-mode.md`](docs/guides/worker-mode.md) — debugging FrankenPHP worker behavior
- [`docs/guides/mercure-integration.md`](docs/guides/mercure-integration.md) — real-time SSE via FrankenPHP's built-in Mercure hub
- [`docs/guides/sdk-generation.md`](docs/guides/sdk-generation.md) — auto-generate TypeScript types from PHP Result DTOs
- [`docs/guides/deployment.md`](docs/guides/deployment.md) — single-VDS topology, zero-downtime rollout
- [`docs/guides/disaster-recovery.md`](docs/guides/disaster-recovery.md) — backups and the restore drill
- [`docs/guides/parallel-sessions.md`](docs/guides/parallel-sessions.md) — isolated worktree stacks for parallel agents
- [`docs/guides/supply-chain.md`](docs/guides/supply-chain.md) — sign releases, verify before deploying

Recipes (opt-in capabilities)
-----------------------------

[](#recipes-opt-in-capabilities)

Proven in real production projects grown from this skeleton, documented instead of bundled: [JWT auth](docs/recipes/jwt-auth.md) · [feature flags](docs/recipes/feature-flags.md) · [SPA frontend](docs/recipes/spa-frontend.md) · [preview environments](docs/recipes/preview-environments.md).

Staying close to the template
-----------------------------

[](#staying-close-to-the-template)

Forks don't merge templates — they apply changes. Each release ships an [`UPGRADE.md`](UPGRADE.md) entry with the few changes worth porting; see [`docs/guides/fork-maintenance.md`](docs/guides/fork-maintenance.md).

AI agents
---------

[](#ai-agents)

The repository ships with a single `AGENTS.md` at the root, intended to be read by every AI tool by convention. There are no `.cursorrules`, `.windsurfrules`, `.cursor/rules/*` or per-tool prompt files — see [ADR-0010](docs/adr/0010-documentation-and-ai-layout.md) for the rationale.

Machine-local Claude Code settings live in `.claude/settings.local.json` (gitignored); parallel agent sessions get isolated stacks via `dev/worktree.sh` ([ADR-0017](docs/adr/0017-parallel-agent-sessions.md)).

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

[](#contributing)

See [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md). Conventional Commits required for the message header. CI gates: Pint, PHPStan level 10, PHPUnit. `make ci` mirrors the pipeline locally.

License
-------

[](#license)

MIT.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance96

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.8% 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 ~0 days

Total

6

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bc4aa529c7f13ea593297497f6eae20d5c07f476baa0a551960d7e6ff1e5413?d=identicon)[k2gl](/maintainers/k2gl)

---

Top Contributors

[![k2gl](https://avatars.githubusercontent.com/u/2846079?v=4)](https://github.com/k2gl "k2gl (204 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

agents-mdboilerplateclean-architecturecqrsddd-architecturefrankenphpmodular-monolithphpphp85skeletonstarter-kitsupply-chain-securitysymfonysymfony-skeletontemplatevertical-slice-architecturevibecodingsymfonytemplatefrankenphpboilerplateSkeletoncqrsstarter-kitvertical-sliceagents-md

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/k2gl-pragmatic-franken/health.svg)

```
[![Health](https://phpackages.com/badges/k2gl-pragmatic-franken/health.svg)](https://phpackages.com/packages/k2gl-pragmatic-franken)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M605](/packages/shopware-core)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M401](/packages/easycorp-easyadmin-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k64](/packages/open-dxp-opendxp)[sylius/sylius

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

8.5k5.9M754](/packages/sylius-sylius)[chameleon-system/chameleon-base

The Chameleon System core.

1028.7k5](/packages/chameleon-system-chameleon-base)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M512](/packages/pimcore-pimcore)

PHPackages © 2026

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