<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yasser Elgammal</title>
    <description>The latest articles on DEV Community by Yasser Elgammal (@yasserelgammal).</description>
    <link>https://dev.to/yasserelgammal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F137473%2Fe33f993a-26f8-40c6-8642-722f1fef577e.jpg</url>
      <title>DEV Community: Yasser Elgammal</title>
      <link>https://dev.to/yasserelgammal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasserelgammal"/>
    <language>en</language>
    <item>
      <title>Green Framework: From a Small Experiment to a PHP Framework</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Sat, 12 Sep 2026 00:21:27 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/green-framework-from-a-small-experiment-to-a-php-framework-32kp</link>
      <guid>https://dev.to/yasserelgammal/green-framework-from-a-small-experiment-to-a-php-framework-32kp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Green started as a small experiment. 🌱&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I didn't have a big roadmap.&lt;/p&gt;

&lt;p&gt;I just wanted to build a PHP framework myself and understand more of what happens underneath the frameworks I use every day.&lt;/p&gt;

&lt;p&gt;The first version was simple. I wasn't trying to build something that could compete with existing frameworks. I was mainly interested in the process of building one.&lt;/p&gt;

&lt;p&gt;Some parts were there from the beginning. Others came later. But almost everything has evolved and improved along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  From the Basics
&lt;/h2&gt;

&lt;p&gt;Routing and database access were part of Green from the early versions.&lt;/p&gt;

&lt;p&gt;Then the framework started growing around them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Middleware&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;Sessions&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;li&gt;Localization&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;li&gt;Service Providers&lt;/li&gt;
&lt;li&gt;Exception Handling&lt;/li&gt;
&lt;li&gt;Relations &amp;amp; Pagination&lt;/li&gt;
&lt;li&gt;Admin Features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And many other smaller pieces.&lt;/p&gt;

&lt;p&gt;But adding features wasn't the only part of the journey.&lt;/p&gt;

&lt;p&gt;A big part of it was going back to things I had already built and asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can this be simpler?&lt;/li&gt;
&lt;li&gt;Does this belong here?&lt;/li&gt;
&lt;li&gt;Is this really the responsibility of this class?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Refactoring Became Part of the Process
&lt;/h2&gt;

&lt;p&gt;One example is the router.&lt;/p&gt;

&lt;p&gt;At some point, the router was doing too much.&lt;/p&gt;

&lt;p&gt;Instead of continuing to add more code to it, I split its responsibilities into smaller components such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;RouteRegistrar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RouteRegistry&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RouteMatcher&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MatchedRouteDispatcher&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RouteInvoker&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;FastRoute is still used underneath, but the routing API belongs to Green.&lt;/p&gt;

&lt;p&gt;That kind of refactoring happened in other parts of the framework too.&lt;/p&gt;

&lt;p&gt;The goal wasn't to make Green bigger.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It was to make it easier to understand and maintain.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  From v1 to v2
&lt;/h2&gt;

&lt;p&gt;The early versions were mostly about getting the foundation working.&lt;/p&gt;

&lt;p&gt;As Green moved toward v2, more attention went into the architecture and developer experience.&lt;/p&gt;

&lt;p&gt;Some of the things that evolved along the way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service Providers became a native part of the framework&lt;/li&gt;
&lt;li&gt;Database and relation handling evolved&lt;/li&gt;
&lt;li&gt;Exception handling became more consistent&lt;/li&gt;
&lt;li&gt;Routing became more structured&lt;/li&gt;
&lt;li&gt;Testing increased&lt;/li&gt;
&lt;li&gt;Session handling became safer&lt;/li&gt;
&lt;li&gt;Session IDs are regenerated after login&lt;/li&gt;
&lt;li&gt;Sessions can be invalidated where needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They came from actually working on the framework and finding things that needed to change.&lt;/p&gt;




&lt;h2&gt;
  
  
  22 Releases Later
&lt;/h2&gt;

&lt;p&gt;Today, Green has &lt;strong&gt;22 releases&lt;/strong&gt; since April 2026.&lt;/p&gt;

&lt;p&gt;That's roughly &lt;strong&gt;one release every week&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The number itself isn't the most important thing for me.&lt;/p&gt;

&lt;p&gt;What I like about looking back at the releases is seeing how much changed between the first version and the current one.&lt;/p&gt;

&lt;p&gt;A small experiment turned into a framework with its own structure, conventions, and ideas.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Starting a new Green project is straightforward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer create-project yasser-elgammal/green my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also check the source code and documentation on GitHub:&lt;br&gt;
&lt;a href="https://github.com/yasserelgammal/green" rel="noopener noreferrer"&gt;Green Framework on GitHub&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Using Green in a Real Environment
&lt;/h2&gt;

&lt;p&gt;One of the best parts of this journey was getting the chance to use Green in a &lt;strong&gt;real production environment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Using Green in a real application gave me a different perspective.&lt;/p&gt;

&lt;p&gt;Some things that looked good while building them needed to be simplified.&lt;/p&gt;

&lt;p&gt;Some assumptions had to be reconsidered.&lt;/p&gt;

&lt;p&gt;And some parts became much more valuable when they were actually used.&lt;/p&gt;

&lt;p&gt;That's probably one of the biggest differences between building something as an experiment and building something that has to work for a real application.&lt;/p&gt;




&lt;h2&gt;
  
  
  Still Building
&lt;/h2&gt;

&lt;p&gt;Green is far from finished.&lt;/p&gt;

&lt;p&gt;There are still things I want to improve, features I want to build, and architectural decisions I want to revisit.&lt;/p&gt;

&lt;p&gt;But looking back from v1 to the current release, I'm happy with how far the project has come.&lt;/p&gt;

&lt;p&gt;It started as a small experiment.&lt;/p&gt;

&lt;p&gt;Now it's a framework I'm continuing to &lt;strong&gt;build, use, and learn from.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Still building. 🌱&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>php</category>
      <category>opensource</category>
    </item>
    <item>
      <title>What Is an AI Harness? A Practical Guide with a Laravel CMS Example</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Thu, 03 Sep 2026 22:03:42 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/what-is-an-ai-harness-a-practical-guide-with-a-laravel-cms-example-3d4g</link>
      <guid>https://dev.to/yasserelgammal/what-is-an-ai-harness-a-practical-guide-with-a-laravel-cms-example-3d4g</guid>
      <description>&lt;p&gt;An AI harness is a structured set of files, rules, skills, workflows, and project context that surrounds an AI coding agent.&lt;/p&gt;

&lt;p&gt;Instead of repeating the same instructions in every prompt, the harness gives the agent a consistent way of working across tasks and sessions.&lt;/p&gt;

