drago-ex / project-backend
Preconfigured basic backend module for the basic Drago Project.
Package info
github.com/drago-ex/project-backend
Type:drago-tools-resource
pkg:composer/drago-ex/project-backend
Requires
- php: >=8.3 <9
- drago-ex/application: ^5.0
- drago-ex/permission: ^2.0
- drago-ex/project-front: ^3.0
- drago-ex/translator: ^4.0.1
Requires (Dev)
- drago-ex/project-tools: ^1.0
- nette/tester: ^2.5
- phpstan/phpstan-nette: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
The administration module of Drago Project: the Backend presenters under /admin, a basic layout, the
dashboard page and the admin.js/admin.scss entry point. Feature packages add their pages to it.
Requirements
- PHP >= 8.3, < 9
- Drago Project
Installation
composer require drago-ex/project-backend
Project Tools copies the files of the package into the project,
where you adapt them. It adds the entry point assets/admin.js + admin.scss, so build the assets again
(npm run vite:build).
Usage
The route [<lang>/]admin/<presenter>/<action> is added by Backend/8.conf.neon; the dashboard is
:Backend:Admin:default. Presenters of the module extend App\Presentation\Backend\BackendPresenter.
For the administration layout with a sidebar menu, sign-in and the user menu, add Backend UI.
Permissions
Every presenter is checked by the ACL. The rules are in Backend/Admin/acl.neon: the resource Backend:Admin,
open to everyone, so the bare module works without sign-in. Project Auth
replaces the file and leaves the administration to the administrator; a guest then goes to its sign-in page.
The same file describes the privileges (permissionLabels) for the permissions page of Project Permission.