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

ActiveProject

strukt/strukt
=============

Strukt Project

v1.1.8-alpha(1y ago)1223MITPHP ^8.1

Since Feb 28Compare

[ Source](https://github.com/struktapp/strukt-strukt)[ Packagist](https://packagist.org/packages/strukt/strukt)[ RSS](/packages/strukt-strukt/feed)WikiDiscussions Synced yesterday

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

Strukt
======

[](#strukt)

[![Latest Stable Version](https://camo.githubusercontent.com/91cf8c63b26d8d5c35910990f46fb2ed291c92324d8334e290dda11faf58a908/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f737472756b742f762f737461626c65)](https://packagist.org/packages/strukt/strukt)[![Total Downloads](https://camo.githubusercontent.com/26a91c5d722306837723d11a4abc441db55143609c95a7e97b9c163a4680a2e5/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f737472756b742f646f776e6c6f616473)](https://packagist.org/packages/strukt/strukt)[![Latest Unstable Version](https://camo.githubusercontent.com/fcedbf413dadbfe807f5f99c30c39f8c18ceaacb0157a819657a48f3d0c11bfc/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f737472756b742f762f756e737461626c65)](https://packagist.org/packages/strukt/strukt)[![License](https://camo.githubusercontent.com/4f14de4525f39f734df800f2a20f2f37aef81d22398cacc9d65bfd99a64e8b96/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f737472756b742f6c6963656e7365)](https://packagist.org/packages/strukt/strukt)

### Getting started

[](#getting-started)

```
composer create-project strukt/strukt:1.1.8-alpha --prefer-dist
```

Listing console commands:

```
./xcli -l
```

### Generate Application

[](#generate-application)

```
./xcli app:make payroll
```

The file structure generated should look as below:

```
app
└── src
    └── Payroll
        ├── AuthModule
        │   ├── Controller
        │   │   └── User.php
        │   ├── Form
        │   │   └── User.php
        │   ├── PayrollAuthModule.php
        │   ├── Router
        │   │   ├── Auth.php
        │   │   └── Index.php
        │   └── Tests
        │       └── UserTest.php
        └── User.php # Models are stored in the root of your app (i.e payroll)
```

There is a default module i.e `AuthModule` when you generate an application. Folders generated in a module (facets) can be changed in `cfg/module.ini` this also indicates part of alias used to access classes/objects. You'll also find a config file `cfg/app.ini` that holds the active application name.

When an application or module is created/generated it is loaded by running the command below, otherwise strukt won't detect it:

```
./xcli app:reload
```

The above command will create a `App/Loader.php` in the `lib/` folder at the root of your project. This file should NEVER be edited because everything will be overwritten once the above command is rerun.

### Generate Module

[](#generate-module)

Command syntax for generating a module:

```
./xcli make:module
```

Example command:

```
./xcli make:module payroll human_resource hr
```

Now the file structure should look as below:

```
app/
└── src
    └── Payroll
        ├── AuthModule
        └── HumanResourceModule
```

Remember to run the `app:reload` command to load the module.

### Execute Shell

[](#execute-shell)

`strukt-strukt` uses [Psysh](https://github.com/bobthecow/psysh).

To drop into shell:

```
$ ./xcli shell:exec
> ls
Variables: $core
> $core->get("au.ctr.User")
= Payroll\AuthModule\Controller\User

> $core->get("User")
= Payroll\User {
    +username: null,
    +password: null,
  }
```

Cli
---

[](#cli)

View `providers` and `middlewares`

```
./xcli sys:ls middlewares # view for console
```

View `index.php` middlewares

```
./xcli sys:ls middlewares --idx # view for index.php
```

You can also view `providers` by replacing `middlewares`

### Cli Utility

[](#cli-utility)

Enable and disable `commands` , `middlewares` and `providers`

Example:

```
./xcli sys:util enable commands pub-make
```

### Run Application

[](#run-application)

```
./xcli app:exec
```

Uses `.env` `server_{var}` variables to run application.

Notes
-----

[](#notes)

The `make:router` and `make:module` commands will not work on cli console until you run `app:make` and `app:reload` commands are run respectively.

**IMPORTANT**: The folder `.tpl/` in the root of the project contains `sgf/` folder that contains class template files used to generate the application modules and migrations. Ensure to **NOT** change it until you've understood [strukt-generator](https://github.com/pitsolu/strukt-generator)

Have a good one!

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance43

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.6% 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 ~125 days

Recently: every ~199 days

Total

10

Last Release

450d ago

PHP version history (3 changes)v1.0.0-alphaPHP ^7.1.3

v1.1.0-alphaPHP ^7.4

v1.1.7-alphaPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f77a56030c77ce25f7fcf6db800e45bb6a31bf3c07740b43aeabcdf5e9edec2?d=identicon)[pitsolu](/maintainers/pitsolu)

---

Top Contributors

[![pitsolu](https://avatars.githubusercontent.com/u/16669704?v=4)](https://github.com/pitsolu "pitsolu (77 commits)")[![samweru](https://avatars.githubusercontent.com/u/104033121?v=4)](https://github.com/samweru "samweru (8 commits)")

### Embed Badge

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

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

PHPackages © 2026

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