&lt;p&gt;And that's the key idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prompting tells the agent what to do. A harness tells it how to work.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you've spent any time pairing with an AI coding agent, you've probably seen the same problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It forgets your project conventions.&lt;/li&gt;
&lt;li&gt;It touches files it shouldn't.&lt;/li&gt;
&lt;li&gt;It skips important validation.&lt;/li&gt;
&lt;li&gt;It considers a task "done" too early.&lt;/li&gt;
&lt;li&gt;You have to explain the same architecture repeatedly.&lt;/li&gt;
&lt;li&gt;Every new session feels like starting from zero.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So you keep writing prompts like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Remember to use Policies for authorization."&lt;/p&gt;

&lt;p&gt;"Run the tests before you're done."&lt;/p&gt;

&lt;p&gt;"Don't modify unrelated files."&lt;/p&gt;

&lt;p&gt;"Follow our existing service architecture."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These instructions are valuable.&lt;/p&gt;

&lt;p&gt;But they shouldn't have to live in your prompt every time.&lt;/p&gt;

&lt;p&gt;They should live in the &lt;strong&gt;environment around the agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's where an AI harness comes in.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is an AI Harness?
&lt;/h2&gt;

&lt;p&gt;An AI harness is the structured layer around an AI coding agent that defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rules&lt;/strong&gt; — what must always be true.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills&lt;/strong&gt; — how specific engineering tasks should be handled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflows&lt;/strong&gt; — the order in which work should happen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context&lt;/strong&gt; — facts about the current project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt; — roles and authority, when multiple specialized roles are useful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adapters&lt;/strong&gt; — how different coding tools connect to the same harness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model provides the reasoning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The harness provides the discipline.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about a simple task:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Add an endpoint for publishing posts."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Without a harness, the process might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Understand request
↓
Explore project
↓
Guess conventions
↓
Implement
↓
Run some tests
↓
"Done"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a harness:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Identify task
↓
Load relevant rules
↓
Load project context
↓
Select required skills
↓
Follow workflow
↓
Implement smallest change
↓
Validate
↓
Test
↓
Review
↓
Verify requirement
↓
Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference isn't necessarily a smarter model.&lt;/p&gt;

&lt;p&gt;It's a &lt;strong&gt;more reliable operating environment&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prompt vs. Harness
&lt;/h2&gt;

&lt;p&gt;A prompt is ideal for &lt;strong&gt;task-specific intent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A harness is ideal for &lt;strong&gt;persistent engineering knowledge&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plain Prompt&lt;/th&gt;
&lt;th&gt;AI Harness&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Instructions rewritten when needed&lt;/td&gt;
&lt;td&gt;Instructions persist in the project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consistency depends on the prompt&lt;/td&gt;
&lt;td&gt;Same rules across sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project knowledge gets repeated&lt;/td&gt;
&lt;td&gt;Project knowledge is stored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rules and context are often mixed&lt;/td&gt;
&lt;td&gt;Responsibilities are separated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human decides when it's "done"&lt;/td&gt;
&lt;td&gt;Definition of Done can be explicit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Safety depends heavily on instructions&lt;/td&gt;
&lt;td&gt;Approval gates can be defined&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harder to reuse&lt;/td&gt;
&lt;td&gt;Structure can be reused across projects&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For example, instead of writing this every time:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Use Form Requests for validation, Policies for authorization, feature tests for endpoints, don't touch unrelated files, and run &lt;code&gt;php artisan test&lt;/code&gt;."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can store those decisions once.&lt;/p&gt;

&lt;p&gt;Then your actual prompt can remain simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Add an instant-publish button to the post editor."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The harness supplies the engineering context.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture of an AI Harness
&lt;/h2&gt;

&lt;p&gt;A practical harness can look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ai-harness/
├── AGENTS.md        # Entry point / index
├── agents/          # WHO acts
├── skills/          # HOW to handle a concern
├── rules/           # WHAT must always be true
├── workflows/       # IN WHAT ORDER to work
├── context/         # WHAT is true about this project
└── adapters/        # Tool-specific integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These components have different responsibilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agents — WHO
&lt;/h3&gt;

&lt;p&gt;Defines roles and authority.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agents/
├── developer.md
├── reviewer.md
└── debugger.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, a Developer may implement changes while a Reviewer focuses on inspecting them.&lt;/p&gt;

&lt;p&gt;Not every project needs multiple agents. Start with one if that's enough.&lt;/p&gt;




&lt;h3&gt;
  
  
  Skills — HOW
&lt;/h3&gt;

&lt;p&gt;Reusable engineering knowledge.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;skills/
├── testing-strategy.md
├── api-design.md
├── database-design.md
└── code-review.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A testing skill can explain how the project approaches tests, factories, edge cases, and assertions.&lt;/p&gt;




&lt;h3&gt;
  
  
  Rules — WHAT MUST ALWAYS BE TRUE
&lt;/h3&gt;

&lt;p&gt;Rules are constraints.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rules/
├── core-rules.md
├── approval-gates.md
└── definition-of-done.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do not modify unrelated files.

Do not bypass authorization.

Do not introduce unnecessary dependencies.

Do not declare a task complete without validation.

Destructive operations require human approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Workflows — IN WHAT ORDER
&lt;/h3&gt;

&lt;p&gt;A workflow defines the sequence for a type of task.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;workflows/
├── feature-development.md
├── bug-fix.md
└── release.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A feature workflow could be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Understand
↓
Inspect
↓
Plan
↓
Implement
↓
Test
↓
Review
↓
Verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Context — WHAT IS TRUE ABOUT THIS PROJECT
&lt;/h3&gt;

&lt;p&gt;Context contains project-specific facts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;context/
├── project.md
├── architecture.md
├── domain.md
└── conventions.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project.md
→ Laravel 11
→ PHP 8.3
→ MySQL
→ Redis

architecture.md
→ Form Requests
→ Policies
→ Services
→ Feature Tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the part that changes most from project to project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule vs. Skill vs. Workflow vs. Context
&lt;/h2&gt;

&lt;p&gt;One instruction can actually contain four different concepts.&lt;/p&gt;

&lt;p&gt;Take:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Always run tests before finishing."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It can become:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rule:&lt;/strong&gt; A change must be validated before completion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill:&lt;/strong&gt; How to write and run appropriate tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow:&lt;/strong&gt; Validation happens before the task is considered complete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context:&lt;/strong&gt; The project's actual test command is &lt;code&gt;php artisan test&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation is important.&lt;/p&gt;

&lt;p&gt;It prevents one giant instruction file from becoming the place where everything lives.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Laravel CMS Example
&lt;/h2&gt;

