One codebase. Several entry points.
Use RequiresEnv on a controller or method to register its routes only when an environment value matches. Web and API roles can share application code while exposing their own routes.
#[RequiresEnv('MODE', 'API')]A cohesive PHP framework for people
who care how their software is built.
Add the core with Composer. Routing, HTTP, JSON localization and explicit SQL become the foundation for your application.
PHP 8.4+ Composercomposer require zephyrus-framework/coreGood tools make space for good thinking. Zephyrus brings routing, HTTP, configuration and security into one coherent foundation.
Explicit code. Familiar PHP. An architecture you can follow from the first request to the last response.
Meet the sourceCode you can reason about.
Parts that belong together.
Built to be understood.
Routes live beside the code they run.
Inputs have types. Responses have purpose.
The details stay in plain sight.
<?php
namespace App\Controllers;
use Zephyrus\Controller\Controller;
use Zephyrus\Http\Response;
use Zephyrus\Routing\Attribute\Get;
final class ProductController extends Controller
{
#[Get('/products/{id}')]
public function show(int $id): Response
{
return Response::json(['id' => $id]);
}
}<?php
use Zephyrus\Http\Response;
// JSON, with an explicit status.
$response = Response::json([
'id' => 42,
'name' => 'Something worth building',
], 201);
// Immutable objects. Intentional changes.
$response = $response->withHeader(
'Cache-Control', 'no-store'
);
return $response;# The essentials, in plain sight.
application:
environment: !env APP_ENV, dev
debug: !env APP_DEBUG, true
render:
engine: latte
directory: app/Views
cache: cache/latte
localization:
locale: en
timezone: America/Toronto{
"demo": {
"greeting": "Hello, {name}",
"items": "{count} {count|plural:item:items}"
}
}{
"demo": {
"greeting": "Bonjour, {name}",
"items": "{count} {count|plural:article:articles}"
}
}localize('demo.greeting', ['name' => 'Sam']);
localize('demo.items', ['count' => 3]);Hello, Sam3 items
<?php
use stdClass;
use Zephyrus\Data\Broker;
final class ProductBroker extends Broker
{
public function find(int $id): ?stdClass
{
return $this->selectOne(
'SELECT id, name FROM product WHERE id = ?',
[$id]
);
}
}ILLUSTRATIVE EXAMPLES / API DOCUMENTATION IS BEING UPDATED
One considered path through your application.
Explore the pieces that make it work.
PHP attributes connect a URL to a controller method. Typed parameters bring the request into your code with a clear contract.
Explore routing ↗Request and response objects keep their state. Changes return a new object, making each step easier to follow.
Explore HTTP ↗Security middleware and validation rules give your application a shared place to handle boundaries and incoming data.
Explore security ↗YAML configuration, environment values and typed sections keep application settings visible and organized.
Explore configuration ↗Split translations across JSON files. Nested keys, parameters and formatting pipes keep messages readable. Regional locales fall back to their language, then the configured default.
Explore localization ↗Brokers group explicit SQL and bound parameters by domain. Typed query helpers, composable transactions and Entity hydration keep the data path visible.
Explore data access ↗A few deliberate choices inside the core. Useful when an application grows, changes roles or starts talking in real time.
Use RequiresEnv on a controller or method to register its routes only when an environment value matches. Web and API roles can share application code while exposing their own routes.
#[RequiresEnv('MODE', 'API')]Autowire constructor dependencies, bind interfaces and choose which services are shared. Circular dependencies are detected during resolution.
bind() / singleton() / make()Compose guards with all, any and not logic, then apply them through middleware. The same core also supplies CSRF, CSP and secure-header middleware.
AllAuthGuard / AnyAuthGuard / NotAuthGuardStream Server-Sent Events from a PHP generator. Typed SseEvent messages carry data, event names, IDs and retry values, with multiline data handled for you.
Generator → SseEvent → SseEmitterGive your coding agent the conventions behind the code. The Zephyrus skill brings routing patterns, application structure and practical integration notes into its working context.
Read the Zephyrus skillAttribute routes. Middleware registration. Broker, Service and Entity patterns. JSON localization. Latte templates. Configuration and testing conventions.
npx skills add ophelios-studio/skills --skill zephyrusRun in your project, then choose your coding agents. The installer supports tools that implement the Agent Skills format.
Native blockchain tools are coming to Zephyrus. Starting with smart contracts, then looking at the whole path from a chain to your application.
Read contract state, encode calls and decode ABI events through a PHP interface.
Connect Alchemy, Infura or your own RPC node. Explore consistent adapters, retries and endpoint fallback.
Index contract events into SQL. Resume from checkpoints, backfill history and account for chain reorganizations.
Receive signed provider webhooks, deduplicate deliveries and route events to application handlers.
Follow receipts and confirmation depth, then stream status changes to the browser with Server-Sent Events.
Explore Sign-In with Ethereum, nonce validation and expiring sessions through Zephyrus guards.
Smart contract access is on the roadmap. The directions below are ideas under consideration, not released features or a fixed delivery plan.