PHPackages                             cboxdk/platform - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. cboxdk/platform

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

cboxdk/platform
===============

Cbox Platform — the typed application model, deterministic Kubernetes compiler, and plan/diff primitives shared by Cbox Local and Cbox Cortex.

v0.4.1(today)03↑2900%MITPHPPHP ^8.4CI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/cboxdk/platform)[ Packagist](https://packagist.org/packages/cboxdk/platform)[ Docs](https://github.com/cboxdk/platform)[ RSS](/packages/cboxdk-platform/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

Cbox Platform
=============

[](#cbox-platform)

**A typed application model, a deterministic Kubernetes compiler, and plan/diff primitives — as a library you embed, not a platform you run.**

[![Latest Version](https://camo.githubusercontent.com/523bf3c8676b945fea270b51e08f6260bcc80a9dc2d0ec1e6fe64d2efa3e792b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63626f78646b2f706c6174666f726d2e737667)](https://packagist.org/packages/cboxdk/platform)[![License](https://camo.githubusercontent.com/67cdf16ddbd49ab08d2d31babb09e26f22c2ad0a9d3b919e8225e73e8052a64e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63626f78646b2f706c6174666f726d2e737667)](LICENSE)

```
                    Application intent
                            │
                      Cbox Platform
                            │
                Compiled Kubernetes resources
                            │
              your apply / reconciliation layer

```

This is **not another PaaS** and **not a Kubernetes framework**. It runs no service, owns no cluster, applies nothing, and has no opinion about how you deploy. It answers one question — *what does an application resource mean, and what Kubernetes objects does that intent compile to?* — and answers it the same way every time.

```
use Cbox\Platform\Capability\PlatformTarget;
use Cbox\Platform\Compile\ServiceCompiler;
use Cbox\Platform\Service\ServiceSpec;

$manifests = new ServiceCompiler(new PlatformTarget)->compile(new ServiceSpec(
    serviceId: 'svc-checkout',
    organizationId: 'acme',
    namespace: 'cx-feature-checkout',
    name: 'web',
    image: 'ghcr.io/acme/checkout:2.1.0',
    port: 8080,
    replicas: 2,
    domains: ['checkout.acme.example'],
    scaleToZero: true,
));

echo $manifests->toYaml();   // hand this to kubectl, a client-go bridge, anything
```

No container, no ORM, no configuration file, no network. That is the whole point.

Why it exists
-------------

[](#why-it-exists)

Two products needed to agree on what a Cbox application *is*:

- **Cbox Cortex** — the hosted platform. Customer intent lives in Postgres; the compiled output is applied to production clusters over a Go bridge.
- **Cbox Local** — a local, production-like development platform on kind.

They differ in how intent is **discovered**, **built**, **applied** and **operated**. They must not differ in what an application *means* or how that intent compiles to Kubernetes — otherwise "works locally" stops being evidence of anything. So the middle of the diagram became a package, and both products consume it.

```
                       cboxdk/platform
                  ┌──────────────────────┐
                  │ typed runtime intent │
                  │ compiler             │
                  │ plan / diff          │
                  └──────────┬───────────┘
                             │
               ┌─────────────┴─────────────┐
               │                           │
          Cbox Local                  Cbox Cortex
      local project mapper       Eloquent intent mapper
       local BuildKit build       hosted build/registry
               │                           │
             kind                     kube-bridge
               │                           │
         Kubernetes                  Kubernetes

```

Cortex and Local are the reference consumers. Nothing about either is required to use this package.

Install
-------

[](#install)

```
composer require cboxdk/platform
```

Requires PHP 8.4+. The only runtime dependency is `symfony/yaml`.

What it gives you
-----------------

[](#what-it-gives-you)

**Typed intent, not arrays.** `ServiceSpec`, `DatabaseSpec`, `BackupSpec`, `RunSpec`, `EnvironmentGatewaySpec` and friends are `readonly` value objects. Where they come from is your problem and deliberately so — an ORM, a YAML file, a Git repository, CLI flags, or a test fixture written by hand.

**A compiler that is a pure function.** `compile()` reads no database, no cluster, no config, no clock, no environment, no network. Everything it needs arrives in the spec and the target. Given the same input it emits the same bytes — which is what makes the next two features possible at all.

**Plan/diff without touching a cluster.** Manifests are content-hashed with a canonical encoding, so "did anything change" is a hash comparison against what you last applied:

```
$plan = new HashPlanner()->plan($desired, $appliedHashes);

$plan->summary();     // ['create' => 2, 'update' => 1, 'delete' => 0, 'unchanged' => 4]
$plan->hasChanges();  // false means a deploy would do nothing at all
```

Retain the previous bodies as well and the plan can say *what* changed, not merely that something did — with secret material redacted, always:

```
update Deployment/web
  ~ spec.replicas 1 → 3
update Secret/web-env
  ~ stringData.APP_KEY ••• → •••

```

**A typed target instead of feature flags.** What a cluster can actually do — whether its nodes can checkpoint an idle workload, where the HTTP autoscaler's interceptor lives, which engine images to run, who signs its certificates, what a customer's own kubectl may do — is one `PlatformTarget` object. There is no `if ($local)` anywhere in the compiler, and there will not be: a difference between two clusters is a value, and a value is testable.

**Product semantics, not mechanisms.** Scale-to-zero, suspend/resume, autoscaling and health are expressed as what the customer asked for. Whether a wake is a checkpoint restore or a cold pod start is the target's business, not the application's.

What it does not do
-------------------

[](#what-it-does-not-do)

- **Apply anything.** It emits objects. Applying them — server-side apply, drift reconciliation, status — is yours.
- **Build images.** It consumes an image reference. Dockerfiles, BuildKit and registries live in the consumer.
- **Provision infrastructure.** No clusters, no node pools, no provider APIs, no credentials.
- **Pretend Kubernetes isn't there.** Kubernetes is the shared runtime contract, and the abstraction is at the application-resource level. There is no `GenericRuntimeCompiler` waiting for a Nomad backend that is not coming.

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

[](#documentation)

- [Overview and mental model](docs/index.md)
- [Quickstart](docs/quickstart.md)
- [Architecture](docs/core-concepts/architecture.md)
- [The platform target](docs/core-concepts/platform-target.md)
- [Labels on compiled objects](docs/core-concepts/labels.md)
- [Kubernetes API versions](docs/core-concepts/api-versions.md)
- [Plan and diff](docs/core-concepts/plan-and-diff.md)
- [Public API and what `0.x` means](docs/core-concepts/public-api.md)
- [Compiling without a framework](docs/cookbook/compile-without-a-framework.md)
- [Writing your own mapper](docs/cookbook/writing-a-mapper.md)
- [Testing: the shipped trait and fakes](docs/getting-started/testing.md)
- [Threat model](docs/security/threat-model.md)
- [The open-source boundary](docs/security/oss-boundary.md)

Status
------

[](#status)

`0.x`. The model and compiler are extracted from a system running real customer workloads, so the behaviour is not speculative — but the *API* is young and may change in a minor release. See [Public API](docs/core-concepts/public-api.md)for what is covered and what is internal.

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

[](#contributing)

[CONTRIBUTING.md](CONTRIBUTING.md). The short version: the compiler stays pure, and golden files are never regenerated to make a test pass.

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

Every ~0 days

Total

6

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

[![sylvesterdamgaard](https://avatars.githubusercontent.com/u/2431914?v=4)](https://github.com/sylvesterdamgaard "sylvesterdamgaard (10 commits)")

---

Tags

diffplatformcompilerplandeploymentkubernetespaascboxautoscalingscale-to-zeromanifestsplatform-engineeringinternal-developer-platformgateway-api

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cboxdk-platform/health.svg)

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

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M225](/packages/sulu-sulu)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k19](/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.

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

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

103574.3k64](/packages/friendsoftypo3-content-blocks)[in2code/in2publish_core

Content publishing extension to connect stage and production server

40145.9k](/packages/in2code-in2publish-core)[shopware/deployment-helper

Shopware deployment tools

19436.6k5](/packages/shopware-deployment-helper)

PHPackages © 2026

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