PHPackages                             smartfactory/smartfactory - 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. smartfactory/smartfactory

ActiveLibrary[Framework](/categories/framework)

smartfactory/smartfactory
=========================

Lightweight PHP library with many useful tools and functions.

2.1.25(5mo ago)03911MITPHPPHP &gt;=8.4CI passing

Since Nov 15Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/oschildt/SmartFactory)[ Packagist](https://packagist.org/packages/smartfactory/smartfactory)[ RSS](/packages/smartfactory-smartfactory/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)DependenciesVersions (47)Used By (1)

SmartFactory
------------

[](#smartfactory)

- Lightweight simple PHP library
- With many useful tools and functions
- Without overhead
- Designed based on IoC

For more details see [Presentation](http://php-smart-factory.org/smartfactory_presentation.pdf) and [API documentation](http://php-smart-factory.org/smartfactory/).

### Requirements

[](#requirements)

- PHP 8.4+

### Installation

[](#installation)

```
composer require "smartfactory/smartfactory"

```

**composer.json**

```
{
  ...

  "require": {
    "php": ">=8.4",
    "smartfactory/smartfactory": ">=2.1.25"
  }

  ...
}

```

### To get familiar with the SmartFactory do the following:

[](#to-get-familiar-with-the-smartfactory-do-the-following)

- Git-clone the demo application [SmartFactoryDemo](https://github.com/oschildt/SmartFactoryDemo) and run 'composer update'.
- Use the script *database/create\_database\_mysql.sql* (*create\_database\_mssql.sql*) to create a demo database necessary for some examples.
- View and study the API documentation in the folder docs or here [API documentation](http://php-smart-factory.org/smartfactory/).
- Study the core code of the library SmartFactory.

### To start writing own application using SmartFactory

[](#to-start-writing-own-application-using-smartfactory)

1. Git-clone the demo application [SmartFactoryDemo](https://github.com/oschildt/SmartFactoryDemo) and run 'composer update'.
2. Study the directory structure of the demo application and the code.
3. Implement your classes and functions.
4. Bind you classes to the interfaces in the file *initialization\_inc.php* to be able to use the IoC approach for creating objects offered by the library SmartFactory.
5. Implement you business logic in the root directory or any subdirectory.
6. Implement the API request handlers for JSON or XML requests if necessary.
7. Add translation texts for your application over the *localization/edit.php* or directly into the JSON file *localization/texts.json*. Use the script *localization/check.php* to check your translations for missing translations.

Directory Structure
-------------------

[](#directory-structure)

```
docs
src
  SmartFactory
    Interfaces
    DatabaseWorkers

```

Detailed description
--------------------

[](#detailed-description)

### docs

[](#docs)

This directory contains the documentation about classes, interfaces and functions of the library SmartFactory.

### src

[](#src)

This is the root directory for all classes and interfaces. The class loader is implemented based on PSR4 approach. You have no need to add additional class loader function.

### src/SmartFactory

[](#srcsmartfactory)

This directory contains the core classes and interfaces of the library SmartFactory.

### src/SmartFactory/Interfaces

[](#srcsmartfactoryinterfaces)

This directory contains the core interfaces of the library SmartFactory.

### src/SmartFactory/DatabaseWorkers

[](#srcsmartfactorydatabaseworkers)

This directory contains the core classes of the library SmartFactory for working with databases.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

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

Recently: every ~171 days

Total

46

Last Release

170d ago

Major Versions

1.1.9 → 2.0.02018-12-21

1.2.17 → 2.1.182022-08-12

PHP version history (3 changes)1.1.0PHP &gt;=7.2.0

2.1.15PHP &gt;=8.0

2.1.24PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/60dcf712e8e2ffb570e4bf3aec1ac9369e7aaa9690c900bfccc04c54b3f48bab?d=identicon)[oschildt](/maintainers/oschildt)

---

Top Contributors

[![oschildt](https://avatars.githubusercontent.com/u/4179648?v=4)](https://github.com/oschildt "oschildt (171 commits)")

---

Tags

frameworkfactorylibrary

### Embed Badge

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

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

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)[podcastcrawler/podcastcrawler

PHP library to find podcasts

402.7k1](/packages/podcastcrawler-podcastcrawler)[ollyxar/websockets

PHP WebSocket server

311.9k1](/packages/ollyxar-websockets)

PHPackages © 2026

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