PHPackages                             tobento/app-backend - 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. tobento/app-backend

ActiveLibrary

tobento/app-backend
===================

App backend.

2.0.2(3mo ago)07MITPHPPHP &gt;=8.4

Since Jun 4Pushed 3mo agoCompare

[ Source](https://github.com/tobento-ch/app-backend)[ Packagist](https://packagist.org/packages/tobento/app-backend)[ Docs](https://www.tobento.ch)[ RSS](/packages/tobento-app-backend/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (8)Dependencies (14)Versions (10)Used By (0)

App Backend
===========

[](#app-backend)

The App Backend is a minimal admin panel using the following main app bundles:

- [Apps](https://github.com/tobento-ch/apps) to run the backend in its own application
- [App User Web](https://github.com/tobento-ch/app-user-web) for authentication
- [App Crud](https://github.com/tobento-ch/app-crud) for users and roles CRUD operations
- [App Media](https://github.com/tobento-ch/app-media) to support media
- [App Search](https://github.com/tobento-ch/app-search) to search apps content
- [App Card](https://github.com/tobento-ch/app-card) to display cards on dashboard

Table of Contents
-----------------

[](#table-of-contents)

- [Getting Started](#getting-started)
    - [Requirements](#requirements)
- [Documentation](#documentation)
    - [App](#app)
    - [Backend Boot](#backend-boot)
    - [Adding Boots](#adding-boots)
    - [Adding Dashboard Cards](#adding-dashboard-cards)
    - [Adding Searchables](#adding-searchables)
    - [Customization](#customization)
        - [Customize Via App](#customize-via-app)
        - [Customize Via App Config](#customize-via-app-config)
    - [Testing](#testing)
- [Credits](#credits)

---

Getting Started
===============

[](#getting-started)

Add the latest version of the app backend project running this command.

```
composer require tobento/app-backend

```

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

[](#requirements)

- PHP 8.4 or greater

Documentation
=============

[](#documentation)

App
---

[](#app)

Check out the [**App Skeleton**](https://github.com/tobento-ch/app-skeleton) if you are using the skeleton.

You may also check out the [**App**](https://github.com/tobento-ch/app) to learn more about the app in general.

Backend Boot
------------

[](#backend-boot)

The backend boot is extended :

```
use Tobento\App\AppFactory;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots
$app->boot(\Tobento\App\Backend\Boot\Backend::class);

// Run the app
$app->run();
```

Once booted, you can access the backend by the following URL `http://localhost/{project}/public/admin/`.

You may change the `backend` slug `admin` or even route to another domain in the `app/config/apps.php` file.

Adding Boots
------------

[](#adding-boots)

There are two ways to add backend boots:

**Via App Config**

In the `apps/backend/config/app.php` file you can add more boots.

```
'boots' => [
    // ...
    SomeBoot::class,
],
```

**Via Backend Boot**

```
use Tobento\App\Boot;
use Tobento\App\Backend\Boot\Backend;

class BackendBoots extends Boot
{
    public const BOOT = [
        Backend::class,
    ];

    public function boot(Backend $backend): void
    {
        $backend->addBoot(SomeBoot::class);
    }
}
```

Register your boot:

```
use Tobento\App\AppFactory;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots
$app->boot(\Tobento\App\Backend\Boot\Backend::class);
$app->boot(BackendBoots::class);

// Run the app
$app->run();
```

Adding Dashboard Cards
----------------------

[](#adding-dashboard-cards)

Use the `DashboardCards::class` and app `on` method to add dashboard cards only on demand:

```
use Tobento\App\Backend\Card\DashboardCards;
use Tobento\App\Card\Factory;

$app->on(
    DashboardCards::class,
    static function(DashboardCards $cards): void {
        // Adding cards:
        $cards->add(name: 'foo', card: new Factory\Table(
            rows: ['foo', 'bar'],
        ));
    }
);
```

Check out the [App Card](https://github.com/tobento-ch/app-card) bundle to learn more.

Adding Searchables
------------------

[](#adding-searchables)

To add searchables, check out the [App Search - Adding Searchables](https://github.com/tobento-ch/app-search#adding-searchables) section.

Customization
-------------

[](#customization)

### Customize Via App

[](#customize-via-app)

In your [`app/src`](https://github.com/tobento-ch/app-skeleton#src) directory you may create a boot customizing specific controllers for instance.

```
namespace App;

use use Tobento\App\Backend\Controller\RoleCrudController;

class Customization extends Boot
{
    public function boot(): void
    {
        // Custom controller:
        $this->app->set(RoleCrudController::class, \App\CustomRoleCrudController::class);
    }
}
```

In the `apps/backend/config/app.php` file add your boot.

```
'boots' => [
    // ...
    \App\Customization::class,
],
```

### Customize Via App Config

[](#customize-via-app-config)

In the `apps/backend/config/app.php` file you can replace existing boots with your customized boots.

```
'boots' => [
    // ...
    // Resources:
    //\Tobento\App\Backend\Boot\Roles::class,
    \Tobento\App\Backend\Boot\CustomRoles::class,
    //\Tobento\App\Backend\Boot\Users::class,
    \Tobento\App\Backend\Boot\CustomUsers::class,
    // ...
],
```

Testing
-------

[](#testing)

You may boot the `\Tobento\App\Backend\Testing\UserAndRolesBoot::class` which will migrate the following users for testing:

EmailSmartphoneRoleActive-administrator1-administrator012345678editor1-registered1```
use Tobento\App\AppInterface;

final class SomeBackendAppTest extends \Tobento\App\Testing\TestCase
{
    use \Tobento\App\Testing\Database\MigrateDatabases;

    public function createApp(): AppInterface
    {
        $app = $this->createTmpApp(rootDir: __DIR__.'/../..');
        $app->boot(\Tobento\App\Backend\Boot\Backend::class);
        $app->booting();

        $app = $app->get(AppsInterface::class)->get('backend')->app();
        $app->boot(\Tobento\App\Seeding\Boot\Seeding::class);
        $app->boot(\Tobento\App\Backend\Testing\UserAndRolesBoot::class);
        return $app;
    }
}
```

You may check out the following links to learn more about testing.

- [App Testing](https://github.com/tobento-ch/app-testing)
- [Apps - Testing](https://github.com/tobento-ch/apps#testing)
- [App Crud - Testing](https://github.com/tobento-ch/app-crud#testing)
- [App Seeding](https://github.com/tobento-ch/app-seeding)

Credits
=======

[](#credits)

- [Tobias Strub](https://www.tobento.ch)
- [All Contributors](../../contributors)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance81

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~27 days

Recently: every ~38 days

Total

10

Last Release

102d ago

Major Versions

1.x-dev → 2.02025-10-06

PHP version history (2 changes)1.0.0PHP &gt;=8.0

2.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/055d6a1b5c2384bb179c75ab0b55914231d898fdc4dffeb30770f81200e52206?d=identicon)[TOBENTOch](/maintainers/TOBENTOch)

---

Top Contributors

[![tobento-ch](https://avatars.githubusercontent.com/u/16684832?v=4)](https://github.com/tobento-ch "tobento-ch (30 commits)")

---

Tags

packageappbackendtobento

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tobento-app-backend/health.svg)

```
[![Health](https://phpackages.com/badges/tobento-app-backend/health.svg)](https://phpackages.com/packages/tobento-app-backend)
```

PHPackages © 2026

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