iescarro / flake
A minimal PHP microframework inspired by Express.js
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 1
pkg:composer/iescarro/flake
Requires
- php: >=8.0
README
π§ Flake
A minimal PHP microframework inspired by Express.js β simple, fast, and easy to extend.
π Installation
Before you start, make sure you have PHP β₯ 8.1 and Composer installed.
mkdir myapp
cd myapp
composer init
composer require iescarro/flake
π§© Quick Start
Create an index.php file:
<?php require __DIR__ . '/vendor/autoload.php'; use Flake\Router; use Flake\App; Router::get('/', function ($req, $res) { $res->send('Hello, world!'); }); App::run();
Then start the local server:
php -S localhost:8000
Open your browser at π http://localhost:8000
You should see βHello, world!β
βοΈ Features
- π¦ Express-style routing β Simple Router::get(), Router::post(), etc.
- π‘ Minimal core β Focused on speed, readability, and flexibility.
- π§± Extensible β Add your own middleware, handlers, or modules.
- π§° No configuration required β Works out of the box.
π§ Example Routes
Router::get('/hello/:name', function ($req, $res) { $name = $req->params['name'] ?? 'Guest'; $res->send("Hello, $name!"); }); Router::post('/data', function ($req, $res) { $res->json(['received' => $req->body]); });
π Learn More
Visit the Wiki β Home for deeper examples.
- Routing and middleware
- JSON responses
- Request and response objects
- Error handling and custom middleware
π§βπ» Contributing
Contributions, issues, and feature requests are welcome!
Feel free to open a discussion or pull request .
π License
Released under the MIT License
Copyright Β© 2025 FlakePHP .