PHP reorganized, not reinvented v1.7.0-beta.20

Structure PHP.
Keep control.

PHPAML combines a readable autonomous MVC core with AML View, its optional declarative and reactive frontend for PHP.

0 global dependencies3 platforms1 command
v1.7.0-beta.20 · beta
01 / QUICK START
phpaml — zsh
$ aml create-view-app my-project
✓ AML View + Engine installed

$ cd my-project
$ aml doctor
✓ Diagnostics passed

$ aml serve
→ http://127.0.0.1:8910
PHP + Composer
included

See the real first-run experience

From a fresh folder
to a running app.

In 36 seconds: the autonomous CLI installs Framework, View and Engine, creates a declarative interface, and launches it locally. No voice, no hidden steps.

Download PHPAML
PHPAML · 36 SEC · NO VOICE
PHP 8.2+MVCDI containerPHP included
/ 01

An architecture you already understand

Enterprise discipline.
Without the weight.

An explicit request lifecycle, separated responsibilities, and stable folder conventions. You always know where to look.

01RequestHTTP input
02MiddlewareGlobal pipeline
03RouterRoute + params
04ControllerInjected action
05ResponseHTML or JSON
/ 02

Essential and complete

Everything you need.
Nothing hidden.

01

Clear MVC

Controllers, models, PHP views, and partials with no hidden magic.

02

HTTP routing

Dynamic parameters, named routes, and per-route middleware.

03

Native injection

A lightweight container automatically resolves typed dependencies.

04

AML View

Reactive state, effects, collections, themes, and client navigation in declarative PHP.

05

Practical security

CSRF, sessions, validation, escaping, and secure headers.

06

Autonomous tooling

Private PHP 8.4 and Composer runtimes, diagnostics, and updates.

/ 03

First project

From zero to your
first route.

AML installs its own environment. No PHP setup, no global Composer, and no system folders to manage.

Quick-start guide
phpaml — zsh
// routes/WebApp.php
final class WebApp extends Route
{
    protected function routes(): void
    {
        $this->get('/users/{id}', [UserController::class, 'show'])
            ->name('users.show');
    }
}
/ 04

The complete application platform

Five focused components.
One PHP workflow.

Start with only what you need, then combine independent components: Framework for HTTP and MVC, View for declarative UI, Engine for browser interactions, Data for persistence, and i18n for multilingual applications.

01

PHPAML Framework

Explicit HTTP routing, MVC, middleware, dependency injection, validation and security.

02

AML View

Declarative pages, reusable components, layouts, reactive state, computed properties and effects.

03

AML Engine

Client-side state, events, collections and navigation without a full page reload or handwritten JavaScript.

04

PHPAML Data

Typed entities, expressive queries, relations, migrations and transactions for SQL and MongoDB.

05

PHPAML i18n

JSON translation catalogs, parameters, pluralization, locale resolution and fallbacks.

VIEWReactiveCounter.php
phpaml — zsh
final class Counter extends Page
{
    #[State] public int $count = 0;

    public function body(): View
    {
        return VStack(
            Heading('AML View')->size(42),
            Text(StateRef::to('count', $this->count)),
            Button('Add one')->onClick(
                ClientAction::increment('count')
            )
        )->gap(16);
    }
}
DATAUserRepository.php
phpaml — zsh
$users = $db->users()
    ->where('active', '=', true)
    ->orderBy('name')
    ->limit(20)
    ->all();

$db->transaction(function ($db) use ($lesson) {
    $db->lessons()->add($lesson);
    $db->saveChanges();
});
ENGINESearchPage.php
phpaml — zsh
#[Effect(
    dependencies: ['query'],
    debounce: 300,
    concurrency: 'latest'
)]
protected function search(): EffectPlan
{
    return Effects::run(
        ClientAction::set('loading', true)
    );
}

Button('Account')->onClick(
    Navigate('/account')
);
/ 04

Built with classic PHPAML

See the framework.
Read the result.

The Last Lighthouse is a complete public demo built with PHPAML’s classic MVC architecture: routes, controller, model, PHP views, sessions, CSRF protection, redirects, and automated tests.

01Classic MVC02Protected reader03Session progress04Responsive UI
phpaml-book-reader-demo.onrender.com
PHPAML MVC DEMO

The Last Lighthouse

Chapter 1 · The island at dusk

Open the live demo
PHPAML / TUTOR CHESSAML VIEW
DEEPSEEK · TUTORA good move. Now ask what your opponent is threatening.
/ 05

Built with AML View + PHPAML Data

A reactive interface.
A real application.

Tutor Chess is the public reference project for AML View: client-side navigation, reactive state, themes, Stockfish analysis, DeepSeek coaching, MongoDB accounts, and persistent lesson history.

01AML View02Stockfish 1803DeepSeek tutor04MongoDB history
Run locally with AML

Ready to build?

Your next interface
starts with aml create-view-app.

Install PHPAML