&lt;p&gt;Imagine a Laravel CMS with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Posts&lt;/li&gt;
&lt;li&gt;Categories&lt;/li&gt;
&lt;li&gt;Users&lt;/li&gt;
&lt;li&gt;Roles&lt;/li&gt;
&lt;li&gt;Publishing workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repository could look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;laravel-cms/
├── AGENTS.md
├── ai-harness/
│   ├── AGENTS.md
│   ├── agents/
│   ├── skills/
│   ├── rules/
│   │   ├── core-rules.md
│   │   ├── approval-gates.md
│   │   └── definition-of-done.md
│   ├── workflows/
│   ├── context/
│   │   ├── project.md
│   │   ├── architecture.md
│   │   ├── domain.md
│   │   └── conventions.md
│   └── adapters/
├── app/
├── database/
├── tests/
└── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now imagine the task is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Add an instant-publish button for a post from the admin panel."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The harness can guide the agent through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task arrives
↓
Identify task type
↓
Feature Development workflow
↓
Load core Rules
↓
Load relevant Context
↓
Select required Skills
↓
Check Approval Gates
↓
Implement smallest possible change
↓
Run validation
↓
Run tests
↓
Review changes
↓
Verify original requirement
↓
Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that the agent doesn't necessarily need every project document.&lt;/p&gt;

&lt;p&gt;A good harness can instruct it to load &lt;strong&gt;only the context relevant to the task&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For this feature, that might mean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project.md       ✓
architecture.md  ✓
domain.md        ✓
conventions.md   ✓
payments.md      ✗
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact loading behavior depends on the coding tool, but the harness should make the intended boundaries explicit.&lt;/p&gt;




&lt;h2&gt;
  
  
  "Done" Must Be Checkable
&lt;/h2&gt;

&lt;p&gt;One of the biggest benefits of a harness is defining what "done" actually means.&lt;/p&gt;

&lt;p&gt;Creating the button isn't enough.&lt;/p&gt;

&lt;p&gt;The agent should verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ Button exists
✓ Correct users can access it
✓ Authorization is enforced
✓ Post becomes published
✓ Invalid states are handled
✓ Relevant tests pass
✓ No unrelated files were changed
✓ Original requirement is satisfied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's what a:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rules/definition-of-done.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can establish.&lt;/p&gt;

&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Code exists" ≠ "Task is complete."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Approval Gates
&lt;/h2&gt;

&lt;p&gt;Some operations are routine.&lt;/p&gt;

&lt;p&gt;Others are risky.&lt;/p&gt;

&lt;p&gt;Imagine the agent receives:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Delete this category and all its posts."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's potentially destructive.&lt;/p&gt;

&lt;p&gt;The harness can define an approval gate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Potentially destructive operation
↓
Explain impact
↓
Stop
↓
Request human approval
↓
Continue only after approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an important distinction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A good agent shouldn't only know how to continue. It should also know when to stop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whether a particular tool can technically enforce every gate depends on the tool, but the policy itself belongs in the harness.&lt;/p&gt;




&lt;h2&gt;
  
  
  Codex and Cursor
&lt;/h2&gt;

&lt;p&gt;The harness should remain &lt;strong&gt;tool-agnostic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Your engineering rules shouldn't need to change because you switched from Codex to Cursor.&lt;/p&gt;

&lt;p&gt;Only the entry point changes.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Shared AI Harness
                        │
             ┌──────────┴──────────┐
             │                     │
           Codex                 Cursor
             │                     │
        AGENTS.md            .cursor/rules/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex, keep the repository-level &lt;code&gt;AGENTS.md&lt;/code&gt; thin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Laravel CMS — Agent Entry Point&lt;/span&gt;

Before performing engineering work in this repository,
read and follow &lt;span class="sb"&gt;`ai-harness/AGENTS.md`&lt;/span&gt;.

The harness defines the project's:
&lt;span class="p"&gt;-&lt;/span&gt; Agents
&lt;span class="p"&gt;-&lt;/span&gt; Skills
&lt;span class="p"&gt;-&lt;/span&gt; Rules
&lt;span class="p"&gt;-&lt;/span&gt; Workflows
&lt;span class="p"&gt;-&lt;/span&gt; Context

Do not duplicate the harness content here.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Cursor, use its project rules under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.cursor/
└── rules/
    └── harness.mdc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That rule can simply point the agent toward the shared harness.&lt;/p&gt;

&lt;p&gt;The principle is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;One source of truth. Thin tool adapters.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't copy your entire engineering system into both &lt;code&gt;AGENTS.md&lt;/code&gt; and Cursor rules.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Should Each Thing Go?
&lt;/h2&gt;

&lt;p&gt;When you're unsure where an instruction belongs, ask:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Put it in&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;"This must always be true."&lt;/td&gt;
&lt;td&gt;&lt;code&gt;rules/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"This is how we do this."&lt;/td&gt;
&lt;td&gt;&lt;code&gt;skills/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"These steps must happen in this order."&lt;/td&gt;
&lt;td&gt;&lt;code&gt;workflows/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"This is true about this project."&lt;/td&gt;
&lt;td&gt;&lt;code&gt;context/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"This role has specific authority."&lt;/td&gt;
&lt;td&gt;&lt;code&gt;agents/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"This is how Cursor/Codex connects."&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;adapters/&lt;/code&gt; / entry point&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This simple distinction prevents the harness from becoming another giant instruction dump.&lt;/p&gt;




&lt;h2&gt;
  
  
  Start Small
&lt;/h2&gt;

&lt;p&gt;You don't need a huge framework on day one.&lt;/p&gt;

&lt;p&gt;A useful starting point could be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ai-harness/
├── AGENTS.md
├── rules/
│   ├── core-rules.md
│   └── definition-of-done.md
├── workflows/
│   ├── feature-development.md
│   └── bug-fix.md
├── skills/
│   └── testing-strategy.md
└── context/
    ├── project.md
    └── architecture.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then grow it when you notice repetition.&lt;/p&gt;

&lt;p&gt;If you keep explaining the same thing to the agent, &lt;strong&gt;that's a signal that the knowledge probably belongs in the harness.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Takeaways
&lt;/h2&gt;

&lt;p&gt;An AI harness isn't just a bigger prompt.&lt;/p&gt;

&lt;p&gt;It's a structured engineering environment that gives an AI coding agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Consistency&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Project knowledge&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reusable engineering practices&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repeatable workflows&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clear completion criteria&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety boundaries&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal isn't to make the model smarter.&lt;/p&gt;

&lt;p&gt;It's to make the model &lt;strong&gt;more predictable and reliable inside your project&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The strongest principle is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don't put more instructions in the prompt. Put persistent engineering knowledge in the environment around the agent.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Prompting tells the agent &lt;strong&gt;what you want&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Harness engineering tells it &lt;strong&gt;how to work&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that's the real shift:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;From prompting an AI to engineering the environment in which the AI works.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>laravel</category>
      <category>cursor</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Green Framework v2: Modern PHP Framework for Web Development</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Thu, 30 Jul 2026 10:57:03 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/green-framework-v2-modern-php-framework-for-web-development-10l3</link>
      <guid>https://dev.to/yasserelgammal/green-framework-v2-modern-php-framework-for-web-development-10l3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Green Framework&lt;/strong&gt; is a modern and lightweight PHP framework designed to make building web applications and APIs simpler, faster, and more predictable.&lt;/p&gt;

