Skip to content

FW Frontend Philosophy: API-First, Agent-Driven ​

FW is fundamentally an API-first framework. However, the modern web requires more than just JSON. To support SEO, high-performance initial loads, and AI agents that need to "see" and "render" UI, FW provides a Compiled View Engine.

The "Compiled Shell" Approach ​

Traditional PHP frameworks (Laravel, Symfony) use runtime template engines (Blade, Twig, Smarty). These engines perform filesystem lookups, parsing, and compilation on every request (or use a runtime cache).

FW differs by moving all view logic to the build step.

  1. Zero Runtime Filesystem Lookups: All views are compiled into static-like PHP string buffers or lightweight objects during the php fw build process.
  2. Sub-Millisecond Rendering: Because the HTML is already "mostly rendered" at build time, FW can serve a full HTML shell as fast as a JSON response.
  3. No Dynamic Logic in Templates: We discourage complex logic in views. Views are "Shells." Dynamic data should be hydrated via the API or passed as simple variables.

AI-First UI Generation ​

Autonomous agents excel at structural generation. By using declarative YAML, an agent can:

  1. Define a new UI component shell.
  2. Link it to an API endpoint.
  3. Generate the necessary DTOs and Handlers.

FW serves as the "Nervous System" that translates agent-generated concepts into high-performance web reality.

Comparison: FW vs traditional Monoliths ​

FeatureFW (API-First + Shells)Traditional Monolith (Blade/Twig)
ParsingDone once at Build TimeDone at Runtime (with caching)
LogicDecoupled (Handlers/DTOs)Often mixed in Templates
SEOFast Static ShellsSSR (can be slow)
Agent ControlHigh (YAML-driven)Low (Template-logic driven)
Latency< 1ms10ms - 100ms

Flash: "The frontend of the future belongs to the agents. We give them the fastest tools to build it."

Engineered for Agents. Released under the MIT License.