Start simple. Ship fast. β
A working PHP app before the idea gets cold.
Start with routing and HTTP helpers, then add only what the product asks for. The project stays readable to you, your team, and your AI tools from the first file.
You begin with
Open http://localhost:5500. Your app is live.
The smallest useful Leaf app β
A lite project starts with enough structure to handle real requests without putting a framework ceremony between you and the product.
<?php
require __DIR__ . '/vendor/autoload.php';
app()->get('/', function () {
response()->json(['message' => 'Hello from Leaf']);
});
app()->run();Build with an assistant that knows the app β
This app was created with Leaf CLI, so .leaf/CONTEXT.md is already available as shared project memory. A local agent reads it alongside the filesystem and syncs useful changes back when it finishes. No context command is required.
If you are using an external assistant that cannot access the folder, print a compact project handoff:
leaf contextYour prompt
Local agent: shared context and filesystem access stay in sync. External assistant: paste the output of leaf context so it receives the compact project map.
AI sees
The goal is not more generated code. It is fewer invented patterns and changes that fit the application you already have.
Add capabilities when the product asks β
Leaf modules add focused features without replacing your starting point.
leaf install auth db mailOnce installed, modules use the same concise Leaf style:
auth()->login($credentials);
$user = db()
->select('users')
->where('email', $email)
->first();
mailer()
->to($user->email)
->send('welcome');Grow at your own pace β
You do not need to predict the final architecture on day one. Choose the amount of structure the product needs now.
All three stages stay inside Leaf, so growth does not require a framework rewrite.
Deploy anywhere PHP runs β
Leaf has no private runtime or hosting lock-in. Deploy to a VPS, shared hosting, containers, or a managed PHP platform using the same application you built locally.
When structure becomes useful
The same project can grow into Leaf MVC.Keep the ecosystem, add the application map.What to read next β
Choose the part of the stack your next feature needs.
