PHPackages                             actra/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. actra/backend

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

actra/backend
=============

A backend management library for the YUF framework, providing user account management and one-time token authentication via email.

v0.8.7(3w ago)090↑100%MITPHPPHP &gt;=8.5

Since Apr 25Pushed 3w agoCompare

[ Source](https://github.com/Actra-AG/backend)[ Packagist](https://packagist.org/packages/actra/backend)[ RSS](/packages/actra-backend/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (27)Used By (0)

Actra Backend
=============

[](#actra-backend)

A comprehensive backend management library for the [YUF framework](https://github.com/Actra-AG/yuf). This library provides a ready-to-use administrative interface with user account management and secure authentication using one-time tokens sent via email.

Features
--------

[](#features)

- **One-Time Token Authentication**: Secure login without passwords, using tokens sent to the user's email.
- **User Management**: Add, modify, and invite users to the system, including phone number support.
- **User Notifications**: Send email notifications to specific user groups directly from the backend.
- **Role-Based Access Control**: Basic functionality to manage user permissions.
- **IP Whitelisting**: Additional security layer to restrict backend access.
- **Activity Monitoring**: Track visits and token usage.
- **Responsive UI**: Built-in HTML templates for common backend tasks.

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

[](#requirements)

- PHP &gt;= 8.5
- `actra/yuf` framework

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

[](#installation)

### 1. Composer

[](#1-composer)

Add the library to your project via Composer:

```
composer require actra/backend
```

### 2. Database Setup

[](#2-database-setup)

The library requires several database tables to function. You must import the provided SQL files into your database:

1. Import `db/schema.sql` to create the required table structure.
2. Import `db/data.sql` to populate the tables with initial data, including a test user account.

Usage
-----

[](#usage)

To integrate the backend into your YUF-based application, you need to call `ActraBackend::init()` during your application's bootstrap process.

### Basic Initialization

[](#basic-initialization)

```
use actra\backend\ActraBackend;
use actra\backend\settings\MailerSettings;
use actra\yuf\db\DbSettingsModel;

// ... initialize your $routeCollection, $language, $navigationItemCollection ...

ActraBackend::init(
    routeCollection: $routeCollection,
    path: '/backend/', // The URL path where the backend will be accessible
    isDefaultForLanguage: false,
    language: $language,
    ipWhitelist: ['127.0.0.1'], // Allowed IP addresses
    backendName: 'My Project Backend',
    javaScriptPaths: [
        '/assets/js/backend.js'
    ],
    stylesHref: '/assets/css/backend.css',
    dbSettingsModel: new DbSettingsModel(
        hostname: 'localhost',
        username: 'db_user',
        password: 'db_password',
        database: 'my_database'
    ),
    mailerSettings: new MailerSettings(
        senderEmail: 'noreply@example.com',
        senderName: 'My Project',
        hostname: 'smtp.example.com',
        username: 'mailer@example.com',
        password: 'smtp_password',
        port: 587,
        tls: true,
        signature: 'Best regards, Your Team'
    ),
    navigationItemCollection: $navigationItemCollection,
    maxAllowedLoginAttempts: 5, // Optional, defaults to 5
    frontendHref: 'https://example.com', // Optional
    frontendName: 'Go to Website' // Optional
);
```

Once initialized, the library automatically registers the necessary routes under the specified path (e.g., `/backend/`) and adds navigation items to your `NavigationItemCollection`.

Documentation
-------------

[](#documentation)

- [Upgrade Guide](UPGRADE.md) - Record of changes and migration instructions.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Author
------

[](#author)

- **Actra AG** -

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance95

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

26

Last Release

22d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db110c9aa8b7f41b77d42bb1d3da4d493aa513e9a4f5a49e20169e46ee9c653f?d=identicon)[JayQ1982](/maintainers/JayQ1982)

---

Top Contributors

[![JayQ1982](https://avatars.githubusercontent.com/u/6882691?v=4)](https://github.com/JayQ1982 "JayQ1982 (27 commits)")

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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