PHPackages                             nader/lily - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. nader/lily

ActiveProject[Framework](/categories/framework)

nader/lily
==========

An elegant, zero-dependency, PSR-4 MVC framework.

v0.1.0(1mo ago)130↓85.7%MITC++PHP ^8.2

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/nadermkhan/lily)[ Packagist](https://packagist.org/packages/nader/lily)[ RSS](/packages/nader-lily/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

The Lily Framework
==================

[](#the-lily-framework)

Lily is a robust, zero-dependency, PSR-4 compliant PHP MVC framework engineered from the ground up to embrace modern architectural paradigms while remaining incredibly lightweight. It provides the elegance of large frameworks without the bloat of hundreds of third-party Composer packages.

Installation
------------

[](#installation)

You can create a new Lily project instantly using Composer. Even though Lily relies on **zero** external dependencies, we use Composer for quick scaffolding:

```
composer create-project nader/lily my-app
cd my-app
php lily serve
```

*(Note: The setup process automatically generates your `.htaccess`, `nginx.conf`, and `web.config` files!)*

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2

Architecture &amp; Features
---------------------------

[](#architecture--features)

- **Zero Dependencies**: Lily does not rely on any third-party packages in its core. It uses a blazing fast, custom native autoloader.
- **Inversion of Control**: Centralized Dependency Injection Container managing class instantiation and singleton bindings.
- **Strict HTTP Abstraction**: Isolation of all superglobals (`$_GET`, `$_POST`, etc.) into robust `Request` and `Response` objects.
- **Middleware Pipeline**: Onion-architecture HTTP Kernel pipeline for filtering requests.
- **Stems**: An elegant, native alternative to Facades, allowing static-like access to DI container instances.
- **Zero-Dependency Job Queue**: A native, asynchronous, file-based job queue worker (`php lily queue:work`).
- **Bolt Authentication**: A blisteringly fast API Authentication engine (like Laravel Sanctum) that uses OPcache flat-file arrays for zero-DB token verification.
- **HotEyes Telemetry**: An advanced, stealth client-side tracking and anomaly detection engine that intercepts VPN/Proxy attacks and Hardware-Bound Session hijacking.
- **Database Schema Auto-Diffing**: Define schema via PHP 8 `#[Column]` attributes, and let `php lily migrate:diff` automatically compare your models to your SQLite database and generate the migration files.
- **SSE Hot-Reload Dev Server**: Instantly refreshes your browser when you save any file during development.

Directory Structure
-------------------

[](#directory-structure)

- `app/` - Application logic (Controllers, Models, Middleware, Providers).
- `src/` - Core Framework Logic (Lily Kernel).
- `public/` - Front Controller &amp; Assets.
- `tests/` - QA and unit tests.

Routing
-------

[](#routing)

Define routes elegantly in `routes/routes.php` using the `Route` Stem, which proxies static calls to the underlying Router instance:

```
use Lily\Support\Stems\Route;
use App\Controllers\HomeController;
use Lily\Http\Request;
use Lily\Http\Response;

// Basic routing
Route::get('/', [HomeController::class, 'index']);

// Subdomain routing
Route::on('api.*')->post('/data', function (Request $request) {
    return new Response('API Endpoint');
});
```

Dependency Injection
--------------------

[](#dependency-injection)

Bindings can be configured within Service Providers inside the `app/Providers` directory. The container supports auto-resolution via reflection.

```
$app->singleton(MyService::class, fn($app) => new MyService());
$service = $app->get(MyService::class);
```

CLI Console
-----------

[](#cli-console)

Lily includes an integrated command-line tool `lily` for automation and scaffolding.

### Usage

[](#usage)

```
php lily serve
php lily config:generate
php lily make:controller UserController
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

49d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/121413309?v=4)[Nader Mahbub Khan](/maintainers/nadermkhan)[@nadermkhan](https://github.com/nadermkhan)

---

Top Contributors

[![nadermkhan](https://avatars.githubusercontent.com/u/121413309?v=4)](https://github.com/nadermkhan "nadermkhan (37 commits)")

---

Tags

phpframeworkmvczero-dependencylily

### Embed Badge

![Health badge](/badges/nader-lily/health.svg)

```
[![Health](https://phpackages.com/badges/nader-lily/health.svg)](https://phpackages.com/packages/nader-lily)
```

###  Alternatives

[mirekmarek/php-jet

PHP Jet is modern, powerful, real-life proven, really fast and secure, small and light-weight framework for PHP8 with great clean and flexible modular architecture containing awesome developing tools. No magic, just clean software engineering.

241.3k](/packages/mirekmarek-php-jet)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
