Build something real
Turn your idea into a real product
Leaf gives you everything you need to go from idea → working app → real users, with no lengthy configuration or assembly along the way.
leaf create my-app --mvc
cd my-app
leaf serveInstead of a blank folder, you get a product foundation from day one.
Start with a real app, not a blank page
Out of the box, you can build:
- 🔐 User accounts (login, signup, sessions)
- 🧑💼 Dashboards and admin panels
- 🗄 Data-driven apps (with database + ORM)
- 💳 Payments, subscriptions, billing
- 🌐 APIs for mobile or frontend apps
There's no wiring tools together or figuring out what goes where.
Your app is ready for AI
Leaf MVC uses .leaf/CONTEXT.md as shared project memory for agents. An agent opened in the project reads that context alongside predictable routes, controllers, models, views, configuration, and modules, then syncs useful changes back. There is no AI setup step or context command required.
Tell AI what you want. It builds it
Open your agent in the project and tell it:
“Build a SaaS dashboard with teams and billing”
“Add Stripe subscriptions”
“Create an admin panel”
Leaf MVC gives the agent everything it needs to understand your app, so you can skip the long prompts and the guessing.
Using an external assistant without project access? Run leaf context and paste its compact output into the conversation.
Project Structure
For clarity and convention, Leaf organizes your app into a simple structure that follows the MVC pattern:
- easy to navigate
- easy for teams
- easy for AI
├───app
│ ├── controllers
│ ├── database
│ ├── models
│ ├── routes
│ └── views
└───publicReady for real users
Leaf apps are production ready and run anywhere PHP can, Heroku, Fly.io, DigitalOcean, or any shared hosting service.
What to read next
Now that you have a product shipped, here's what you need to scale it:
Routing
Learn more about routing in Leaf, dynamic routes, middleware and more.
Using Controllers
Controllers are the 'C' in MVC, and separate your logic from your views.
Using Models
Models are the 'M' in MVC, and let you interact with your database programmatically.
Frontend
Learn about SSR, SPA, and how to use Leaf with your favorite frontend framework.
