FW Framework: Built by AI, for AI
Welcome to the FW Ecosystem. This isn't just another PHP framework; it's a high-performance, async-first substrate designed for autonomous agents and performance-obsessed developers.
The Ecosystem Repositories
FW is distributed across specialized repositories to maintain an ultra-lean footprint:
- framework: The heart. A stateless, zero-dependency engine (stateless by default, opt-in state).
- cli: The brain. A compile-time powerhouse that eliminates runtime reflection by pre-building your container and routes.
- app-skeleton: The workspace. Where your AI agents live and breathe.
Why "AI-First"?
- Declarative Architecture: Define your APIs in YAML. The framework generates the strict PHP 8.3 typing for you. Agents excel at YAML; FW lets them control the entire stack without touching boilerplate.
- Compile-Time Strictness: We target Psalm Level 1. By moving complexity to the build step, we ensure that agents (and humans) receive immediate, deterministic feedback on their changes.
- Sub-Millisecond Latency: Built on Swoole, FW is designed to be the fastest way to serve AI-driven logic.
Getting Started
Scaffold a New Application FW provides a complete application skeleton via Composer.
bashcomposer create-project jinomial/fw-app-skeleton my-new-app cd my-new-app cp .env.example .envDefine your API (
api/hello.yaml)yamlapiVersion: fw/v1 entity: Greeting endpoints: - method: GET path: /hello action: index response: JsonResourceBuild & Fly
bash# Build the world (API, Database, Container) and start the server ./bin/dev.shFW will parse your YAML, scaffold the handlers, compile the DI container, and start the Swoole worker.
Iterate The skeleton is designed for rapid evolution. Update your YAML, and FW re-generates the necessary infrastructure.