π Clover PHP
Clover PHP is a modern, unopinionated, and lightweight Express.js-style framework for 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.
β¨ 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 Developed by @CodeWithSushil.
Pinned Loading
-
clover clover Public
π Clover PHP: a modern, unopinionated, and lightweight framework.
-
framework framework Public
Clover PHP Framework.
PHP 1
Repositories
Showing 10 of 15 repositories-
framework
Public
Clover PHP Framework.
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/framework's past year of commit activity PHP 1 MIT 0 0 4 Updated Nov 29, 2026 -
clover
Public
π Clover PHP: a modern, unopinionated, and lightweight framework.
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/clover's past year of commit activity PHP 1 MIT 1 0 0 Updated Oct 25, 2026 -
.github
Public
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/.github's past year of commit activity 1 0 0 0 Updated Oct 10, 2025 -
clover-http
Public
Clover HTTP
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/clover-http's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 8, 2025 -
Proxy
Public
Proxy server
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/Proxy's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 6, 2025 -
socket
Public
Web socket: Realtime communication with Client and Server.
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/socket's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 3, 2025 -
Router
Public
Clover Router
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/Router's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 3, 2025 -
sketch
Public
Clover Sketch: Template Engine; fully inspire by Vue.js and Laravel Blade.
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/sketch's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 3, 2025 -
clover-cache
Public
Clover π Cache
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/clover-cache's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 3, 2025 -
clover-cookie
Public
πͺ cookie
Uh oh!
There was an error while loading. Please reload this page.
cloverphp/clover-cookie's past year of commit activity PHP 1 MIT 0 0 0 Updated Oct 3, 2025
People
Top languages
Loadingβ¦
Uh oh!
There was an error while loading. Please reload this page.
Most used topics
Loadingβ¦
Uh oh!
There was an error while loading. Please reload this page.