Action-based
Every route maps to a single action class with a tiny contract: middlewares() and main(). No controllers, no guessing.
A minimal, plain-PHP framework built from scratch. Action-based routing, PHP-native views, and zero magic — full control over your codebase.
git clone <your-repo-url> lunaris && cd lunaris
composer install
php lunar key:generate
Lunaris is small enough to read in a weekend and complete enough to ship a real application.
Every route maps to a single action class with a tiny contract: middlewares() and main(). No controllers, no guessing.
No auto-wiring, no service discovery, no compiled templates. Plain new, static facades, and native PHP all the way down.
An output-buffering engine with layouts, sections, partials and components — but the template is still just a PHP file.
CSRF middleware, bcrypt hashing, AES-256-GCM encryption, hardened session cookies and validated hosts come built in.
Guard any action with an ordered middleware pipeline. Short-circuit requests, inspect the raw request, pass it on.
The lunar console boots env, config and logging — register your own commands in routes/console.php.
Understand the whole framework by following one request through the system.
public/index.php
└─> Bootstrap::configure()
└─> Container::loadRoutes()
└─> Route::dispatch()
└─> Route::executeHandler()
└─> Middleware pipeline
└─> Action->main($params)
└─> Echoed to the client
Each phase is a short, readable class you can open and modify.
Any Throwable thrown along the way is caught once, mapped to
404 / 403 / 500, and rendered through your configured error view.
Clone the repository, generate your app key, and render your first action in under two minutes.