PHPackages                             drago-ex/project-backend-ui - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. drago-ex/project-backend-ui

ActiveProject[Admin Panels](/categories/admin)

drago-ex/project-backend-ui
===========================

Integration of a basic template for administration.

v2.0.4(1w ago)049↑512.2%LattePHP &gt;=8.3 &lt;9CI passing

Since May 30Pushed 6d agoCompare

[ Source](https://github.com/drago-ex/project-backend-ui)[ Packagist](https://packagist.org/packages/drago-ex/project-backend-ui)[ RSS](/packages/drago-ex-project-backend-ui/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (6)Versions (6)Used By (0)

Drago Project Backend UI
========================

[](#drago-project-backend-ui)

Integration of a basic template for administration.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://github.com/drago-ex/project-backend-ui/blob/main/license)[![PHP version](https://camo.githubusercontent.com/7c1667d6464bed4c9d6ffb46a756fbc234dc28d8348e780a4f6f3826bc2f01bb/68747470733a2f2f62616467652e667572792e696f2f70682f647261676f2d657825324670726f6a6563742d6261636b656e642d75692e737667)](https://badge.fury.io/ph/drago-ex%2Fproject-backend-ui)[![Coding Style](https://github.com/drago-ex/project-backend-ui/actions/workflows/coding-style.yml/badge.svg)](https://github.com/drago-ex/project-backend-ui/actions/workflows/coding-style.yml)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Nette Framework
- Composer
- Bootstrap
- Naja
- Node.js
- Drago Project core packages

Installation
------------

[](#installation)

```
composer require drago-ex/project-backend-ui
```

Project files
-------------

[](#project-files)

File copying is handled automatically by [drago-ex/project-tools](https://github.com/drago-ex/project-tools), which must be installed in your project. Without it, copy the files manually according to the `copy` section in this package's `composer.json`. To skip this package, set `"skip": true` under `extra.drago-project.packages.` in your root `composer.json`.

> ⚠️ This package uses the `replace` section, which means some files will be **overwritten if they already exist**. Avoid manual edits to those files — use the `skip` option if you need to manage them yourself.

Install npm
-----------

[](#install-npm)

```
npm install sidebar-skeleton-compostrap sidebar-menu-compostrap dashboard-skeleton-compostrap perfect-scrollbar
```

This package is based on [Dashboard Skeleton](https://github.com/compostrap/dashboard-skeleton).

Use admin-theme.js
------------------

[](#use-admin-themejs)

```
import { initAdminTheme } from "admin-theme.js";
document.addEventListener("DOMContentLoaded", () => {
	initAdminTheme();
});
```

Creating a Menu
---------------

[](#creating-a-menu)

The menu is typically created in a base presenter for the administration (e.g., `BackendPresenter`).

```
private function getSidebarMenuStructure(): array
{
	$builder = new SidebarBuilder;

	// Sections are optional and serve as titles/separators
	$builder->addSection('System')
		// Simple link with icon
		->addItem('Dashboard', 'Admin:')
		->setIcon('fa-solid fa-mug-hot bell')

		// Complex item with permissions and submenu
		->addItem('Permissions', 'AccessControl:*')
		->setIcon('fa-solid fa-gear bell')
		->setAllowAny('Backend:AccessControl', 'roles-read', 'users-read')
		->addSubItem('Roles', 'AccessControl:roles', ['Backend:AccessControl', 'roles-read'])
		->addSubItem('Users', 'AccessControl:users', ['Backend:AccessControl', 'users-read']);

	return $builder->build();
}
```

Then pass it to the template in `beforeRender`:

```
protected function beforeRender(): void
{
	parent::beforeRender();
	$this->template->sidebarMenu = $this->getSidebarMenuStructure();
}
```

Menu Composition Guide
----------------------

[](#menu-composition-guide)

- **addSection(string $title)** - (Optional) Creates a new group of items with a visible header (title). Use this when you want to visually separate different parts of the menu. If skipped, items will be grouped together without a title.
- **addItem(string $title, string $link)** - Adds a primary link to the sidebar. If you only use this method, it renders as a direct link. If followed by `addSubItem`, it automatically becomes a dropdown toggle for the submenu.
- **setIcon(string $icon)** - Attaches a FontAwesome icon (e.g., `fa-solid fa-user`) to the last added primary item.
- **addSubItem(string $title, string $link, ?array $allow = null)** - Adds a child link to the last added primary item, automatically turning it into a submenu.

Integration with project-permission
-----------------------------------

[](#integration-with-project-permission)

If you are using the [project-permission](https://github.com/drago-ex/project-permission) package, the menu automatically handles visibility based on user privileges.

- **setAllowAny(resource, ...privileges)** - The main item is displayed if the user has **at least one** of the specified privileges for the given resource.
- **addSubItem(..., \[resource, privilege\])** - The sub-item is displayed only if the user has the **exact** privilege for the given resource.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance98

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

8d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5998929?v=4)[Zdeněk Papučík](/maintainers/accgit)[@accgit](https://github.com/accgit)

---

Top Contributors

[![accgit](https://avatars.githubusercontent.com/u/5998929?v=4)](https://github.com/accgit "accgit (54 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/drago-ex-project-backend-ui/health.svg)

```
[![Health](https://phpackages.com/badges/drago-ex-project-backend-ui/health.svg)](https://phpackages.com/packages/drago-ex-project-backend-ui)
```

###  Alternatives

[leung/laravel-adminer

adminer for laravel5.\*

169.0k](/packages/leung-laravel-adminer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
