Chapter 3 of 15

Project structure.

Application code, configuration, and runtime data each have a clear home.

Important directories

Put application code and configuration in app/, and the HTTP entry point and public assets in public/. Cache and other writable data belong in storage/; Composer manages the packages under vendor/.

Project tree
app/
├── Config/          # YAML configuration and Routing.php
├── Controllers/     # HTTP actions
├── Language/        # translation catalogs
├── Providers/       # application service bindings
└── Views/           # layouts, pages and partials
public/index.php      # HTTP entry point
storage/              # cache, logs and sessions
vendor/bin/lemonade   # CLI entry point

Expose only public/ through the web server. app/, storage/, and vendor/ should not be directly reachable over HTTP.

The request flow

The kernel loads HTTP configuration definitions, opens a Request scope, and binds the current request there. Bootstrap registers providers and routes. Global middleware runs before route matching; route middleware wraps the controller action. The action result is normalized into a PSR-7 response.

Detailed technical documentation on GitHub