PHPackages                             gnu/scaffy-core - 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. [Database &amp; ORM](/categories/database)
4. /
5. gnu/scaffy-core

ActiveLibrary[Database &amp; ORM](/categories/database)

gnu/scaffy-core
===============

A package that generated models based on your database entities. Works for MS SQL Server, MySql &amp; PostgreSql.

v1.2.0(10mo ago)2211MITPHPPHP &gt;=8.0

Since Jul 2Pushed 10mo agoCompare

[ Source](https://github.com/gnujesus/scaffy-core)[ Packagist](https://packagist.org/packages/gnu/scaffy-core)[ RSS](/packages/gnu-scaffy-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (11)Used By (1)

Scaffy Core
===========

[](#scaffy-core)

**Scaffy Core** is the framework-agnostic core of the Scaffy code generation system. It handles the business logic for generating model scaffolding based on your database schema, following a clean Hexagonal Architecture design.

---

✨ Features
----------

[](#-features)

- 🔌 Completely decoupled from any PHP framework (Laravel, Symfony, etc.)
- 💡 Provides clean ports for database and framework adapters
- 🧱 Reusable across Laravel, CLI tools, or other integrations
- 🧮 Generates model definitions from your actual database metadata

---

📦 Requirements
--------------

[](#-requirements)

- PHP 8.1+
- Composer

---

🧰 Installation
--------------

[](#-installation)

```
composer require gnu/scaffy-core
```

You can now import and use `Gnu\Scaffy\Core` components in your project.

---

🧠 Hexagonal Architecture
------------------------

[](#-hexagonal-architecture)

Scaffy Core sits at the center of a hexagonal architecture:

```
+-------------------------+
|    Framework Adapters   |  ← e.g. Laravel, CLI, Symfony, CodeIgniter...
+-------------------------+
           ↑
           |
           ↓
+-------------------------+
|       Scaffy Core       |
|  - Business logic       |
|  - FrameworkPort        |
+-------------------------+
           ↑
           |
           ↓
+-------------------------+
|     Database Adapters   |  ← e.g. PostgreSQL, SQL Server, MySql...
+-------------------------+

```

---

🔧 Usage
-------

[](#-usage)

Scaffy Core defines the core contracts and logic. To use it:

1. Create an adapter implementing `FrameworkPort`
2. Create DB-specific implementations of `DatabasePort`
3. Inject and use them however you want (Laravel, CLI, custom)

Example usage in a Laravel adapter:

```
$scaffy = new ScaffyService($databasePort);
$scaffy->generate($schema);
```

---

🧱 Components
------------

[](#-components)

- `Helpers` — Utility functions for file and string handling
- `Ports\FrameworkPort` — Interface for framework-side adapters

---

🧪 Example
---------

[](#-example)

```
use Gnu\Scaffy\Core\Helpers\IOHelper;

$path = IOHelper::findRootDirectory('/app/Models');
```

---

✅ Goals
-------

[](#-goals)

- Maintain strict separation between business logic and frameworks
- Promote testability and flexibility across environments
- Encourage modular adapter/plugin design
- Development of Laravel APIs over exising databases.

---

📄 License
---------

[](#-license)

MIT © [gnujesus](https://github.com/gnujesus)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance54

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

10

Last Release

312d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47e51a2f732e78a89edf3d3cfed2683cb4e349328d921437d6fcdb508f7d4046?d=identicon)[gnujesus](/maintainers/gnujesus)

---

Top Contributors

[![gnujesus](https://avatars.githubusercontent.com/u/107089453?v=4)](https://github.com/gnujesus "gnujesus (13 commits)")

### Embed Badge

![Health badge](/badges/gnu-scaffy-core/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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