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

v0.0.6 2025-10-13 08:03 UTC

This package is auto-updated.

Last update: 2025-10-13 12:18:16 UTC


README

🧊 Flake

Flake Framework Logo

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 .