myproject/
├── .github/ # CI workflows
├── assets/ # public static assets (css/js/images)
├── docs/ # documentation (this folder)
├── lf-app/ # application code — controllers, models, pipelines, filters, ...
├── lf-boot/ # bootstrap files run on every request/command
├── lf-cache/ # framework/app cache
├── lf-config/ # config files (app, database, mail, redis, queue, auth, ...)
├── lf-hooks/ # hook definitions (Hook::add / apply)
├── lf-inc/ # shared includes, constants
├── lf-lang/ # language/translation files
├── lf-logs/ # log output
├── lf-routes/ # route definition files, auto-loaded
├── lf-storage/ # app-generated storage (secret key, queue JSON files, ...)
├── template/ # Twig view templates + public template assets
├── uploads/ # user-uploaded files
├── vendor/ # Composer dependencies
├── .gitignore
├── .htaccess # Apache rewrite rules
├── composer.json
├── composer.lock
├── index.php # web entry point
├── laika # CLI executable (generated by laika-cli)
├── worker # queue worker executable (generated by laika-queue, if installed)
├── LICENSE
├── nginx.conf # sample nginx server config
└── README.md
lf-app/ — application codeThe bulk of your code lives here, organized by responsibility. Every subdirectory maps to a PSR-4 namespace under App\:
| Directory | Namespace | Contains |
|---|---|---|
Controller/ |
App\Controller |
Route handlers |
Model/ |
App\Model |
Laika\Model\Model subclasses (query builder) |
Schema/ |
App\Schema |
Table definitions (Laika\Model\Contract\SchemaAbstract), run via php laika app:migrate |
Pipeline/ |
App\Pipeline |
Pre-controller middleware |
Filter/ |
App\Filter |
Post-controller middleware |
Relay/ |
App\Relay |
RelayProvider classes — register app-level services into the container |
Service/ |
App\Service |
Relay static proxy classes — the facades your app code calls |
All of these are scaffoldable with the CLI — see CLI Reference.
lf-boot/app.php — the framework’s bootstrap sequence (constants, autoloader, function/hook loading). Runs before every request and every CLI command. Not meant to be edited.lf-config/ — one file per config domain, each returning a plain PHP array. See Configuration.lf-hooks/ — plain PHP files auto-loaded on boot; register hook callbacks here with add_hook(). See Hooks.lf-routes/ — plain PHP files auto-loaded on boot; call Url::get()/Url::post()/etc. at the top level. See Routing.lf-storage/ — framework/package-managed runtime storage: the app secret key (lf-storage/keys/app.key), the JSON queue driver’s files (lf-storage/queues/), and similar generated state. Not meant to be version-controlled.template/ — Twig templates rendered via Laika\Core\App\Template, plus assets/ for that template’s own CSS/JS/images and loader.php for asset-enqueue hooks. See Templates.index.php — the single web entry point; loads lf-boot/app.php then calls Url::dispatch().laika — the CLI executable (php laika <command>), generated automatically by laikait/laika-cli when Composer builds the autoloader.worker — the queue worker executable (php worker <queue>), generated the same way by laikait/laika-queue, if installed..htaccess / nginx.conf — rewrite rules routing all requests through index.php. See Deployment.