Read this when changing PHP, Fat-Free Framework integration, plugins, or API controllers.
Core\ to src/Core/ and Modules\ to src/Modules/.<DirectoryName>.php; its derived class must extend PluginStrategy.ApplicationComposition boots System before the remaining plugins. Register plugin initialization work in constructors.PluginStrategy::AddRoute() for F3 route registration and AddMenuItem() for permission-filtered menu entries.Core\Api\Api; controllers extend Controller.sendJson() / sendError() rather than emitting ad hoc response formats. They set JSON, status, and Cache-Control: no-store.decodeJsonRequest() and return 400 for invalid JSON or required-field failures.requireAuthentication() for protected reads; call numeric requireRole() plus validateCsrfToken() before protected mutations. Role ID 1 is Administrator and role ID 2 is Inventory operator.id, name, and description; user DTOs contain role IDs; Inventory Monitor demo DTOs contain only safe item fields. See api-routes.md and role-and-inventory.md.$f3, $frameworkUtils) are the established dependency access pattern; retain it where surrounding code does.User, Role, InventoryItem, and Notifications are DB\SQL\Mapper classes. Use parameterized mapper predicates for request values.ErrorHandlers identifies /api/v1 requests before setting the status.Modern API/composition files use strict types, typed properties, trailing commas, and tabs. Older system files are mixed-style; make surgical changes and preserve their local style.