Skip to content

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"?

  1. 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.
  2. 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.
  3. Sub-Millisecond Latency: Built on Swoole, FW is designed to be the fastest way to serve AI-driven logic.

Getting Started

  1. Scaffold a New Application FW provides a complete application skeleton via Composer.

    bash
    composer create-project jinomial/fw-app-skeleton my-new-app
    cd my-new-app
    cp .env.example .env
  2. Define your API (api/hello.yaml)

    yaml
    apiVersion: fw/v1
    entity: Greeting
    endpoints:
      - method: GET
        path: /hello
        action: index
        response: JsonResource
  3. Build & Fly

    bash
    # Build the world (API, Database, Container) and start the server
    ./bin/dev.sh

    FW will parse your YAML, scaffold the handlers, compile the DI container, and start the Swoole worker.

  4. Iterate The skeleton is designed for rapid evolution. Update your YAML, and FW re-generates the necessary infrastructure.

Engineered for Agents. Released under the MIT License.