PHPackages                             ausus/api-http - 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. ausus/api-http

ActiveLibrary[Framework](/categories/framework)

ausus/api-http
==============

AUSUS L4 — PSR-7/15 HTTP API surface for the metadata graph. Serves RFC-004 ViewSchema fetches, Action invocation, and the kernel exception taxonomy.

v1.0.1(1w ago)0227↓33.3%10MITPHPPHP &gt;=8.3

Since May 19Pushed 1w agoCompare

[ Source](https://github.com/adonko3xBitters/api-http)[ Packagist](https://packagist.org/packages/ausus/api-http)[ Docs](https://github.com/adonko3xBitters/api-http)[ RSS](/packages/ausus-api-http/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (14)Versions (26)Used By (10)

ausus/api-http
==============

[](#aususapi-http)

**L4 — HTTP API surface for the AUSUS metadata graph.**

Pure PSR-7/15. No framework dependency. Mounts as a single `Psr\Http\Server\RequestHandlerInterface` in front of any PSR-7 server (`react/http`, `swoole`, `roadrunner`, `php-fpm`, or `php -S`).

What it serves
--------------

[](#what-it-serves)

RoutePurpose`GET  /_health`liveness probe + graph hash`GET  /projections/{fqn}`RFC-004 ViewSchema with embedded data; optional `?subject=` for DetailView`POST /actions/{fqn}`invoke an Action; returns `{ok, outputs}` or `{ok:false, error}``OPTIONS *`CORS preflightThe routes are **the** routes — no per-Entity controllers, no hand-rolled DTOs. Every endpoint dispatches into the same Invoker chain that the in-process kernel uses (RFC-005 §3).

URL contract — frozen
---------------------

[](#url-contract--frozen)

Header / paramSourcePurpose`X-Tenant-ID`required, on `/projections/*` + `/actions/*`tenant boundary`X-Actor-Id`optionalstub-actor id (V0 only)`X-Actor-Roles`optionalstub-actor roles, comma-separated (V0 only)`?locale=…`querypassed through to ProjectionRenderer`?renderer=…`queryrenderer profile (e.g. `react.web.v1`)`?subject=`queryDetailView subject identityHandlebody (POST)JSON`{ "subject": Reference | null, "inputs": object }`Error envelope
--------------

[](#error-envelope)

```
{ "ok": false, "error": { "kind": "", "message": "…" } }
```

ExceptionHTTP`error.kind``BadRequest`400`BadRequest``MalformedDescriptor`400`MalformedDescriptor``PolicyDeniedException`403`PolicyDenied``TenantBoundaryViolation`403`TenantBoundaryViolation`(not-found route / FQN)404`NotFound` / `ProjectionNotFound` / `ActionNotFound``WorkflowStateMismatch`409`WorkflowStateMismatch``ConcurrencyConflict`409`ConcurrencyConflict``EffectFailure` / unknown500`EffectFailure` / `InternalError`Usage
-----

[](#usage)

```
use Ausus\Api\Http\{Router, Emitter};
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7Server\ServerRequestCreator;

$factory = new Psr17Factory();
$creator = new ServerRequestCreator($factory, $factory, $factory, $factory);
$router  = new Router($graph, $driver, $auditSink, $factory, $factory);

Emitter::emit($router->handle($creator->fromGlobals()));
```

`$graph` comes from `ausus/kernel`'s `Compiler`, `$driver` from `ausus/persistence-sql`, `$auditSink` likewise. The Router builds a fresh `Invoker` + `ProjectionRenderer` per request using the per-request tenant + actor; the policy engine, workflow runtime, effect dispatcher, and sequence counter are shared across requests.

Security notes (V0)
-------------------

[](#security-notes-v0)

This package implements the **transport layer** only. It does NOT implement:

- Authentication — the `X-Actor-*` headers are a stub for the V0 browser demo; replace with a real auth middleware (JWT, session, OAuth) in front of the Router for any non-local deployment.
- Rate limiting / DOS protection — front with a reverse proxy.
- CSRF — the renderer's flow is API-only (no cookies, JSON bodies). Production deployments using cookies must add CSRF tokens.
- TLS — terminate TLS at your reverse proxy.

The CORS headers are permissive (`Access-Control-Allow-Origin: *`) for the V0 demo. Production must restrict to the allowed origin list.

License
-------

[](#license)

MIT — see `LICENSE`.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance98

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

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 ~1 days

Total

11

Last Release

11d ago

Major Versions

v0.2.0-rc.1 → v1.0.02026-05-29

### Community

Maintainers

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

---

Top Contributors

[![adonko3xBitters](https://avatars.githubusercontent.com/u/136594948?v=4)](https://github.com/adonko3xBitters "adonko3xBitters (6 commits)")

---

Tags

httppsr-7apiframeworkpsr-15ausus

### Embed Badge

![Health badge](/badges/ausus-api-http/health.svg)

```
[![Health](https://phpackages.com/badges/ausus-api-http/health.svg)](https://phpackages.com/packages/ausus-api-http)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[slim/slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs

12.3k51.8M1.4k](/packages/slim-slim)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)

PHPackages © 2026

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