PHPackages                             echovel/kitephp - 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. echovel/kitephp

ActiveProject[Framework](/categories/framework)

echovel/kitephp
===============

The Full Stack PHP Micro-Framework with a built-in SPA Reactive Engine.

0.0.4(1mo ago)07MITHackPHP ^8.0

Since Jul 13Pushed 1mo agoCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

🪁 KitePHP
=========

[](#-kitephp)

**The Full Stack PHP Micro-Framework**

*Developer experience of Laravel. Speed of a React SPA. Zero heavy setup.*

---

KitePHP is a minimalist, lightning-fast PHP micro-framework designed to blur the lines between Backend and Frontend. It comes with built-in TailwindCSS, smart database migrations, a secure query builder, and **KiteJS**—a zero-config Reactive SPA engine.

✨ Features
----------

[](#-features)

- **KiteJS (Reactive SPA Engine):** Fetch HTML via AJAX, update the DOM without reloads, and add Alpine-like reactivity instantly.
- **Zero-Config Reactivity:** Declare state in HTML with `kite:data`. PHP parses it as default variables, and JS auto-binds it. No setup required.
- **Debounced Live Forms:** Add `kite:live.debounce.300ms` to any form for instant live search without writing a single line of JS.
- **Django-Style Models:** Define your database schemas directly inside your Models.
- **Auto Migrations:** Run `php kite migrate` and the database structure automatically syncs with your code.
- **Kite Templating Engine:** A fast, secure engine similar to Laravel Blade, with `@if`, `@foreach`, and automatic `` reactivity wrappers.
- **Auto-SEO Engine:** Dynamically injects and swaps Meta/OpenGraph tags during SPA navigation automatically.
- **Built-in Security:** Global CSRF validation and simple route middleware for Authentication.
- **Django-Style Permissions (RBAC):** Built-in Role-Based Access Control (`auth()->hasPerm()`, `auth()->inGroup()`, `@can`).
- **Secure Query Builder:** Fluent PDO prepared statements and built-in Pagination (`->paginate()`).
- **Built-in TailwindCSS:** Designed to look beautiful out of the box.

---

📁 Directory Structure
---------------------

[](#-directory-structure)

```
kitephp/
├── app/          # Application Logic
│   └── controller/ # HTTP Controllers (e.g. HomeController.php)
├── core/         # The Framework Engine (Core logic)
├── database/     # SQLite DB & Config
│   └── models.php  # Define Models & Schemas here
├── helper/       # Global helper functions (route, view, db, etc)
├── public/       # Web Root (index.php, CSS, JS assets)
├── resource/     # Frontend Resources
│   └── view/       # Kite Templates (*.kite.php)
├── route/        # Web Routes
│   └── url.php     # Map URLs to Controllers
└── kite          # Command Line Interface Tool (CLI)

```

---

⚡ SPA &amp; Reactive Engine (KiteJS)
------------------------------------

[](#-spa--reactive-engine-kitejs)

KiteJS is what makes KitePHP special. It acts as both a Pjax-style SPA navigator and a lightweight AlpineJS-style reactive engine.

### 1. Instant Navigation &amp; Forms

[](#1-instant-navigation--forms)

Convert any traditional web page into a Single Page Application instantly.

```

About Us

    @csrf

    Login

```

### 2. Zero-Config Reactivity &amp; Auto-Binding

[](#2-zero-config-reactivity--auto-binding)

Define your state using `kite:data`. KitePHP will extract this state into backend PHP variables automatically, and KiteJS will bind it on the frontend.

```

    Hello, {{ $name }}

    Toggle Details

        This is hidden/shown instantly without asking the server!

```

### 3. Live Forms &amp; Debouncing (HTMX style)

[](#3-live-forms--debouncing-htmx-style)

Want a live search bar? Add `kite:live` to any form. KiteJS will track your typing, maintain your cursor focus, and silently submit the form via AJAX when you stop typing.

```

```

---

🛣️ Routing &amp; Controllers
----------------------------

[](#️-routing--controllers)

Routes are simple and fast. They are defined in `route/url.php`.

```
get('/', 'HomeController@index')->name('home');
post('/users/save', 'UserController@save')->name('users.save');

// Protect routes with built-in Middleware
get('/admin', 'AdminController@index')->middleware('auth');
get('/admin/users/delete', 'UserController@delete')->middleware('permission:delete_user');
```

Controllers handle requests via an injected `Request` object. Validation is Laravel-inspired and automatically redirects back with flashed errors if it fails. You also have full access to the `auth()` helper.

```
namespace App\Controller;
use Kite\Core\Request;

class UserController {
    public function login(Request $request) {
        $credentials = $request->validate([
            'email' => 'required',
            'password' => 'required'
        ]);

        if (auth()->attempt($credentials)) {
            return redirect(route('admin'));
        }

        session()->flash('error', 'Invalid Credentials');
        return redirect('/login');
    }
}
```

---

🎨 Views (Kite Engine) &amp; Components
--------------------------------------

[](#-views-kite-engine--components)

KitePHP uses `.kite.php` extensions. It provides clean syntax, layout extending, and CSRF protection.

### 1. View Directives

[](#1-view-directives)

```
@extends('layout')

@seo('title', 'My Dashboard')
@seo('image', 'banner.png')

@section('content')
    Dashboard

    @if(auth()->check())
        Welcome, {{ auth()->user()->name }}
    @endif

    @can('delete_user')
        Delete User
    @endcan

    @foreach($items as $item)
        {{ $item }}
    @endforeach

    @include('components.card', ['title' => 'My Component Title'])

        @csrf

@endsection
```

### 2. Auto-SEO Engine

[](#2-auto-seo-engine)

Since KitePHP acts as a Single Page Application, standard Meta tags break. KitePHP fixes this with an Auto-SEO engine.

Simply place `{!! seo()->render() !!}` in your ``. Whenever you navigate, the engine automatically extracts the `@seo` directives from the new page and effortlessly swaps the DOM's meta tags!

---

🪄 Models, Schemas &amp; Query Builder
-------------------------------------

[](#-models-schemas--query-builder)

Unlike other frameworks, schemas are defined directly inside your models (`database/models.php`). No separate migration files to manage.

```
class User extends Model {
    public static string $table = 'users';

    public static function fields(): array {
        return [
            'name'     => Field::string(['max_length' => 255]),
            'email'    => Field::string(['max_length' => 255, 'unique' => true]),
            'password' => Field::string(['max_length' => 255]),
            'is_superuser' => Field::integer(['default' => 0]),
        ];
    }
}
```

*Note: KitePHP includes all 5 Django-style Auth tables (`auth_groups`, `auth_permissions`, etc.) out of the box in `database/models.php` for instant Role-Based Access Control!*

Sync your database automatically:

```
php kite migrate
```

Use the secure Query Builder for complex logic:

```
// Active Record / ORM
$user = User::objects()->find(1);
$posts = $user->posts; // Dynamic relationships

// Fluent Query Builder
$users = db('users')->where('status', 'active')->orderBy('id', 'DESC')->get();

// Pagination built-in
$paginated = db('users')->paginate(10);
```

---

🛠️ Helper Functions
-------------------

[](#️-helper-functions)

- `view('name', $data)` - Render a template
- `route('name', ['id' => 1])` - Get a named URL
- `redirect('/url')` - Redirect user
- `db('table')` - Query builder instance
- `session()` - Session manager
- `abort(404)` - Throw HTTP error
- `asset('file.js')` - Load public asset
- `csrf_token()` - Get CSRF token value

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

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

4

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d1daefbc8ff382c3e245ac9e56f80d7e925a584bf7da1160786916820f4fa66?d=identicon)[ankurjhaaa](/maintainers/ankurjhaaa)

---

Top Contributors

[![ankurjhaaa](https://avatars.githubusercontent.com/u/193601144?v=4)](https://github.com/ankurjhaaa "ankurjhaaa (21 commits)")

---

Tags

phpframeworkmicro-frameworkreactiveSPA

### Embed Badge

![Health badge](/badges/echovel-kitephp/health.svg)

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

PHPackages © 2026

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