PHPAML PLATFORM

Five components. One PHP workflow.

Framework, View, Engine, Data, and i18n remain independently usable. Combine only the capabilities your application needs instead of adopting the whole platform.

01

PHPAML Framework

HTTP, routing, MVC, middleware, injection, validation, and security with an explicit request lifecycle.

02

AML View

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

03

AML Engine

Events, collections, and client navigation without full reloads or handwritten JavaScript.

04

PHPAML Data

Typed entities, queries, relations, migrations, and SQL or MongoDB transactions.

05

PHPAML i18n

JSON catalogs, parameters, plurals, locale resolution, and fallbacks.

FRAMEWORKMovieRoute.php
phpaml — zsh
final class MovieRoute extends Route
{
    protected string $prefix = '/api/v1';

    protected function routes(): void
    {
        $this->get('/movies', [MovieController::class, 'index']);
        $this->get('/movies/{id}', [MovieController::class, 'show']);
    }
}
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);
    }
}
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')
);
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();
});
I18Nnavigation.json
phpaml — zsh
aml install i18n
aml i18n:add fr

// src/locales/fr/navigation.json
{
  "account": "Mon compte",
  "lessons": "Mes leçons"
}

Text(__('navigation.account'));