PHPackages                             yasser-elgammal/green - 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. yasser-elgammal/green

ActiveProject

yasser-elgammal/green
=====================

Green Framework Skeleton

v1.0.0(1mo ago)22↑2900%MITPHPPHP ^8.2

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/YasserElgammal/green)[ Packagist](https://packagist.org/packages/yasser-elgammal/green)[ RSS](/packages/yasser-elgammal-green/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (2)Used By (0)

🌿 Green Framework
=================

[](#-green-framework)

**Green** is a lightweight, modern PHP framework built with PHP 8.2+ features, focusing on simplicity, speed, and developer experience. It leverages **PHP Attributes** for routing and follows a **Table Gateway** architecture.

---

⚡ Quick Start
-------------

[](#-quick-start)

### 1. Installation

[](#1-installation)

```
composer create-project yasser-elgammal/green app-name
cd app-name
cp .env.example .env
php green serve
```

### 2. Define a Route

[](#2-define-a-route)

```
class PostController {
    #[Route('GET', '/posts/{id}')]
    public function show(int $id) {
        return view('posts/show', ['id' => $id]);
    }
}
```

### 3. Database Access

[](#3-database-access)

```
$posts = new PostTable();
$post  = $posts->fetchById(1);
```

---

📖 Master Documentation
----------------------

[](#-master-documentation)

The framework is divided into several powerful subsystems. Please refer to the **[Master Documentation](DOCUMENTATION.md)** for detailed guides on:

- **[Core Architecture](DOCUMENTATION.md#-1-core-architecture)**: Lifecycle and DI patterns.
- **[Routing &amp; Middleware](DOCUMENTATION.md#-2-routing--middleware)**: Attribute-based routing and pipelines.
- **[Database &amp; Relations](DOCUMENTATION.md#-3-database--table-gateway--models)**: Eager loading and Table Gateways.
- **[API Layer](DOCUMENTATION.md#-4-api-layer-transformers--pagination)**: Smart Transformers and Pagination.
- **[Logic &amp; Validation](DOCUMENTATION.md#-5-logic-payloads--validation)**: Payload-based validation.
- **[Security &amp; Sessions](DOCUMENTATION.md#-6-security--sessions)**: State management and hashing.
- **[Global Exception Handling](DOCUMENTATION.md#-7-exception-handling--debug-mode)**: Debug Mode and API errors.
- **[Helper Reference](DOCUMENTATION.md#-8-helper-reference-cheat-sheet)**: Glossary of global functions.
- **[Console Commands](DOCUMENTATION.md#-9-console-commands)**: CLI tools and generators.

---

🛠 Features at a Glance
----------------------

[](#-features-at-a-glance)

- ✅ **PHP 8.2+ Attributes**: No more clunky routing files.
- ✅ **Table Gateway**: Clean separation of state (Model) and logic (Table).
- ✅ **Eager Loading**: Simple `include('relation')` to solve N+1.
- ✅ **Smart Transformers**: Nested API responses made easy.
- ✅ **Auto-Validation**: Type-hint payloads for instant validation.
- ✅ **Twig Templates**: Native Twig integration for clean views.
- ✅ **Debug UI**: Premium dark-mode error pages.

---

📜 License
---------

[](#-license)

Green Framework is open-sourced under the [MIT License](LICENSE).

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

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

---

Top Contributors

[![YasserElgammal](https://avatars.githubusercontent.com/u/35766609?v=4)](https://github.com/YasserElgammal "YasserElgammal (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yasser-elgammal-green/health.svg)

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

PHPackages © 2026

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