PHPackages                             iviphp/ivi - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. iviphp/ivi

ActiveProject[HTTP &amp; Networking](/categories/http)

iviphp/ivi
==========

Ivi.php is a fast, lightweight, and modular PHP framework with expressive routing, built-in ORM, caching, and WebSocket support—ideal for modern APIs and SPAs.

v1.6.1(2mo ago)1747[11 issues](https://github.com/iviphp/ivi/issues)MITPHPPHP &gt;=8.1CI passing

Since Nov 4Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/iviphp/ivi)[ Packagist](https://packagist.org/packages/iviphp/ivi)[ RSS](/packages/iviphp-ivi/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (18)Versions (56)Used By (0)

  Ivi.php
=======

[](#iviphp)

 [![](https://camo.githubusercontent.com/87a9b94eb012dd8b2e6f9b91a6ceda9768e1bb9ea33ea60f540c3490534683ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c7565)](https://camo.githubusercontent.com/87a9b94eb012dd8b2e6f9b91a6ceda9768e1bb9ea33ea60f540c3490534683ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c7565) [![](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)

### Build backend systems with clarity.

[](#build-backend-systems-with-clarity)

 Ivi.php is a modern PHP framework designed for developers who want a clean structure, predictable behavior, and fast development without unnecessary complexity.

[![](https://camo.githubusercontent.com/1a534380dd91d18cf4e0dfcc9b6a5e1307285d6ca66b6ab0226acc0a8a4c4c2c/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64776a6265643278622f696d6167652f75706c6f61642f76313736323532343631382f6976697068705f6a7270656d612e706e67)](https://camo.githubusercontent.com/1a534380dd91d18cf4e0dfcc9b6a5e1307285d6ca66b6ab0226acc0a8a4c4c2c/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64776a6265643278622f696d6167652f75706c6f61642f76313736323532343631382f6976697068705f6a7270656d612e706e67)

 Overview
--------

[](#overview)

Ivi.php is a modern PHP framework designed for building APIs and web applications with clarity and control.

It provides a minimal core with a consistent architecture, allowing developers to build production-ready systems without unnecessary complexity.

The framework focuses on:

- predictable structure
- explicit behavior
- fast development cycles
- real-world features out of the box

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

[](#installation)

```
composer create-project iviphp/ivi my-app
cd my-app
```

Run the application:

```
ivi serve
```

Quick Example
-------------

[](#quick-example)

```
use Ivi\Core\Bootstrap\App;
use Ivi\Http\Request;

$app = new App(__DIR__);

$app->router->get('/', fn() => ['hello' => 'ivi.php']);

$app->router->post('/echo', fn(Request $req) => [
    'you_sent' => $req->json()
]);

$app->run();
```

Routing
-------

[](#routing)

```
$app->router->get('/users', fn() => ['users' => []]);

$app->router->get('/user/{name}', function (array $params) {
    return ['name' => $params['name']];
});
```

Request Handling
----------------

[](#request-handling)

```
$app->router->post('/data', function (Request $req) {
    return [
        'json' => $req->json(),
        'all'  => $req->all()
    ];
});
```

Views
-----

[](#views)

```
use Ivi\Core\View\View;

$app->router->get('/', function () {
    return View::make('home', [
        'title'   => 'Welcome',
        'message' => 'Ivi.php running'
    ]);
});
```

Validation
----------

[](#validation)

```
use Ivi\Core\Validation\Validator;

$input = [
    'email'    => 'user@example.com',
    'password' => 'secret123'
];

$validated = (new Validator($input, [
    'email'    => 'required|email',
    'password' => 'required|min:6'
]))->validate();
```

Update scenario:

```
$post = ['password' => ''];

if (trim($post['password']) === '') {
    unset($post['password']);
}

$validated = (new Validator($post, [
    'password' => 'sometimes|min:6'
]))->validate();
```

ORM
---

[](#orm)

### Model

[](#model)

```
use Ivi\Core\ORM\Model;

final class User extends Model
{
    protected static array $fillable = ['name', 'email', 'password', 'active'];
}
```

### CRUD

[](#crud)

```
$user = User::create([
    'name'  => 'Alice',
    'email' => 'alice@example.com'
]);

$found = User::find(1);

$found->fill(['name' => 'Updated'])->save();

$found->delete();
```

### Query Builder

[](#query-builder)

```
$users = User::query()
    ->where('status = ?', 'active')
    ->orderBy('id DESC')
    ->limit(5)
    ->get();

$count = User::query()
    ->where('status = ?', 'active')
    ->count();
```

### Repository Pattern

[](#repository-pattern)

```
use Ivi\Core\ORM\Repository;

final class UserRepository extends Repository
{
    protected function modelClass(): string
    {
        return User::class;
    }

    public function findByEmail(string $email): ?User
    {
        $row = User::query()->where('email = ?', $email)->first();
        return $row ? new User($row) : null;
    }
}
```

JWT Authentication
------------------

[](#jwt-authentication)

```
use Ivi\Core\Jwt\JWT;

$jwt = new JWT();

$token = $jwt->generate([
    'sub' => 123
], [
    'key'      => 'secret',
    'alg'      => 'HS256',
    'validity' => 3600
]);

$jwt->check($token, ['key' => 'secret']);
```

Logging
-------

[](#logging)

```
log_info("Application started");

log_error("Database error", "Database");

log_debug([
    'user_id' => 1
], "Debugging");
```

Features:

- daily log rotation
- JSON support
- trace mode
- automatic log directory creation

Collections
-----------

[](#collections)

```
$v = vector([1, 2, 3]);
$v->push(4);

$m = hashmap(['name' => 'Ivi']);
$m->put('version', '1.0');

$s = hashset(['apple']);
$s->add('banana');

$t = str(" hello ")->trim()->upper();
```

CLI
---

[](#cli)

Ivi.php provides a built-in CLI for development and deployment.

#### Project

[](#project)

```
ivi new my-app
```

#### Database

[](#database)

```
ivi migrate
ivi migrate:status
ivi migrate:reset
ivi seed
```

#### Modules

[](#modules)

```
ivi make:module Blog
ivi modules:publish-assets
```

#### Development

[](#development)

```
ivi serve
ivi test
ivi coverage
```

#### Deployment

[](#deployment)

```
ivi deploy
```

Project Structure
-----------------

[](#project-structure)

```
.
├── bootstrap/
├── config/
├── core/
├── public/
├── src/
├── views/
├── scripts/
├── docs/
└── vendor/

```

Configuration
-------------

[](#configuration)

Example `.env`:

```
APP_ENV=local
APP_DEBUG=true

DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_NAME=iviphp
DB_USER=root
DB_PASS=secret
```

Philosophy
----------

[](#philosophy)

Ivi.php is built around a simple idea:

- keep the core minimal
- expose real capabilities
- avoid hidden magic
- favor explicit code over abstraction

Documentation
-------------

[](#documentation)

Download
--------

[](#download)

```
git clone https://github.com/iviphp/ivi.git
cd ivi
composer install
```

License
-------

[](#license)

10) Validation
--------------

[](#10-validation)

```
use Ivi\Http\Request;
use Ivi\Validation\Validator;

$validator = Validator::make($request->all(), [
  'name' => 'required|min:2|max:120',
  'email' => 'required|email',
]);

if ($validator->fails()) {
  return response()->json(['errors' => $validator->errors()], 422);
}
```

11) Responses
-------------

[](#11-responses)

```
use Ivi\Http\JsonResponse;
use Ivi\Http\HtmlResponse;

return new JsonResponse(['ok' => true]);
return new HtmlResponse('Hello');
```

12) Production Tips
-------------------

[](#12-production-tips)

- Set `APP_ENV=production`
- Use `APP_DEBUG=false`
- Configure opcache
- Serve from `public/`
- Minify assets

---

Happy building with **ivi.php** 🚀

⚖️ License
----------

[](#️-license)

MIT License © 2026 Gaspard Kirira

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance73

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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 ~3 days

Recently: every ~29 days

Total

54

Last Release

72d ago

Major Versions

v0.8.0 → v1.0.02025-11-07

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21707?v=4)[Gaspard Bucher](/maintainers/Gaspard)[@gaspard](https://github.com/gaspard)

---

Top Contributors

[![GaspardKirira](https://avatars.githubusercontent.com/u/172499022?v=4)](https://github.com/GaspardKirira "GaspardKirira (142 commits)")

---

Tags

apicachingframeworklightweightmodularormphpspawebsocket

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/iviphp-ivi/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)[lion/bundle

Lion-framework configuration and initialization package

122.3k4](/packages/lion-bundle)

PHPackages © 2026

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