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

ActiveLibrary[Framework](/categories/framework)

citomni/http
============

High-performance HTTP runtime for CitOmni apps: kernel boot glue, request/response, router, view, security (CSRF), maintenance mode, webhooks HMAC, and nonce ledger.

v1.0.4.5(2mo ago)0221MITPHPPHP ^8.2

Since Sep 29Pushed 1mo agoCompare

[ Source](https://github.com/citomni/http)[ Packagist](https://packagist.org/packages/citomni/http)[ Docs](https://github.com/citomni/http)[ GitHub Sponsors](https://github.com/LarsGMortensen)[ Fund](https://ko-fi.com/)[ RSS](/packages/citomni-http/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (11)Used By (1)

CitOmni HTTP
============

[](#citomni-http)

Slim, deterministic HTTP delivery for CitOmni apps. Zero "magic", PSR-4 all the way, PHP 8.2+, tiny boot, predictable overrides.

---

Highlights
----------

[](#highlights)

- **Deterministic boot** -&gt; vendor baseline -&gt; providers -&gt; app (**last wins**)
- **Lean routing** with exact + placeholder/"regex" routes
- **Deep, read-only config** -&gt; `$this->app->cfg->http->base_url`
- **Service maps (no scanning)** -&gt; `$this->app->{id}` resolves instantly (cacheable)
- **Prod-friendly** -&gt; optional compiled caches in `/var/cache/*.php` (atomic writes)
- **HTTP ErrorHandler** (optional, auto-installed if present in package)
- **Maintenance 503** with `Retry-After` and allow-list
- **Security foundations** -&gt; CSRF token helper, cookie/session CSP/Samesite defaults
- **Webhook HMAC** (`WebhooksAuth`) with TTL, clock skew tolerance, nonce/replay protection
- ♻️ **Green by design** - lower memory use and CPU cycles -&gt; less server load, more requests per watt, better scalability, smaller carbon footprint.

---

### Green by design

[](#green-by-design)

CitOmni's "Green by design" claim is empirically validated at the framework level.

The core runtime achieves near-floor CPU and memory costs per request on commodity shared infrastructure, sustaining hundreds of RPS per worker with extremely low footprint.

See the full test report here: [CitOmni Docs → /reports/2025-10-02-capacity-and-green-by-design.md](https://github.com/citomni/docs/blob/main/reports/2025-10-02-capacity-and-green-by-design.md)

---

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

[](#requirements)

- PHP **8.2** or newer
- Recommended extensions: `ext-json` (required), `mbstring` (recommended)
    Optional CitOmni packages: [citomni/infrastructure](https://packagist.org/packages/citomni/infrastructure), [citomni/auth](https://packagist.org/packages/citomni/auth), [citomni/testing](https://packagist.org/packages/citomni/testing)
- OPcache strongly recommended in production

---

Install
-------

[](#install)

```
composer require citomni/http
```

Your app's `composer.json` must PSR-4 map your code:

```
{
	"autoload": {
		"psr-4": {
			"App\\": "src/"
		}
	}
}
```

Then:

```
composer dump-autoload -o
```

---

Quick start
-----------

[](#quick-start)

**`/public/index.php` (minimal front controller):**

```
