PHPackages                             blackcube/starter - 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. [Framework](/categories/framework)
4. /
5. blackcube/starter

ActiveProject[Framework](/categories/framework)

blackcube/starter
=================

Blackcube CMS starter

1.0.0(1mo ago)03↓100%BSD-3-ClausePHPPHP ^8.1

Since May 4Pushed 1mo agoCompare

[ Source](https://github.com/blackcubeio/starter)[ Packagist](https://packagist.org/packages/blackcube/starter)[ Docs](https://github.com/blackcubeio/starter)[ RSS](/packages/blackcube-starter/feed)WikiDiscussions devel Synced 1w ago

READMEChangelogDependencies (33)Versions (3)Used By (0)

Blackcube Demo — Yii3
=====================

[](#blackcube-demo--yii3)

Demonstration application for [Blackcube CMS](https://www.blackcube.io) on Yii3. Use as a starting point with `composer create-project`.

[![License](https://camo.githubusercontent.com/6cb285b57819f8de0acfb34923298f4f569f962544e8fe35331da2d163f4e485/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d2d332d2d436c617573652d626c75652e737667)](LICENSE.md)

Requirements
------------

[](#requirements)

- PHP 8.4+
- MySQL / MariaDB
- Composer
- Node.js (for frontend assets)

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

[](#installation)

```
composer create-project blackcube/starter my-project
cd my-project
cp .env.example .env
```

Create oauth2 keys:

```
# private key (2048 bits minimum, 4096 recommanded)
openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:4096

# public key
openssl rsa -in private.pem -pubout -out public.pem
```

and copy the keys in `config/keys/`

Edit `.env` with your database credentials:

```
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=myapp
DB_USER=myapp
DB_PASSWORD=myapp
```

and all needed conf vars

Run the migrations:

```
php yii.php migrate:up
```

Stack
-----

[](#stack)

- [blackcube/dcore](https://github.com/blackcubeio/dcore) — data layer (entities, slugs, SEO)
- [blackcube/dboard](https://github.com/blackcubeio/dboard) — administration panel
- [blackcube/ssr](https://github.com/blackcubeio/ssr) — server-side routing and rendering

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

[](#configuration)

### Parameters — `config/common/params.php`

[](#parameters--configcommonparamsphp)

```
'blackcube/ssr' => [
    'scanAttributes' => true,
    'scanAliases' => ['@src/Handlers'],
],
```

ParameterDescription`scanAttributes`Scan handler classes for `#[RoutingHandler]` attributes`scanAliases`Yii aliases pointing to directories containing handlers### Middleware — `config/web/di/application.php`

[](#middleware--configwebdiapplicationphp)

```
SsrRoutingMiddlewareInterface::class => YiiSsrRoutingMiddleware::class,
```

```
static function (SsrRoutingMiddlewareInterface $middleware) use ($params): SsrRoutingMiddlewareInterface {
    return $middleware
        // ->withExcludedPrefixes('dboard/', 'api/graphql')
        ->withXeo()
        ->withMdAlternate();
},
```

Pipeline order:

```
ErrorCatcher → Session → CookieLogin → CSRF → SsrRoutingMiddleware → Router

```

Handlers
--------

[](#handlers)

A handler renders CMS content. The SSR middleware resolves the handler via the Type's `handler` field: a Type with `handler: 'article'` dispatches to the class carrying `#[RoutingHandler(route: 'article')]`.

Place handler classes in `src/Handlers/`:

```
#[RoutingHandler(route: 'landing')]
final class LandingHandler implements RequestHandlerInterface
{
    public function __construct(
        private readonly Content|Tag $element,
        private readonly WebViewRenderer $viewRenderer,
    ) {}

    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        // $this->element is the Content or Tag resolved from the slug
        // $this->viewRenderer carries Xeo injections (meta, OG, JSON-LD)
    }
}
```

The CMS entity and Yii services are injected in the constructor. The request is passed to `handle()`.

### Error handlers

[](#error-handlers)

```
#[RoutingHandler(route: 'not-found', errorCode: 404)]
final class NotFoundHandler implements RequestHandlerInterface { }

#[RoutingHandler(route: 'server-error', errorCodesRange: [500, 599])]
final class ServerErrorHandler implements RequestHandlerInterface { }
```

Special routes
--------------

[](#special-routes)

Handled automatically by the SSR package — no code needed:

RouteContent-TypeSource`/sitemap.xml``application/xml`Active CMS slugs with sitemap metadata`/robots.txt``text/plain`GlobalXeo "Robots" entry`/llms.txt``text/plain`LlmMenu navigation tree`/llms-full.txt``text/plain`LlmMenu tree with full markdown content`/{slug}.md``text/markdown`Markdown export of any CMS pageRedirects301/302Slugs with a target URLLicense
-------

[](#license)

BSD-3-Clause. See [LICENSE.md](LICENSE.md).

Author
------

[](#author)

Philippe Gaultier

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance93

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/545714?v=4)[pgaultier](/maintainers/pgaultier)[@pgaultier](https://github.com/pgaultier)

---

Top Contributors

[![pgaultier](https://avatars.githubusercontent.com/u/545714?v=4)](https://github.com/pgaultier "pgaultier (2 commits)")

---

Tags

cmsdemoblackcube

### Embed Badge

![Health badge](/badges/blackcube-starter/health.svg)

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

###  Alternatives

[yiisoft/app

Yii3 web application template

36813.9k](/packages/yiisoft-app)[yiisoft/app-api

Yii3 API project template

1031.7k](/packages/yiisoft-app-api)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[yiisoft/yii-runner-roadrunner

Web application runner for RoadRunner

3410.9k](/packages/yiisoft-yii-runner-roadrunner)[yiisoft/yii-runner-http

HTTP application runner

10186.9k10](/packages/yiisoft-yii-runner-http)

PHPackages © 2026

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