Server-side routing and rendering bridge for blackcube/dcore

Maintainers

Package info

github.com/blackcubeio/ssr

pkg:composer/blackcube/ssr

Statistics

Installs: 14

Dependents: 0

Suggesters: 1

Stars: 0

Open Issues: 0

1.0.0 2026-04-07 16:43 UTC

This package is auto-updated.

Last update: 2026-04-07 17:21:34 UTC


README

Server-side routing bridge for Blackcube CMS. Maps dcore slugs to PHP handlers, injects SEO metadata, handles errors — all through PSR-15 middleware.

License Packagist Version

Where ssr sits

┌────────────────────────────┐
│ your app (Yii/Slim/Laravel) │
└──────────────┬─────────────┘
               ↓
       ┌──────────────────────┐
       │ ssr ← you are here    │
       │ routing, SEO, handlers│
       └───────────┬──────────┘
                   ↓
             ┌──────────┐
             │  dcore   │
             │ (data)   │
             └──────────┘
                   ↓
                   DB

Quickstart

composer require blackcube/ssr
#[RoutingHandler(route: 'page')]
final class PageHandler implements RequestHandlerInterface
{
    public function __construct(
        private readonly Content $content,
        private readonly WebViewRenderer $viewRenderer,
    ) {}

    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->viewRenderer->render('page', ['content' => $this->content]);
    }
}

Documentation

  • Installation — requirements, configuration, DI wiring
  • Routing — middleware, handler registry, attributes, dispatch modes
  • SEO — Xeo injection, meta tags, Open Graph, Twitter Cards, JSON-LD
  • Errors — fallback handler, throwable factory, error handler registration
  • Integration — PSR and Yii integration, Quill helper

License

BSD-3-Clause. See LICENSE.md.