&lt;p&gt;Green focuses on &lt;strong&gt;clean architecture, explicit code, and modern PHP features&lt;/strong&gt; without adding unnecessary complexity.&lt;/p&gt;

&lt;p&gt;Instead of hiding what happens behind the scenes, Green aims to give developers a clear understanding of how their application works.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Why Green?
&lt;/h2&gt;

&lt;p&gt;Green provides the essential tools you need to build modern PHP applications while keeping the framework lightweight and easy to understand.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ Modern PHP
&lt;/h3&gt;

&lt;p&gt;Green takes advantage of modern PHP features such as &lt;strong&gt;Attributes, Reflection, Type Declarations, and modern object-oriented architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, routes can be defined directly inside controllers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="na"&gt;#[Route('GET', '/users/{id}', name: 'users.show')]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s1"&gt;'id'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No separate route file is required for simple controller-based routing.&lt;/p&gt;

&lt;h3&gt;
  
  
  🛣️ Powerful Routing
&lt;/h3&gt;

&lt;p&gt;Green provides an attribute-based routing system powered by &lt;strong&gt;FastRoute&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP methods&lt;/li&gt;
&lt;li&gt;Route parameters&lt;/li&gt;
&lt;li&gt;Named routes&lt;/li&gt;
&lt;li&gt;Route middleware&lt;/li&gt;
&lt;li&gt;Authorization policies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Named routes can also be used to generate URLs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users.show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps your application routing organized and avoids hardcoding URLs throughout your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Lightweight Service Container
&lt;/h2&gt;

&lt;p&gt;Green includes a lightweight &lt;strong&gt;Service Container&lt;/strong&gt; with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency injection&lt;/li&gt;
&lt;li&gt;Auto-wiring&lt;/li&gt;
&lt;li&gt;Bindings&lt;/li&gt;
&lt;li&gt;Singletons&lt;/li&gt;
&lt;li&gt;Explicit instances&lt;/li&gt;
&lt;li&gt;Circular dependency detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;UserTable&lt;/span&gt; &lt;span class="nv"&gt;$users&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dependencies can be resolved automatically through PHP Reflection while still keeping the container simple and predictable.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Centralized Configuration
&lt;/h2&gt;

&lt;p&gt;Green includes a centralized configuration system designed to provide a single, immutable configuration snapshot for the application.&lt;/p&gt;

