Skip to content
FREE AND OPEN SOURCE

The easiest way to build a real web app, by hand or with AI

Leaf gives you and your coding agent everything a real app needs: sign-in, payments, email and a database, ready when you need them. When it's built, it runs on hosting that costs a few dollars a month.

$ leaf create my-app
leaf coremodulesyour appauthdbbillingqueue

Sponsored by

Leaf is free and open source. These teams help keep it that way.

Ask your coding agent for a feature

The files land where they belong and still read cleanly next month.

routes/_bookings.php
1<?php
2
3app()->get('/bookings', 'BookingsController@index');
4app()->post('/bookings', 'BookingsController@store');
BookingsController.php
1class BookingsController extends Controller
2{
3 public function store()
4 {
5 $data = request()->validate([
6 'service' => 'string',
7 'time' => 'string',
8 ]);
9
10 $booking = Booking::create($data);
11
12 return response()->json($booking);
13 }
14}

Everything a product needs, nothing it doesn't

Every module has the same shape, so the whole app stays small enough to hold in your head, and in a context window.

Sign-in

Login, sign-up, roles and permissions. Pick sessions or tokens and the code barely changes.

Signed in as emma@example.comsession started

Database

Fluent queries that read like sentences. MySQL, Postgres, SQLite and more.

#customertotalstatus
104Emma Carter$18.98paid
107Kenji Sato$9.49paid
112Sofia Rossi$26.97paid

Payments

One-off charges and subscriptions, with the checkout wired up for you.

Studio Nala · deposit$20.00

Background jobs

Send receipts, resize images or sync data without making anyone wait.

SendReceipt · order 104done
ResizePhotos · 12 imagesdone
SyncInventory · nightlydone

Validation

Check what comes in with rules that read like plain English, and send back errors people can act on.

emma@examplemust be a valid email

A map for your agent

Every project keeps a short map your agent reads first, so its code lands where you'd have put it.

app/
  controllers/  BookingsController.php
  models/       Booking.php
  routes/       _bookings.php
What it costs

Small to build. Cheap to run.

A big framework costs you twice: in the agent credits it takes to work inside it, and in the server it needs to run. Leaf keeps both small.

Your agent builds with Leaf, not around it

Every project ships the rules and context your coding agent needs, so it reaches for Leaf's sign-in, database and mail modules instead of rewriting them, and spends your credits on your product.

AGENTS.mdBuild with Leaf's modules first$ leaf install auth$ leaf g:model Product$ leaf db:migrate

Runs on a few-dollar shared plan

Upload your app to any host that runs PHP 8.2. No SSH, no Composer on the server, and SQLite by default, so there is no database server to set up or pay for.

public_html/uploaded
/.envblocked
databaseSQLite, no server
Shared hosting guide

Light on the server

The same app, built by an agent on Leaf and on Laravel, on the same server. Leaf used less memory, answered more requests and uploaded half the files.

PHP memory per request
Leaf0.55 MB
Laravel0.87 MB

Measured December 2026: Leaf 5 and Laravel 13 running the same agent-built store API on Apache with PHP-FPM, 4 workers and a 128 MB limit. Lower is better.

Modules

Start small. Add the rest when you need it.

25+ first-party modules plug in the day your product asks for them.

All 25+ modules

What the agent touches

reads .leaf/CONTEXT.md
reads app/routes/*.php
writes app/routes/_webhooks.php
writes app/controllers/WebhooksController.php
syncs .leaf/CONTEXT.md
terminal
1leaf context
2
3// prints the app map for your assistant:
4// app type, modules, routes, models

One command. A working app.

Sign-in, a database and CORS are set up before you open your editor. No config files to learn first.

$ leaf create my-product
  ✓ Project scaffolded
  ✓ Auth, DB, CORS configured
  ✓ Shared agent context ready
  → http://localhost:5500

Same backend, any frontend

React, Vue, Svelte or Blade. Your agent reads the same map either way.

ReactVue
SvelteBlade

Build whatever you want, by hand or with your agent.

Leaf stays small, so it never pushes you toward the same app twice. Here are some of the products people run on it, plus templates you can start from today.

Seev PlusSeev Plus
SkedaddleSkedaddle
FridayFriday
CraftlyCraftly
AlchemyAlchemy
Afro Asia MediaAfro Asia Media
Field Notes blog templateTemplateField Notes blog
Selll productsSelll products
Studio Nala bookings templateTemplateStudio Nala bookings
BitcartBitcart
KataKata
AgedStoneAgedStone
Surveyr submissionsSurveyr submissions
SelllSelll
Selll customersSelll customers

People are shipping real things with it

Releases drop in the Discord first. Come show what you're shipping.

810K+installs
1.3kGitHub stars
“This is my first experience with PHP, I tried Leaf 5 out in the alpha with Claude code, and was genuinely impressed. I got my entire school project complete in a matter of minutes, especially the billing part.”
Selasi Bansa@sdotb · Leaf 5 alpha
“Building with Leaf has been the most simple and straightforward approach to getting an app production ready”
Desmond Sofua@cr34t1ve
“Leaf has been a great choice for us as it allows us to build our APIs really fast, giving us time to focus on what we want: the design and experience of our projects.”
Rare Goods Only@raregoodsonly
“It gives the essentials to start building right away, with the flexibility to add exactly the features you need, precisely when you need them.”
Andrew MacLean@andrewdmaclean
“I just don't "get" the major frameworks and to me I want something simple which I can add to if needed and now I come across Leaf. Wow.”
jamie-syon@jamie-syon
“Clean, well organized and the MVC versión is just great!!!”
Carlos Cárdenas@carlos_cardenas1
Shipped something with Leaf? Show us in the Discord

Get notes on Leaf 5, AI-native PHP, and product-building in your inbox. You can also read our blog posts at blog.leafphp.dev. You may also go social at Twitter, join our discussions, or watch our videos on YouTube.

So, what are you building?

Start in minutes, build it with your agent or by hand, and put it online on hosting you can afford.