Lemonade Framework

A PSR-based PHP framework for web and CLI runtime.

A modular PHP 8.1+ foundation with PSR HTTP, PSR logging, a PSR-11 compatible container, routing, views, database layer, sessions, validation, uploads and CLI commands.

PSR-based runtimeShared bootstrap for web and CLIComponent foundation
bootstrap/app.php
$router->getNamed('home.index', '/', HomeController::class . '@index');
Runtime flow
RequestKernelProvidersRouterControllerResponse
Product showcase

What ships with Lemonade

Core capabilities

Built for PHP applications that need structure, not noise

PSR-based runtime

HTTP messages, middleware, factories, logging, HTTP client integration and the DI container follow PSR contracts where it makes sense.

Shared bootstrap for web and CLI

Web requests and CLI commands share the same configuration, provider model and container, with separate Kernel and CliKernel entrypoints.

Component foundation

Routing, views, database layer, sessions, validation, uploads, security, events, queues and documentation are organized as explicit framework components.

Documentation

Explore Lemonade

Choose the area you are working on and jump straight to the relevant guide or technical reference.

Guide

Getting Started

From configuration and the first route to a working page.

Documentation
Guide

Controllers & Responses

What `AbstractController` provides and when a shared application layer is useful.

Documentation
Guide

Routing

Named routes, parameters, and localization only where the URL strategy actually needs them.

Documentation
Guide

Middleware

Use middleware for shared HTTP concerns, attach it to routes or groups, and keep business logic out of it.

Documentation
Guide

Views & Layouts

How layouts, page views, shared data, and partials fit together.

Documentation
Guide

Services & Providers

Service registration, interface bindings, and explicit application composition.

Documentation
Guide

Configuration & Environment

The YAML manifest, typed configuration definitions, environment values, and the production config cache.

Documentation
Guide

Production & Deployment

Prepare environment values, let Lemonade use its production config cache, and deploy only the artifacts the runtime actually needs.

Documentation
Guide

Forms & POST Workflow

The common flow from a GET form through POST, CSRF, and validation to a redirect and follow-up GET.

Documentation
Guide

Validation

Validation schemas, one-time input validation, and reusable logic in a dedicated service.

Documentation
Guide

Database Migrations

Keep database schema changes clear, ordered, and recorded with the built-in migration system.

Documentation
Guide

API

Endpoints through API providers, a clear JSON contract, and access rules in `Api.yaml`.

Documentation
Guide

CLI

Commands, YAML registration, and handing longer work off to the queue.

Documentation
Guide

Infrastructure

Cache, sessions, uploads, filesystem, and HTTP clients without coupling the application to framework internals.

Documentation
Guide

Errors & Debugging

Error pages, kernel tests, and diagnostics through logs and QA commands.

Documentation
Guide

Events & Queue

In-process events, queued messages, and CLI workers.

Documentation
Guide

Discovery

Enable `robots.txt` and `sitemap.xml` only when the application actually needs them.

Documentation
Guide

Components

A component registry for metadata, breadcrumbs, pagination, and custom components.

Documentation
Reference

Reference

Lower-level notes on the application lifecycle and container.

Documentation