&lt;p&gt;Configuration can come from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Framework defaults&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config/*.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Application overrides&lt;/li&gt;
&lt;li&gt;Cached configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For production environments, configuration can also be cached:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;green config:cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Green also provides:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;green config:show
green config:clear
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sensitive values such as passwords, tokens, and API keys are automatically redacted when configuration is displayed.&lt;/p&gt;

&lt;h2&gt;
  
  
  🗄️ Database &amp;amp; ORM
&lt;/h2&gt;

&lt;p&gt;One of Green's main architectural decisions is its database layer.&lt;/p&gt;

&lt;p&gt;Instead of putting database logic directly inside models, Green separates &lt;strong&gt;data&lt;/strong&gt; from &lt;strong&gt;persistence&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Table Gateway &amp;amp; Data Mapper
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;Model&lt;/code&gt; represents your data, while the &lt;code&gt;Table&lt;/code&gt; handles database operations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model
  ↓
Data

Table
  ↓
Database Operations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach is based on the &lt;strong&gt;Table Gateway and Data Mapper&lt;/strong&gt; patterns and keeps models free from database logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔎 Fluent Query Builder
&lt;/h3&gt;

&lt;p&gt;Green provides a simple fluent query layer through &lt;code&gt;GreenQuery&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$userTable&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;whereGroup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;
        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'role'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'admin'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;orWhere&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'score'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&amp;gt;='&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;latest&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;where&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;orWhere&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Grouped conditions&lt;/li&gt;
&lt;li&gt;Ordering&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Aggregates&lt;/li&gt;
&lt;li&gt;&lt;code&gt;exists&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;first&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Limits and offsets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The query layer is built on top of Doctrine DBAL while keeping Green's API simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔗 Relations &amp;amp; Eager Loading
&lt;/h3&gt;

&lt;p&gt;Green includes a relation engine supporting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hasOne&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasMany&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;belongsTo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manyToMany&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Relations can be loaded using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$userTable&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nested relations are supported as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$userTable&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts.comments'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Green's eager-loading system is designed to avoid the &lt;strong&gt;N+1 query problem&lt;/strong&gt; by loading related records using optimized &lt;code&gt;WHERE IN (...)&lt;/code&gt; queries and stitching the results together in memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 Include Query Language — IQL
&lt;/h3&gt;

&lt;p&gt;For APIs that need dynamic eager loading, Green introduces &lt;strong&gt;IQL — Include Query Language&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;comments(limit:5,order:desc).author(select:id|name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows API consumers to describe which relations they want and how those relations should be loaded.&lt;/p&gt;

&lt;p&gt;Green parses, validates, and resolves the query before applying it to the underlying database query.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Validation
&lt;/h2&gt;

&lt;p&gt;Green provides a &lt;code&gt;Payload&lt;/code&gt; system for handling validated request data.&lt;/p&gt;

&lt;p&gt;A Payload can handle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data preparation&lt;/li&gt;
&lt;li&gt;Authorization&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;li&gt;Structured validation errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CreateUserPayload&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Payload&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="s1"&gt;'email'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;email&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="s1"&gt;'name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stringType&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;notEmpty&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validation errors are automatically converted into appropriate HTTP responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛡️ Authorization
&lt;/h2&gt;

&lt;p&gt;Green provides an explicit authorization system based on &lt;strong&gt;Policies and an Authorizer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can protect controller actions using Attributes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="na"&gt;#[PolicyAttribute('update', 'post')]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;edit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps authorization rules separate from business logic and makes permissions easier to understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔐 Built-in CSRF Protection
&lt;/h2&gt;

&lt;p&gt;Green includes CSRF protection for state-changing HTTP requests.&lt;/p&gt;

&lt;p&gt;It provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cryptographically secure tokens&lt;/li&gt;
&lt;li&gt;Timing-safe validation&lt;/li&gt;
&lt;li&gt;Single-use tokens&lt;/li&gt;
&lt;li&gt;Token expiration&lt;/li&gt;
&lt;li&gt;Configurable token limits&lt;/li&gt;
&lt;li&gt;Configurable exception paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tokens can be generated for forms and validated automatically through middleware.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 Error &amp;amp; Exception Handling
&lt;/h2&gt;

&lt;p&gt;Green includes a centralized error-handling system capable of handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exceptions&lt;/li&gt;
&lt;li&gt;PHP errors&lt;/li&gt;
&lt;li&gt;Fatal errors&lt;/li&gt;
&lt;li&gt;Structured error records&lt;/li&gt;
&lt;li&gt;Logging&lt;/li&gt;
&lt;li&gt;Error deduplication&lt;/li&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Errors can be returned as either &lt;strong&gt;JSON or HTML&lt;/strong&gt;, depending on the request.&lt;/p&gt;

&lt;p&gt;Stack traces are only exposed when debug mode is enabled.&lt;/p&gt;

&lt;p&gt;This helps keep production applications safer while still providing useful debugging information during development.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌍 Localization
&lt;/h2&gt;

&lt;p&gt;Green includes a localization engine with support for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON translation files&lt;/li&gt;
&lt;li&gt;Database translations&lt;/li&gt;
&lt;li&gt;Locale fallback&lt;/li&gt;
&lt;li&gt;Variable interpolation&lt;/li&gt;
&lt;li&gt;Pluralization&lt;/li&gt;
&lt;li&gt;Arabic plural rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'messages.welcome'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The translation system supports locale fallback such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ar_EG
  ↓
ar
  ↓
fallback locale
  ↓
default locale
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Green also provides first-class support for Arabic localization.&lt;/p&gt;

&lt;h2&gt;
  
  
  📁 Drive Storage
&lt;/h2&gt;

&lt;p&gt;Green provides a filesystem abstraction called &lt;strong&gt;Drive&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It supports operations such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The storage system supports multiple drivers and can be extended with custom drivers.&lt;/p&gt;

&lt;p&gt;It also includes security protections against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Directory traversal&lt;/li&gt;
&lt;li&gt;Null-byte injection&lt;/li&gt;
&lt;li&gt;Invalid control characters&lt;/li&gt;
&lt;li&gt;Root escape through symlinks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Testing storage operations is also possible through an in-memory fake driver.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Cache
&lt;/h2&gt;

&lt;p&gt;Green provides a cache abstraction supporting multiple drivers, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;li&gt;Array&lt;/li&gt;
&lt;li&gt;Database&lt;/li&gt;
&lt;li&gt;Redis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can use the &lt;code&gt;remember()&lt;/code&gt; pattern to retrieve or calculate cached values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;getUsers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps caching logic independent from the underlying storage implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  📡 Signals — Event System
&lt;/h2&gt;

&lt;p&gt;Green includes a lightweight event system called &lt;strong&gt;Signals&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Listeners can subscribe using Attributes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="na"&gt;#[Signal('user.registered')]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;UserRegistered&lt;/span&gt; &lt;span class="nv"&gt;$event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Events can be dispatched simply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user.registered'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This provides a clean way to decouple application components and react to domain events.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌐 External API Integrations
&lt;/h2&gt;

&lt;p&gt;Green includes the &lt;strong&gt;Connect&lt;/strong&gt; subsystem for consuming external HTTP APIs.&lt;/p&gt;

&lt;p&gt;It is built on top of Guzzle and encourages keeping API communication inside dedicated service objects.&lt;/p&gt;

&lt;p&gt;This helps keep external API logic isolated from controllers and business logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧱 Middleware Pipeline
&lt;/h2&gt;

&lt;p&gt;Green uses an &lt;strong&gt;Onion-style middleware pipeline&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A request moves through middleware before reaching the controller and then travels back through the same pipeline when a response is returned.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request
   ↓
Middleware
   ↓
Middleware
   ↓
Controller
   ↓
Response
   ↓
Middleware
   ↓
Middleware
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes authentication, authorization, logging, CORS, CSRF, and other request-level concerns easier to organize.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Explicit by Design
&lt;/h2&gt;

&lt;p&gt;Green follows a few simple principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Explicit over Magic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal Core&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Predictable Runtime Behavior&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clean Separation of Responsibilities&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extensible Architecture&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modern PHP&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low Unnecessary Complexity&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to replace every tool in the PHP ecosystem.&lt;/p&gt;

&lt;p&gt;The goal is to provide a clean foundation that gives developers the tools they need without forcing them into unnecessary abstractions.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Installation
&lt;/h2&gt;

&lt;p&gt;You can create a new Green Framework project using Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer create-project yasser-elgammal/green app-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then start building your application using modern PHP and Green's lightweight architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  📚 Documentation &amp;amp; Source Code
&lt;/h2&gt;

&lt;p&gt;The Green Framework documentation and source code are available on GitHub.&lt;/p&gt;

&lt;p&gt;You can explore the architecture, read the documentation, open issues, suggest improvements, or contribute to the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  💚 Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Green Framework v2&lt;/strong&gt; has grown from a simple PHP framework into a modern foundation for building web applications and APIs.&lt;/p&gt;

&lt;p&gt;It combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modern PHP&lt;/li&gt;
&lt;li&gt;Attribute-based routing&lt;/li&gt;
&lt;li&gt;Dependency injection&lt;/li&gt;
&lt;li&gt;Centralized configuration&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;li&gt;Authorization&lt;/li&gt;
&lt;li&gt;CSRF protection&lt;/li&gt;
&lt;li&gt;Localization&lt;/li&gt;
&lt;li&gt;Storage&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;API integrations&lt;/li&gt;
&lt;li&gt;Table Gateway ORM&lt;/li&gt;
&lt;li&gt;Fluent queries&lt;/li&gt;
&lt;li&gt;Relations and eager loading&lt;/li&gt;
&lt;li&gt;Advanced Include Queries&lt;/li&gt;
&lt;li&gt;Centralized error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;while keeping its original philosophy:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Build with less magic. Understand more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Green is for developers who want a framework that helps them move fast without making the code harder to understand.&lt;/p&gt;

</description>
      <category>php</category>
      <category>phpframework</category>
      <category>greenframework</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Google Gemini Integration for Laravel: Simple, Clean, and Lightweight</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Wed, 17 Jun 2026 20:53:50 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/google-gemini-integration-for-laravel-simple-clean-and-lightweight-42ac</link>
      <guid>https://dev.to/yasserelgammal/google-gemini-integration-for-laravel-simple-clean-and-lightweight-42ac</guid>
      <description>&lt;h1&gt;
  
  
  Simplifying Google Gemini Integration in Laravel
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;AI&lt;/strong&gt; is becoming a core part of modern applications, from content generation and chat experiences to intelligent assistants and automation.&lt;/p&gt;

&lt;p&gt;For Laravel applications that only need Google Gemini, a lightweight and dedicated integration can provide a simpler developer experience.&lt;/p&gt;

&lt;p&gt;"laravel-gemini" is a Laravel package that provides a clean way to interact with the Google Gemini API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Simple text generation&lt;/li&gt;
&lt;li&gt;Chat-style conversations&lt;/li&gt;
&lt;li&gt;Raw Gemini API access&lt;/li&gt;
&lt;li&gt;Normalized responses&lt;/li&gt;
&lt;li&gt;Facade and Dependency Injection support&lt;/li&gt;
&lt;li&gt;Laravel configuration and ".env" support&lt;/li&gt;
&lt;li&gt;Custom generation options per request&lt;/li&gt;
&lt;li&gt;Exception handling&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require yasser-elgammal/laravel-gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;YasserElgammal\LaravelGemini\Facades\Gemini&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Gemini&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Explain Laravel service providers'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Chat Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Gemini&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s1"&gt;'role'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'user'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'content'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Hello Gemini'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Visit the Package on GitHub
&lt;/h2&gt;

&lt;p&gt;Check out the source code, documentation, and contribute to the project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yasserelgammal/laravel-gemini" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Laravel Compatibility
&lt;/h2&gt;

&lt;p&gt;The package supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laravel 10&lt;/li&gt;
&lt;li&gt;Laravel 11&lt;/li&gt;
&lt;li&gt;Laravel 12&lt;/li&gt;
&lt;li&gt;Laravel 13&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;with PHP 8.1+.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;Currently, the documentation is available through the README, covering the core usage and examples. More production-level examples and best practices will be added in future updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback &amp;amp; Contributions
&lt;/h2&gt;

&lt;p&gt;Feedback, issues, and contributions are always welcome. The goal is to make integrating Google Gemini into Laravel applications as simple and enjoyable as possible.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>Green Framework: Simple &amp; Modern PHP Framework for Fast Development</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Tue, 07 Apr 2026 00:25:58 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/green-framework-simple-modern-php-framework-for-fast-development-g0f</link>
      <guid>https://dev.to/yasserelgammal/green-framework-simple-modern-php-framework-for-fast-development-g0f</guid>
      <description>&lt;p&gt;&lt;strong&gt;Green Framework&lt;/strong&gt; is a simple and modern PHP framework built to make development faster and easier.&lt;/p&gt;

&lt;p&gt;It focuses on clean code and uses modern PHP features like &lt;strong&gt;Attributes&lt;/strong&gt;, so you can define things like routes directly inside your controllers without extra files.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Why use Green?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Simple and lightweight
&lt;/li&gt;
&lt;li&gt;Clean and readable code
&lt;/li&gt;
&lt;li&gt;Fast to build with
&lt;/li&gt;
&lt;li&gt;Great for small to medium projects
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚡ Installation
&lt;/h2&gt;

&lt;p&gt;You can install &lt;strong&gt;Green Framework&lt;/strong&gt; using Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer create-project yasser-elgammal/green
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📚 Documentation
&lt;/h2&gt;

&lt;p&gt;You can view the full documentation and explore the project on GitHub:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/YasserElgammal/green" rel="noopener noreferrer"&gt;Project link on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to explore the code, open issues, or contribute to the project 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Conclusion
&lt;/h3&gt;

&lt;p&gt;Green Framework is a good choice if you want a clean and simple way to build modern PHP applications without unnecessary complexity.&lt;/p&gt;

</description>
      <category>php</category>
      <category>programming</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Introducing a Rate Limiter Library for Go</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Sun, 18 Jan 2026 22:41:52 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/introducing-a-rate-limiter-library-for-go-42nf</link>
      <guid>https://dev.to/yasserelgammal/introducing-a-rate-limiter-library-for-go-42nf</guid>
      <description>&lt;p&gt;In modern backend systems, &lt;strong&gt;rate limiting&lt;/strong&gt; is essential.&lt;br&gt;&lt;br&gt;
Without it, APIs are exposed to abuse, resource exhaustion, and unfair usage.&lt;/p&gt;

&lt;p&gt;That’s why I built a &lt;strong&gt;production-ready, thread-safe rate limiter library in Go&lt;/strong&gt;, based on the &lt;strong&gt;Token Bucket algorithm&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Token Bucket?
&lt;/h2&gt;

&lt;p&gt;I chose the Token Bucket algorithm because it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows controlled &lt;strong&gt;bursts of traffic&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Provides &lt;strong&gt;smooth request flow&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Is widely used in production systems&lt;/li&gt;
&lt;li&gt;Is simple to understand and reason about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each client gets a bucket of tokens that refills over time.&lt;br&gt;&lt;br&gt;
Requests consume tokens — once the bucket is empty, requests are rejected.&lt;/p&gt;




&lt;h2&gt;
  
  
  Library Highlights
&lt;/h2&gt;

&lt;p&gt;This library focuses on correctness and simplicity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production-ready &amp;amp; thread-safe&lt;/li&gt;
&lt;li&gt;Token Bucket algorithm with burst support&lt;/li&gt;
&lt;li&gt;Fast in-memory storage&lt;/li&gt;
&lt;li&gt;Detailed rate limit results (remaining, retry-after, reset time)&lt;/li&gt;
&lt;li&gt;Extensive unit tests and race-condition testing&lt;/li&gt;
&lt;li&gt;Optional cleanup for stale entries&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Quick Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;limiter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Rate&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;     &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Second&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Burst&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;    &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;store&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewMemoryStore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Minute&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;rateLimiter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;limiter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewTokenBucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rateLimiter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Allow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"user123"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Request allowed"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With just a few lines, you get a reliable rate limiter ready for production.&lt;/p&gt;




&lt;h2&gt;
  
  
  Perfect For
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Go microservices&lt;/li&gt;
&lt;li&gt;Public-facing services&lt;/li&gt;
&lt;li&gt;Internal tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anything that needs &lt;strong&gt;fair and controlled request handling&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Open Source
&lt;/h2&gt;

&lt;p&gt;The project is open source under the MIT license and open for contributions.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/yasserelgammal/rate-limiter" rel="noopener noreferrer"&gt;https://github.com/yasserelgammal/rate-limiter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find it useful, feel free to leave a ⭐️&lt;br&gt;&lt;br&gt;
It really helps support open-source work.&lt;/p&gt;

</description>
      <category>go</category>
      <category>opensource</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding Technical Debt in Modern Software Development</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Thu, 15 Jan 2026 19:15:10 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/understanding-technical-debt-in-modern-software-development-19id</link>
      <guid>https://dev.to/yasserelgammal/understanding-technical-debt-in-modern-software-development-19id</guid>
      <description>&lt;p&gt;&lt;strong&gt;Technical Debt&lt;/strong&gt; is one of the most important concepts in software engineering and product development. It refers to the &lt;strong&gt;future cost&lt;/strong&gt; created when development teams choose quick, temporary, or sub-optimal solutions instead of implementing the best long-term approach.&lt;/p&gt;

&lt;p&gt;This article explains the meaning of technical debt, why it happens, its risks, and best practices to manage it effectively.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Technical Debt? — Definition
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Technical Debt&lt;/strong&gt; is the “extra work” a team will have to do later because they took shortcuts during development.&lt;/p&gt;

&lt;p&gt;Just like financial debt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You borrow time now (by coding quickly)&lt;/li&gt;
&lt;li&gt;You pay back more time later (due to fixes, refactoring, bugs)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Technical Debt Happen?
&lt;/h2&gt;

&lt;p&gt;Technical debt is not always caused by mistakes—it often results from business needs. Common causes include:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Tight deadlines
&lt;/h3&gt;

&lt;p&gt;Teams prioritize delivery speed over clean architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Changing requirements
&lt;/h3&gt;

&lt;p&gt;Unclear or shifting requirements lead to temporary solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Legacy systems
&lt;/h3&gt;

&lt;p&gt;Old technologies and outdated code create unavoidable debt.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Lack of testing
&lt;/h3&gt;

&lt;p&gt;Skipping automated tests increases future risks.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Quick fixes
&lt;/h3&gt;

&lt;p&gt;Temporary patches remain longer than expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  Examples of Technical Debt
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hard-to-read or unmaintainable code
&lt;/li&gt;
&lt;li&gt;Missing documentation
&lt;/li&gt;
&lt;li&gt;Poor architecture or structure
&lt;/li&gt;
&lt;li&gt;Using deprecated libraries
&lt;/li&gt;
&lt;li&gt;Duplicated logic
&lt;/li&gt;
&lt;li&gt;Large modules without clear separation
&lt;/li&gt;
&lt;li&gt;No automated testing
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These issues may not break the system today, but they slow development dramatically over time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Technical Debt Matters (Business Impact)
&lt;/h2&gt;

&lt;p&gt;Technical debt has a direct impact on product quality and delivery speed:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Slower development
&lt;/h3&gt;

&lt;p&gt;New features take longer because the codebase becomes harder to modify.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. More bugs
&lt;/h3&gt;

&lt;p&gt;Quick solutions often introduce hidden issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Higher maintenance cost
&lt;/h3&gt;

&lt;p&gt;Developers spend more time fixing issues than building features.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reduced system stability
&lt;/h3&gt;

&lt;p&gt;Legacy components become fragile.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Lower team morale
&lt;/h3&gt;

&lt;p&gt;Developers become frustrated when working with messy or outdated code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is Technical Debt Always Bad?
&lt;/h2&gt;

&lt;p&gt;No, sometimes it’s &lt;strong&gt;strategic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Teams may intentionally take technical debt to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Release an MVP quickly
&lt;/li&gt;
&lt;li&gt;Validate an idea
&lt;/li&gt;
&lt;li&gt;Meet urgent business requirements
&lt;/li&gt;
&lt;li&gt;Beat a competitor to market
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But like real debt, it must be &lt;strong&gt;tracked and repaid&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Manage and Reduce Technical Debt
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Plan regular refactoring
&lt;/h3&gt;

&lt;p&gt;Allocate time each sprint for code improvements.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Enforce clean code standards
&lt;/h3&gt;

&lt;p&gt;Use style guides, naming conventions, and architecture rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Write automated tests
&lt;/h3&gt;

&lt;p&gt;Unit tests, integration tests, and CI pipelines reduce long-term risk.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Track technical debt
&lt;/h3&gt;

&lt;p&gt;Use backlog items, documentation, or dashboards.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Educate stakeholders
&lt;/h3&gt;

&lt;p&gt;Explain the business impact of unmanaged technical debt.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Avoid “quick fixes” mentality
&lt;/h3&gt;

&lt;p&gt;Make temporary solutions clearly documented and time-boxed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Technical Debt is a natural part of any software project. It becomes dangerous only when ignored.&lt;br&gt;&lt;br&gt;
By understanding its causes and actively managing it through refactoring, testing, and good engineering practices, teams can build scalable, stable, and future-proof systems.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>performance</category>
      <category>softwareengineering</category>
      <category>software</category>
    </item>
    <item>
      <title>Boost Your Laravel Productivity with “Laravel Debug Remover” VSCode Extension</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Tue, 18 Nov 2025 23:07:59 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/boost-your-laravel-productivity-with-laravel-debug-remover-vscode-extension-154g</link>
      <guid>https://dev.to/yasserelgammal/boost-your-laravel-productivity-with-laravel-debug-remover-vscode-extension-154g</guid>
      <description>&lt;p&gt;Debugging with &lt;code&gt;dd()&lt;/code&gt; is part of every Laravel developer’s workflow.&lt;br&gt;
But forgetting a debug statement inside a controller or Blade file can break production or interrupt API responses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Laravel Debug Remover&lt;/strong&gt; automatically scans and removes all &lt;code&gt;dd()&lt;/code&gt; debug statements from your PHP and Blade files.&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Two Modes
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current File&lt;/strong&gt; – Cleans debug statements only in the file you're working on
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entire Workspace&lt;/strong&gt; – Scans and cleans your whole project&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Smart Exclusions
&lt;/h4&gt;

&lt;p&gt;Automatically skips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vendor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;node_modules&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;storage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bootstrap/cache&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can customize the ignored folders from the extension settings.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fully Configurable
&lt;/h4&gt;

&lt;p&gt;Add your own directory exclusions via &lt;code&gt;settings.json&lt;/code&gt;.&lt;br&gt;
Perfect for large Laravel or monolithic codebases.&lt;/p&gt;

&lt;h4&gt;
  
  
  High Performance
&lt;/h4&gt;

&lt;p&gt;Fast and optimized scanning — ideal for projects with hundreds of files.&lt;/p&gt;




&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Press &lt;strong&gt;CTRL + P&lt;/strong&gt; and choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Remove all debug statements (Current File)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Remove all debug statements (Entire Workspace)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Supports Both PHP &amp;amp; Blade
&lt;/h3&gt;

&lt;p&gt;Blade templates are parsed safely without breaking UI or logic.&lt;br&gt;
The extension intelligently handles both PHP and Blade syntaxes.&lt;/p&gt;




&lt;h3&gt;
  
  
  Download
&lt;/h3&gt;

&lt;p&gt;📥 &lt;strong&gt;VSCode Marketplace:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=6233c1c4-89f3-48cf-8c88-156b07876860.laravel-debug-remover" rel="noopener noreferrer"&gt;Download from VSCode Marketplace&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;This extension solves a common and painful issue every Laravel developer faces.&lt;br&gt;
If it prevents a production mistake or speeds up your workflow, then it has achieved its goal.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>softwaredevelopment</category>
      <category>laravel</category>
    </item>
    <item>
      <title>Introducing Lara SMS – A Flexible Laravel SMS Gateway Package</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Fri, 24 Oct 2025 16:44:11 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/introducing-lara-sms-a-flexible-laravel-sms-gateway-package-2gd1</link>
      <guid>https://dev.to/yasserelgammal/introducing-lara-sms-a-flexible-laravel-sms-gateway-package-2gd1</guid>
      <description>&lt;p&gt;I’m excited to introduce my new Laravel package, Lara SMS, designed to make SMS integration in Laravel projects easier, cleaner, and more flexible.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;💡 Why Lara SMS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Integrating SMS gateways can often be repetitive and inconsistent across projects.&lt;br&gt;
Lara SMS provides a unified and expressive API that allows you to send messages through multiple gateways, all while keeping your codebase elegant and maintainable.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;⚙️ Key Features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Multi-provider support&lt;br&gt;
Built using the Strategy Pattern, allowing seamless integration with multiple SMS gateways.&lt;/p&gt;

&lt;p&gt;✅ Fluent Builder&lt;br&gt;
Provides a clean and expressive syntax for message construction using a chainable, fluent interface.&lt;/p&gt;

&lt;p&gt;✅ Fallback Strategies&lt;br&gt;
Choose between “Try All” or “Fail Fast” approaches when handling failed gateway attempts.&lt;/p&gt;

&lt;p&gt;✅ Automatic Retries&lt;br&gt;
Automatically retries sending messages on temporary failures to ensure reliability.&lt;/p&gt;

&lt;p&gt;✅ Comprehensive Logging&lt;br&gt;
Tracks and logs all SMS operations for better monitoring and debugging.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;🧩 Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the package via Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require yasser-elgammal/lara-sms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;🧠 Behind the Scenes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project taught me a lot about designing scalable and extendable Laravel packages, particularly around architectural design patterns like Strategy and Builder.&lt;/p&gt;

&lt;p&gt;My goal was to create something that’s both powerful and developer-friendly, making SMS workflows in Laravel projects smoother than ever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 GitHub:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/yasserelgammal/lara-sms" rel="noopener noreferrer"&gt;https://github.com/yasserelgammal/lara-sms&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;💬 Feedback Welcome&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m always open to feedback, ideas, and contributions.&lt;br&gt;
If Lara SMS helps simplify your workflow or if you have suggestions for improvement, I’d love to hear from you!&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>github</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Monitor and Save Server Disk Space in Laravel</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Wed, 10 Sep 2025 16:59:07 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/how-to-monitor-and-save-server-disk-space-in-laravel-52g9</link>
      <guid>https://dev.to/yasserelgammal/how-to-monitor-and-save-server-disk-space-in-laravel-52g9</guid>
      <description>&lt;p&gt;When working on &lt;strong&gt;Laravel projects&lt;/strong&gt;, it’s important to keep an eye on your server’s storage usage. Large folders can easily go unnoticed until your server starts running out of space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s a small Laravel helper that:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calculates the size of each folder inside &lt;code&gt;storage/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Displays both raw size (bytes) and a &lt;strong&gt;human-readable format&lt;/strong&gt; (KB / MB / GB).&lt;/li&gt;
&lt;li&gt;Allows sorting results &lt;strong&gt;ascending or descending&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This helps a lot when monitoring a live server, so you can quickly find which folders are consuming the most space.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Full code:&lt;/strong&gt; 👇&lt;br&gt;
👉 &lt;a href="https://gist.github.com/YasserElgammal/8629ce93ce9f8b6e9afba89cf7a756f1" rel="noopener noreferrer"&gt;View the code on Gist&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚡ This is a lightweight utility, but it can save you time and help keep your servers clean.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The code works starting from &lt;strong&gt;Laravel 10+&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;This is just a &lt;strong&gt;small idea&lt;/strong&gt;, and of course, it’s open for customization or further development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🙏 If you found this useful, share it with your network it might save someone else hours of debugging or running out of server space.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why Should You Use Traits in PHP? - 5 Reasons</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:23:47 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/why-should-you-use-traits-in-php-5-reasons-3b13</link>
      <guid>https://dev.to/yasserelgammal/why-should-you-use-traits-in-php-5-reasons-3b13</guid>
      <description>&lt;h3&gt;
  
  
  Introduction:
&lt;/h3&gt;

&lt;p&gt;In PHP, traits are a powerful tool for reusing code across different classes. They help you keep your codebase clean, flexible, and easy to maintain, &lt;strong&gt;Here are five key reasons to use them:&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Reuse code in multiple classes without copying it
&lt;/h3&gt;

&lt;p&gt;Traits let you write a method once and use it in many classes, so you don’t have to duplicate the same logic everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Avoid single inheritance limit
&lt;/h3&gt;

&lt;p&gt;Since PHP only allows one parent class, traits give you a way to add functionality from multiple sources at the same time.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Keep code DRY (Don’t Repeat Yourself)
&lt;/h3&gt;

&lt;p&gt;Putting shared methods in a trait ensures you write them once and reuse them, reducing the chance of mistakes or inconsistencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Mix behaviors into unrelated classes
&lt;/h3&gt;

&lt;p&gt;Traits allow you to add the same features to classes that are not related in the inheritance hierarchy.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Easy to maintain
&lt;/h3&gt;

&lt;p&gt;If you need to update a shared method, you just change it in the trait, and all classes using it automatically get the update.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;PHP traits let you share and reuse methods across multiple unrelated classes, bypassing the single inheritance limit. They help keep code DRY by centralizing common logic, making it easier to maintain—any change in the trait applies to all classes using it.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>How to Structure Your Tests Using AAA (Arrange / Act / Assert)</title>
      <dc:creator>Yasser Elgammal</dc:creator>
      <pubDate>Sat, 02 Aug 2025 06:27:45 +0000</pubDate>
      <link>https://dev.to/yasserelgammal/how-to-structure-your-tests-using-aaa-arrange-act-assert-17j4</link>
      <guid>https://dev.to/yasserelgammal/how-to-structure-your-tests-using-aaa-arrange-act-assert-17j4</guid>
      <description>&lt;p&gt;When writing Unit or Feature tests in Laravel, one of the most effective ways to keep your tests clean and easy to follow is by using the &lt;strong&gt;AAA pattern&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AAA?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AAA&lt;/strong&gt; stands for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arrange&lt;/strong&gt; : Set up your data and dependencies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Act&lt;/strong&gt; : Execute the behavior or function you want to test&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assert&lt;/strong&gt; : Verify that the result matches your expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This &lt;strong&gt;structure&lt;/strong&gt; makes your &lt;strong&gt;tests&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to read&lt;/li&gt;
&lt;li&gt;Easier to maintain&lt;/li&gt;
&lt;li&gt;Easier to debug&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Use AAA?
&lt;/h2&gt;

&lt;p&gt;It helps you avoid writing "messy" tests where setup, execution, and assertions are all mixed together.&lt;/p&gt;

&lt;p&gt;By clearly separating the 3 phases of testing, you're more likely to catch bugs early, understand what each test is doing at a glance, and maintain consistency across your codebase.&lt;/p&gt;




&lt;h2&gt;
  
  
  Laravel Example
&lt;/h2&gt;

&lt;p&gt;Here’s a simple &lt;code&gt;Feature Test&lt;/code&gt; example following the AAA pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;test_run_todo_show&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Arrange&lt;/span&gt;
    &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Act&lt;/span&gt;
    &lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/todos/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Assert&lt;/span&gt;
    &lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;assertStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;assertViewIs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'todos.show'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;assertSee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The AAA pattern stands for Arrange, Act, Assert.&lt;br&gt;
It separates test setup, execution, and verification for clarity and maintainability.&lt;br&gt;
This structure improves readability, consistency, and debugging.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>laravel</category>
      <category>tutorial</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
