GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cloverphp/framework: Clover PHP Framework.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src/Framework
src/Framework
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.env.example
.env.example
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
phpstan.neon
phpstan.neon
 
 
phpunit.xml
phpunit.xml
 
 
pint.json
pint.json
 
 
rector.php
rector.php
 
 

Repository files navigation

Clover PHP Clover PHP is a modern, unopinionated, and lightweight Express.js-style framework for PHP 8.4. It helps you build REST APIs, web apps, and microservices with the simplicity of Express.js and the power of modern PHP.

Tests Packagist Version Packagist Dependency Version Packagist License Packagist Downloads Packagist Stars


✨ Features

šŸš€ Minimal & Fast – Simple API design, inspired by Express.js.

⚔ Async Support – Built with PHP Fibers & AMPHP for non-blocking I/O.

šŸ—‚ļø Routing System – Intuitive get(), post(), etc., with async router support.

šŸ”‘ Auth Ready – Supports sessions, cookies, and JWT-based authentication.

🧩 Extensible Middleware – Add global and route-level middleware for logging, security, and validation.

šŸ’¾ Database Agnostic – Works with both SQL and NoSQL databases.(Upcoming)

šŸ› ļø MVC Support – Controllers, models, and views with interfaces for clean architecture.

šŸ›”ļø Error Handling & Logging – Developer-friendly error responses and logging tools.

šŸŽØ Unopinionated – Flexible enough for small apps or large enterprise projects.

šŸ“¦ Composer & PSR-12 – Modern PHP practices with full Composer/PSR-12 compliance.


šŸ“¦ Installation

composer create-project cloverphp/clover my-app
cd my-app
php -S localhost:3000 -t public

šŸš€ Quick Start

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Clover\Clover;
use Clover\Http\Request;
use Clover\Http\Response;

$app = new Clover();
$router = $app->router();

// Home route
$router->get("/", fn(Request $req, Response $res) =>
$res->send("<h1>Welcome to šŸ€ Clover PHP!</h1>"));

$router->post("/", fn(Request $req, Response $res) =>
    $res->json(['name' => 'Clover PHP!'])
);

$app->run(3000, true);

šŸ“‚ Project Structure

my-app/
ā”œā”€ā”€ app/
│   ā”œā”€ā”€ Controllers/
│   ā”œā”€ā”€ Models/
│   └── Views/
ā”œā”€ā”€ public/
│   └── index.php
ā”œā”€ā”€ vendor/
ā”œā”€ā”€ composer.json
└── README.md

šŸ”‘ Example Middleware

$app->use(function (Request $req, Response $res, callable $next) {
    $res->setHeader("X-Powered-By", "Clover PHP");
    $next($req, $res);
});

šŸ›”ļø License

Clover PHP is open-sourced software licensed under the Packagist License


About

Clover PHP Framework.

Topics

clovercloverphpframeworkmiddlewarerest-apiroutingunopinionated

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.