PHPackages                             artimman/dbmframework - 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. [Framework](/categories/framework)
4. /
5. artimman/dbmframework

ActiveLibrary[Framework](/categories/framework)

artimman/dbmframework
=====================

DbM Framework

v5.0.2(3mo ago)15MITPHPPHP ^8.1

Since Sep 18Pushed 1mo agoCompare

[ Source](https://github.com/designbymalina/dbmframework)[ Packagist](https://packagist.org/packages/artimman/dbmframework)[ Docs](https://github.com/designbymalina/dbmframework)[ RSS](/packages/artimman-dbmframework/feed)WikiDiscussions v5.3 Synced 2mo ago

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

DbM Framework - Ultra Fast PHP Framework for High-Performance Web Apps
======================================================================

[](#dbm-framework---ultra-fast-php-framework-for-high-performance-web-apps)

**Fast. Flexible. PSR-Compatible.****Modern PHP MVC/MVP Framework + CMS Engine with built-in API**

[![PHP Version](https://camo.githubusercontent.com/1a5e13126d38c1d05f712dae30e7f60ae0444a9c882e9e526349ccba27facb8d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d626c7565)](http://php.net)[![PSR](https://camo.githubusercontent.com/8f1b9c6aa07f44158d1b221ac20f78d8c6c10a25afec5860d8f467fbde1fb6f2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d3125324325323034253243253230313125324325323031322d677265656e)](https://www.php-fig.org/)![Build](https://camo.githubusercontent.com/7d4414cbb75c840ddb7265e181d65668c1dce61ba985d79d80d4eefa06159878/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d73756363657373)![Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)[![Composer](https://camo.githubusercontent.com/7f0f43dca71ce4d815f7c5d72e7da4e3f814ff0a71ff9d2d385c70bd2b1f1c4a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d72656164792d6f72616e6765)](https://getcomposer.org/)![Speed](https://camo.githubusercontent.com/48ef8a07a7377168705c01bd04830f7ea54897e206e6b9385d7767872292b962/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706572666f726d616e63652d756c747261253230666173742d726564)[![License](https://camo.githubusercontent.com/53738e7f87529e25f4ab503cda7021407804f8b90a7e549c7ed7daad52f2ee3f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d44624d2d6f72616e6765)](https://dbm.org.pl)

DBM Framework PHP MVC MVP + DBM CMS, Version 5
All copyrights reserved by Design by Malina (DbM)
Website: [www.dbm.org.pl](http://www.dbm.org.pl)

About the Framework
-------------------

[](#about-the-framework)

**DBM Framework** is a modular monolith designed for building efficient and maintainable PHP applications. It provides full architectural control, enabling the creation of systems with a long lifecycle.

Unlike previous versions, which were based on a classic monolith, version 5 introduces a **modular architecture**. This allows for application structures composed of independent, isolated modules that are still implemented as a cohesive system.

This solution combines the simplicity and efficiency of **a monolith** with the flexibility, scalability, and clear separation of responsibilities (Separation of Concerns) characteristic of modular systems.

The framework also forms the foundation of the DBM Platform, including the DBM CMS—a turnkey solution enabling rapid website and application launches without the need to build your own infrastructure from scratch. The CMS can operate as a lightweight file- and template-based system or be extended with administrative and database modules, maintaining full control over the code and application structure.

Core Idea
---------

[](#core-idea)

**DbM Framework is a lightweight application engine,
while CMS Lite is an optional content management layer.**

In short:

**Micro framework + optional CMS**

For developers: full control and performance
For clients: simple content management panel

### DbM Framework is:

[](#dbm-framework-is)

**Ultra-fast core** - Optimized request Routing and Caching
**PSR (1, 4, 11, 12) Compliant** - Industry Standard Ready Code
**REST API Routing** - Lightweight, Ready, Lightweight
**Smart DI Container** - Manual or Semi-Automatic Dependency Injection
**Composer &amp; Autoload** - Ready to Use in Any Project
**Ultra Fast View Engine 2.0** - Speed ​​Similar to Native PHP
**DbM CMS** - Framework-Based Content Management System, Ready-Made Authentication and Administration Panel

DbM is a framework that doesn't fight the developer - **it lets them work the way they want**.

Framework Structure
-------------------

[](#framework-structure)

- `application/` - framework core: classes, interfaces, libraries (+ Routing, DI, API)
- `bin` - executables: console command interface and worker (entrypoint: bin/dbm)
- `config/` - configuration files (optional, e.g., php.ini, CMS modules)
- `frontend/` - frontend (optional React.js or Vue.js, Node.js, Webpack)
- `libraries/` - external libraries (PSR, PHPMailer, Guzzle)
- `public/` - public files (domain root)
- `src/` - application logic: controllers, services, models, services
- `templates/` - view templates
- `tests/` - unit tests
- `translations/` - translation files (optional)
- `var/` - cache and logs (automatically created, write permissions required)
- `vendor/` - libraries installed by Composer (automatically created)
- `.env.example` - sample environment configuration

Additional Structure for CMS installations
------------------------------------------

[](#additional-structure-for-cms-installations)

- `_Documents` - documentation, module installation archive
- `data/` - data and files (write permissions required)
- `modules/` - content management system modules

Installation and Configuration (manual installation)
----------------------------------------------------

[](#installation-and-configuration-manual-installation)

1. **Domain Configuration:** Point your domain to the `public/` directory. If you are using a local environment (localhost), copy the `.htaccess` file from `_Documents/_Server/` to the project root. Then, in both files – the root directory and public/.htaccess – adjust the RewriteBase directive to match your application's execution path.
2. **Environment File:** Configure the `.env.example` file, then rename it to `.env`.
3. **Optimization:** After completing the configuration and launching the system, set `CACHE_ENABLED`.

In the basic `.env` configuration, complete the General settings section:

```
APP_URL="http://localhost/"
APP_NAME="Application Name"
APP_EMAIL="email@domain.com"
```

Next, configure: Cache settings, Database settings, Mailer settings, API settings.

**Note:** After launching the application, set CACHE\_ENABLED=true to enable caching and speed up the page.

Installing via Composer
-----------------------

[](#installing-via-composer)

If you prefer to install via Composer or your project requires additional packages:

```
git clone https://github.com/designbymalina/dbmframework.git
```

If you want to use external libraries, you can use Composer:

```
composer install
```

Installing via Composer will create autoloading and download all dependencies.

Installing Modules (optional for DbM Platform)
----------------------------------------------

[](#installing-modules-optional-for-dbm-platform)

Some modules (e.g., Admin) may register additional packages during installation.

In Composer mode, you must re-sync after installing the module.

**Note**

In Composer mode, the `libraries` directory can be deleted, as long as it does not contain packages dynamically installed by modules.

Autoloading
-----------

[](#autoloading)

The framework can operate in two modes:

### 1. Standalone Mode (without Composer)

[](#1-standalone-mode-without-composer)

By default, the framework has its own autoloading mechanism and does not require Composer.

In this mode:

- Core classes are loaded by the internal autoloader (PSR-4),
- External libraries are located in the `libraries` directory,
- Dynamically installed packages (e.g., by modules) are registered in the file: `storage/framework/bundles.php`.

The autoloader reads this file automatically.

### 2. Composer Mode

[](#2-composer-mode)

Executing the command:

```
composer install
```

causes:

- generating the Composer autoloader,
- installing dependencies (e.g., Doctrine DBAL, PHPMailer, Guzzle),
- switching the framework to Composer autoloading.

From this point on, the framework uses only the Composer autoloader.

### Synchronizing Bundles with Composer

[](#synchronizing-bundles-with-composer)

In Composer mode, bundles registered in `storage/framework/bundles.php` should be synchronized with the composer.json file.

Execute:

```
php bin/dbm command sync-bundles-to-composer
composer dump-autoload
```

After this operation, all dynamic bundles will be available to the Composer autoloader.

Routing
-------

[](#routing)

Classic routing is defined in the file: `application/routes.php`.

Example:

```
$router->get('/path', [NameController::class, 'methodName'], 'route_name');
```

You define REST API Routing in the `application/api.php` file.

Example:

```
$router->get('/api/path', [NameApiController::class, 'methodName'], 'api_route_name');
```

Dependency Injection
--------------------

[](#dependency-injection)

DbM Framework uses a lightweight DI container, compliant with **PSR-11**, which offers two modes of operation:

- **Manual configuration (recommended)**

You register all dependencies explicitly in the `application/services.php` file:

```
$container->set(Database::class, fn() => new Database($config));
$container->singleton(Request::class, fn() => new Request());
```

This mode guarantees full control over dependencies and performance.

- **Semi-automatic configuration (available)**

In many cases, the framework can recognize and inject a dependency based on the parameter type in the controller or service constructor:

```
public function __construct(Mailer $mailer) { ... }
```

If the class is known and PSR-4 autoload-compliant, it will be injected correctly. However, explicit service registration is recommended for full predictability and stability.

This compromise combines the **simplicity** of manual DI with the **flexibility** of automatic detection—without the cost of full reflection found in heavy frameworks.

Template Engine
---------------

[](#template-engine)

The framework uses a built-in template engine by default. You can freely replace it with something like Twig.

Why use DbM View Engine over the most popular engines:

CechyTwigBladeDbM View EngineSzybkośćśredniadobranajwyższaPHP-friendly❌⚠️✅ programista wie co robiFiltrytaktak✅ proste i rozszerzalnePluginytrudnebrak✅ runtime callbacksDziedziczenie blokówtaktak✅ + append/prependCachetaktak✅ klasy OPCSandboxtakbrak✅ opcjonalnyZależnościdużeśrednie✅ niezależnyWaga&gt;400KB~200KB~50KBIn tests with CACHE=TRUE, the results achieved were similar to those of Native PHP.

=== TEMPLATE ENGINE BENCHMARK - benchmark.phtml ===

MODEAVG(ms)MEDIANMINMAXSTDCACHE=FALSE1.311.291.171.670.09CACHE=TRUE0.170.160.160.310.02Native PHP0.150.140.140.180.01**Conclusion**: DbM View Engine (cache=true) is almost as fast as pure PHP, confirming its performance.

Templates are located in the `templates/` directory.

Command Console
---------------

[](#command-console)

A lightweight and fast CLI for CRON and DEV tasks. It provides a simple way to run background or maintenance tasks directly from the command line with a lightweight and self-contained implementation. Console commands are executed via the file: `bin/dbm`.

Available commands:

```
php bin/dbm list
php bin/dbm command example (for ExampleCommand)
php bin/dbm worker example (for ExampleWorker)
```

Additional Information
----------------------

[](#additional-information)

In a production environment (on a remote server), **the domain must point to the `public/` directory**, as it serves as the document root. If you are using a local environment (localhost), configure the .htaccess files in both the project root and the public/ folder. For remote servers where the domain already points directly to the public/ directory, the application typically requires no further .htaccess configuration.

Ensure that `open_basedir` does not block access to directories. Depending on your server configuration, it may be necessary to disable this restriction in the PHP settings. This security feature, known as "site separation," can block access to files outside the domain's document root, preventing the application from functioning correctly.

After launching the application, enable the cache (CACHE\_ENABLED=true) to speed up the website.

When using **DBM CMS**, also ensure that the data/ directories have the appropriate write permissions.

**IMPORTANT!** Please retain the footer: "Created with [DbM Framework](https://dbm.org.pl/ "DbM")". The link should remain intact. Thank you for supporting the project! By maintaining the link in the footer, you help develop the free, open-source framework and support its development and the community of independent PHP developers.

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

[](#documentation)

### Getting Started

[](#getting-started)

[Introduction &amp; Architecture](_Documents/_Docs/en/01-getting-started/01-introduction.md)
[Quick Start Guide](_Documents/_Docs/pl/01-getting-started/02-quick-start.md)

---

### Core Concepts

[](#core-concepts)

[Controllers &amp; Services](_Documents/_Docs/pl/02-core-concepts/01-controllers-and-services.md)
[Dependency Injection](_Documents/_Docs/pl/02-core-concepts/02-dependency-injection.md)
[Environment Variables (.env)](_Documents/_Docs/pl/02-core-concepts/03-environment-variables.md)
[Console Commands (CLI)](_Documents/_Docs/pl/02-core-concepts/04-console-commands.md)
[Localization](_Documents/_Docs/pl/02-core-concepts/05-localization.md)

---

### HTTP &amp; Routing

[](#http--routing)

[Web Routing (web.php)](_Documents/_Docs/pl/03-http-and-routing/01-web-routing.md)
[API Routing (api.php)](_Documents/_Docs/pl/03-http-and-routing/02-api-routing.md)
[Request](_Documents/_Docs/pl/03-http-and-routing/03-request.md)
[Response](_Documents/_Docs/pl/03-http-and-routing/04-response.md)
[Middleware](_Documents/_Docs/pl/03-http-and-routing/05-middleware.md)
[API Client](_Documents/_Docs/pl/03-http-and-routing/06-api-client.md)
[API Endpoints &amp; Authentication](_Documents/_Docs/pl/03-http-and-routing/07-api-endpoints-and-authentication.md)
[Session](_Documents/_Docs/pl/03-http-and-routing/08-session.md)
[Cookies](_Documents/_Docs/pl/03-http-and-routing/09-cookies.md)

---

### Data &amp; Presentation

[](#data--presentation)

[Database](_Documents/_Docs/pl/04-data-and-presentation/01-database.md)
[Templates](_Documents/_Docs/pl/04-data-and-presentation/02-templates.md)
[Template Features](_Documents/_Docs/pl/04-data-and-presentation/03-template-feature.md)
[Template Engine](_Documents/_Docs/pl/04-data-and-presentation/04-template-engine.md)
[Building Your First Feature](_Documents/_Docs/pl/04-data-and-presentation/05-building-first-feature.md)

---

### Validation

[](#validation)

[Validation System](_Documents/_Docs/pl/05-validation/01-validation-system.md)

---

### Infrastructure

[](#infrastructure)

[Logging](_Documents/_Docs/pl/06-infrastructure/01-logging.md)

---

### Modules

[](#modules)

[Creating Modules](_Documents/_Docs/pl/07-modules/01-creating-modules.md)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance85

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Recently: every ~25 days

Total

10

Last Release

90d ago

Major Versions

v3.x-dev → v4.0.02025-10-22

v4.x-dev → v5.0.12026-02-02

PHP version history (2 changes)v3.1PHP ^8.0

v4.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![designbymalina](https://avatars.githubusercontent.com/u/232852683?v=4)](https://github.com/designbymalina "designbymalina (11 commits)")

---

Tags

cmscms-frameworkframeworkmodular-monolithmvcmvc-frameworkmvpmvp-developmentphpphp-frameworkphpframeworkphp frameworkdbm framework

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/artimman-dbmframework/health.svg)

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

###  Alternatives

[phphleb/framework

Engine for Framework HLEB2

233318.7k12](/packages/phphleb-framework)[contao-community-alliance/dc-general

Universal data container for Contao

1578.3k86](/packages/contao-community-alliance-dc-general)

PHPackages © 2026

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