Stack
Folders
Modules
Each module undersrc/Modules/ owns its routes, controllers, models and services:
Request pipeline
nginx passes every non-static request topublic/index.php, then through PSR-15 middleware in this order:
- Error handler — error pages and the application log, plus detailed traces when
APP_DEBUG=true. - Security headers.
- Session.
- Method override — HTML forms can send PUT and DELETE through a
_methodfield. - Authentication — loads the signed-in account and its role permissions.
- CSRF — every POST, PUT, PATCH and DELETE needs a valid token, except under
/api/. - Clockwork profiler — only when
APP_DEBUG=true.
/admin (with per-section permissions — see
Staff & permissions), a signed-in account for /account.
Events and hooks
The core dispatches four events —OrderCreated, ProductUpdated, CartItemAdded and CustomerRegistered —
through league/event; the core itself listens to ProductUpdated to keep the filter index current. Templates expose
hook positions (home.before_content, home.after_content) that modules and plugins fill with
HookRegistry::register(). Details in Write a plugin.
Templates
- Pages live in
src/App/Frontend/views/—page/,components/,layouts/,emails/anderrors/. The base layouts arelayouts/base/client.twigandlayouts/base/admin.twig. - Each module’s
Views/folder is available as a Twig namespace named after the module, for example@slider; so is each active plugin’s, for example@example_hello. - There’s no theme or override layer: customize the store by editing these templates and the SCSS.
- Useful Twig functions:
csrf_field(),method_field(),asset(),menu('header'),hook('…'),module_styles()/module_scripts(),admin_can('/admin/…').
Database
- PostgreSQL only. Search and the write layer depend on it.
- Writes go through
BaseRepositoryhelpers —insertRow(),updateRow(),insertAndGetId()— which convert booleans safely for PostgreSQL.make lint-writes(also part ofmake checkand CI) fails when a model writes another way. - Money is handled with brick/money, in a single currency, UAH.
- Search reads products directly and everything else from a materialized view,
search_index, which the worker refreshes within about a minute of a change. - Filters are served from precomputed facet tables (
product_facets,facet_settings), rebuilt per product on every change and in full by Rebuild ormake reindex-facets.