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.
