Libraries
The libraries are moving from PHP to Rust one at a time. Appwrite loads each Rust crate through its PHP extension, so the classes keep their PHP names and the PHP source is deleted.
215 PHP classes are served from Rust, in 206,511 lines of Rust (160,479 code). 1,043 classes and 147,664 lines are still PHP.
01Servers#
Serving requests and running work: the HTTP framework and its request and response values, WebSockets, DNS and MQTT brokers, job queues and schedules, and the base for building servers.
Lite & fast micro PHP DNS server abstraction that is **easy to use**.
A simple, light and advanced PHP HTTP framework
A simple abstraction for building MQTT 5.0 brokers.
PSR-7 HTTP message implementations and PSR-17 factories for Utopia
An opinionated scheduler that reconciles schedules from a source of truth and dispatches cron, interval, delayed and fixed-time occurrences without silently skipping a run
A base library for building Utopia style servers.
A simple abstraction for WebSocket servers.
02Transport#
Reaching other services: HTTP and SMTP clients, NATS, and connection strings.
A lightweight PSR-18 HTTP client with cURL and Swoole coroutine backends
Data source names (connection strings), parsed into scheme, credentials, host, port, path and options.
Modern PHP client for NATS messaging system
Queue consumers that share queues with utopia-php/queue: a JetStream worker that reads, settles and dead-letters the way Broker\Nats does.
Lite & fast micro PHP SMTP library that is easy to learn
03Data#
Keeping data: databases and the queries over them, caches and file storage.
A simple cache library to manage application cache storing, loading and purging
Document database: collections, attributes, indexes, documents, queries, permissions, relationships and tenancy over pluggable adapters (PostgreSQL, MariaDB, MySQL, SQLite, in-memory, Redis, Pool, Mirror).
A simple library to manage Mongo database
Queries as data, compiled to SQL (MySQL, MariaDB, PostgreSQL, SQLite, ClickHouse) and MongoDB commands; schema builders; a SQL tokenizer, parser, serializer and statement classifier.
A simple Storage library to manage application storage
04Security#
Who is calling and how often: password hashing, sessions, tokens, OAuth2 and passkeys, and abuse limits.
A simple abuse library to manage application usage limits
The password hash algorithms of utopia-php/auth: PECL scrypt, Firebase's modified scrypt and phpass.
05Observability#
Seeing what a service does: audit trails, telemetry, tracing spans and usage metrics.
A simple audit library to manage application users logs
Span tracing: attributes on the current span of each task, W3C trace context, and exporters to stdout, a terminal and Sentry.
A lite & fast telemetry library, with adapters for OpenTelemetry
Light and Fast Usage library
06Platform#
The ground a service runs on: CLIs and consoles, configuration, dependency injection and registries, system information, locks, pools, circuit breakers, events, and the PHP engine semantics the Rust crates share.
High-performance concurrent + parallel library with Promise and Parallel execution support for PHP.
Synchronous in-process event bus with typed events and listeners
Light & simple Circuit Breaker for PHP to prevent cascading failures in distributed systems.
A simple CLI library to manage command line applications
A simple Config library to managing application config variables
Console helpers for logging, prompting, and executing commands
A simple and lite library for managing dependency injections
A simple lock library to coordinate access to shared resources across coroutines, processes and hosts
PHP engine semantics (the value model, juggling and comparison, string, number, JSON, serialize, igbinary, sorting, filter and URL functions) for crates that must behave exactly like PHP.
Light and Fast Platform Library
A simple library to manage connection pools
A simple dependency management library for PHP
A simple library for obtaining information about the host's system.
07Utilities#
Focused helpers: input validation, translations, domain and email parsing, user-agent and device detection, OpenAPI documents, compression, load balancing and image processing.
Choosing between endpoints: options with state, filters, and the First, Last, Random and RoundRobin algorithms.
Compression algorithms (Brotli, Deflate, GZIP, LZ4, Snappy, XZ, Zstd) and Accept-Encoding negotiation, byte for byte as PHP's extensions.
Detects a project's packager, runtime, framework and rendering from its file names, languages and manifests.
Domain names split against the Public Suffix List.
Email addresses split, checked and made canonical per provider, and their domains classified as free or disposable.
Image previews: decode, crop by gravity or focal point, borders, rounded corners, opacity, rotation and background, then encode to JPEG, PNG, GIF, WebP or AVIF.
Translations: languages, default and fallback locales, and placeholders.
Framework-independent OpenAPI 2.0, 3.0, and 3.1 parser with an immutable canonical model
User-agent parsing: operating system, client, device and bot.
The checks of Utopia's request validators: booleans, integers, floats, numbers, ranges, ports, hex colors, text, identifiers, white lists, substrings, DNS labels, hostnames, domains, hosts, IP addresses, URLs, phone numbers, JSON, FCM service accounts, globstar patterns and the validators that compose others.
A simple library to probe, encode and package video for adaptive streaming
08Integrations#
Third-party services: AI agents, version control, orchestration, CDNs, messaging providers for email, SMS and push, and moving data between backends.
Provider-neutral LLM toolkit for PHP: agents with tools, structured output, streaming and embeddings
CDN cache purge and certificate provider abstractions for Utopia PHP
A simple, light and advanced PHP messaging library
A simple library to migrate resources between services.
Lite & fast micro PHP abstraction library for container orchestration
A simple library to integrate version control systems like GitHub, GitLab etc. to receive webhook events