johnnyxlemonade / admin-platform
Reusable Lemonade administration and module platform.
Requires
- php: >=8.3
- ext-fileinfo: *
- ext-mbstring: *
- ext-openssl: *
- ext-pdo: *
- firebase/php-jwt: ^7.2
- guzzlehttp/guzzle: ^7.10
- johnnyxlemonade/admin-image: dev-main
- johnnyxlemonade/cms-core: dev-main
- johnnyxlemonade/framework: dev-main
- league/oauth2-client: ^2.9
- nyholm/psr7: ^1.8
- psr/http-client: ^1.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.3
- phpstan/phpstan-strict-rules: ^2.1
- phpunit/phpunit: ^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-28 11:00:23 UTC
README
johnnyxlemonade/admin-platform provides the reusable, server-rendered administration runtime for Lemonade applications. It includes authentication, authorization, Composer module discovery, navigation, DataGrid, AdminEditor, dashboard widgets, audit logging, notifications, file handling, and shared browser components.
Built-in modules
Composer metadata declares the built-in System modules. A module present in the Composer installation is available at runtime; its routes and actions continue to enforce their own permissions.
| Module | Identifier | Capability |
|---|---|---|
| Audit | system.audit |
Readonly audit history |
| Languages | system.languages |
Administration languages and default locale |
| Media | system.media |
Readonly shared-file catalog |
| Modules | system.modules |
Readonly Composer module overview |
| Notifications | system.notifications |
Admin notifications and recipient state |
| Roles | system.roles |
Roles and permission sets |
| Translations | system.translations |
Runtime translation overrides |
| Users | system.users |
Accounts, role assignment, and permission overrides |
Dashboard is platform infrastructure rather than an AdminModuleDefinition. Modules and host packages register their widgets in the shared dashboard registry.
Requirements
- PHP 8.3 or newer; CI verifies PHP 8.3, 8.4, 8.5, and 8.6
- PHP extensions
fileinfo,mbstring,openssl, andPDO johnnyxlemonade/framework
Installation
composer require johnnyxlemonade/admin-platform
Register Lemonade\Admin\AdminPackageServiceProvider in the host application. The host also provides its Admin base path, branding, and asset configuration, then runs its normal migration and permission-sync deployment flow. Composer metadata discovers module manifests; no separate module list or enabled state is required.
Publish a prebuilt Admin asset distribution into the host public root with:
php vendor/bin/lemonade admin:assets:publish
See Admin assets for the build and publishing contract.
Adding a module
An external Composer package declares its manifest in extra.lemonade.modules. Its runtime provider registers the capabilities it owns, such as pages, DataGrid, AdminEditor, actions, permissions, translations, migrations, or dashboard widgets.
Composer availability activates the module. Adding a package requires the host's controlled migration and permission-sync steps; removing it stops runtime registration without deleting its stored data.
Package boundaries
johnnyxlemonade/frameworkowns the base application runtime and infrastructure contracts.johnnyxlemonade/cms-coreowns public CMS routing and shared content contracts.johnnyxlemonade/admin-imageowns image delivery and image variants.- Admin Platform owns Admin transport, shared presentation, authorization, audit, and file-management UI.
- Host applications own composition, branding, and public rendering.
Documentation
- Admin assets — package build output and host publishing
- AdminEditor — editor definitions, validation, and locks
- Admin request flow — HTML pages, JSON endpoints, and modal transport
- DataGrid — query contract, rows, and actions
- Identity — local and OIDC authentication
- Migrations — global migration registration
- Modules — Composer discovery and runtime registration
- Permissions — permission catalog, assignments, and enforcement
- Self-service user profile — current-user profile functionality
Development and QA
Build Admin assets after changing JavaScript or SCSS:
npm ci npm run build
Run the package checks with:
composer qa