Choose a Target
PAM keeps PHP in memory, and that foundation powers several kinds of applications: HTTP APIs and web apps, Laravel, native mobile apps and native desktop apps. They share the same pam command and the same PHP 8.5 runtime, but each target has its own template, its own development loop and its own maturity.
Pick a target by what you need to ship, then check its current boundary in the table below before you commit to it.
At a Glance
Section titled “At a Glance”| You want to build | Create it with | Then run | Current boundary |
|---|---|---|---|
| A minimal service on the bare runtime | pam init my-service --template raw |
pam dev index.php |
Linux x86_64/ARM64 and macOS hosts. |
| A JSON API | pam init my-api --template api |
pam dev index.php |
Nimbus 0.7 on the server runtime. |
| A web app with login | pam init my-app --template web |
pam bin/migrate, then pam dev index.php |
Nimbus views, sessions and authentication. |
| A Laravel application | pam init my-app --template laravel |
pam dev pam.php |
Laravel 13 skeleton; one request per worker. |
| Real-time features | Add --socket to api (or laravel) |
as above | Native WebSocket transport on the same listener. |
| A native mobile app | pam init my-app --template native-ui |
pam dev |
Android API 26–36; iOS through a generated UIKit host. |
| A desktop app | pam init my-app --template desktop |
pam desktop dev |
Linux is the reference; macOS and Windows are still being validated. |
| Server, mobile and desktop together | pam init my-product --template product |
see its README.md |
One workspace with a shared contracts package. |
Run pam or pam new without arguments for a guided choice. In scripts, --no-interaction falls back to the API template when you omit --template.
Server Runtime
Section titled “Server Runtime”Choose the server runtime when you want a persistent HTTP service: APIs, streaming responses and Server-Sent Events, WebSockets, background tasks and high-throughput I/O, all in PHP and Composer. You have three starting points:
rawgives you oneindex.phpand the HTTP Server contract, with no framework and no Composer dependencies. Good for small services and for learning how PAM works.apigives you Nimbus: routing, controllers, validation, resources, the Arcano ORM and in-memory tests. This is the recommended start for most services.--template httpis an alias.webextends the API layout with server-rendered views, sessions, translations, a SQLite database and complete login, registration and password-reset screens.
pam init my-api --template api --socketcd my-apipam dev index.phpServer hosts are Linux and macOS. On Windows, use WSL 2. See Installation and Compatibility.
Laravel
Section titled “Laravel”Choose Laravel when you want the Laravel application model and its ecosystem. The template creates a regular Laravel 13 skeleton plus a pam.php entry point. PAM boots the framework once per worker and gives each request an isolated application sandbox. Because Laravel’s managers and facades are process-global, each worker runs one request at a time; you scale with more workers (pam start pam.php --workers 8).
pam init my-app --template laravelcd my-apppam dev pam.phpIf you already use Laravel Octane, PAM can also be its server. The Laravel section covers both paths.
PAM Native
Section titled “PAM Native”Choose PAM Native when you want a mobile app with real platform controls while application state and composition stay in PHP. It is not a WebView and it does not embed a JavaScript runtime.
pam init my-app --template native-ui --platform allcd my-apppam devnative-ui starts from the official component library; native starts from the lower-level core. Useful options are --platform android|ios|android-tv|all, --starter blank|tabs|auth|ecommerce|chat|showcase, --name and --application-id. Change targets later with pam add target ios or pam remove target android-tv.
Start with the PAM Native overview.
PAM Desktop
Section titled “PAM Desktop”Choose PAM Desktop to write desktop applications in PHP. Components, state and styles are rendered by a Rust host into real platform views: GTK 4 on Linux, AppKit on macOS and Win32 with Direct2D on Windows. There is no Electron and no web view in the rendering path.
pam init my-app --template desktopcd my-apppam composer installpam desktop initpam desktop devLinux is the reference backend. macOS has been run in a virtual machine, and the Windows backend has not yet run on real hardware. Check the Desktop overview for the current status of each platform before you plan a release.
Product Workspaces
Section titled “Product Workspaces”The product template creates one workspace with three independently runnable applications (server, native and desktop) and a local packages/contracts package that all three share:
my-product/├── apps/├── packages/├── pam.json└── README.mdUse it when the same domain types must flow through an API, a mobile app and a desktop app. Its README.md lists the commands for each application.
Next Steps
Section titled “Next Steps”- Your First Application: build and test an API end to end.
- Directory Structure: what each server template creates.
- Capability Catalog: official packages for maps, authentication, payments, media and more.