Near-core PHP framework
built for the AI era

Zero dependencies. Small context. Full control.
The entire framework fits in an AI's context window.

composer require koldy/framework

AI-Ready

Small codebase means small context for LLMs. AI tools can understand your entire framework without truncation.

Ships with llms.txt for instant AI comprehension of every API, adapter, and pattern.

Zero Dependencies

No bloat. Just PHP and your code. Your vendor/ stays lean, auditable, and free of supply-chain risk.

Requires only PHP 8.3+ and optional PHP extensions you already have.

Near-Core PHP

No magic methods. No hidden abstractions. PHP templates instead of a custom engine. If you know PHP, you know Koldy.

Sticks to PHP best practices, not conventions borrowed from other languages.

Everything you need, nothing you don't

Database & ORM

ActiveRecord models, query builder with Select/Insert/Update/Delete, prepared statements, and multi-adapter support for MySQL, PostgreSQL, and SQLite.

Routing

Filesystem-based HttpRoute maps URI segments to namespaced classes. Dynamic segments, context propagation, and clean RESTful controllers.

Validation

25+ built-in rules, pipe syntax, strict mode, database uniqueness checks, and custom closure validators. Validates request params automatically.

Caching

Pluggable adapters: Runtime, Files, Database, Memcached, and DevNull. Multi-key operations, increment/decrement, and getOrSet pattern.

Logging

PSR-3 severity levels with File, Database, Email, and stdout adapters. Multiple adapters run simultaneously. Request correlation built in.

Sessions & Mail

Session management with File and Database storage. Email sending via PHP mail(), file-based dev mode, or your own SMTP adapter.

Write clean, obvious code

App\Http\Users.php
namespace App\Http;

use Koldy\Route\HttpRoute\HttpController;
use Koldy\Response\Json;
use Koldy\Validator;
use App\Db\User;

class Users extends HttpController
{
    public function get(): Json
    {
        $users = User::fetch(['active' => true]);
        return Json::create(['users' => $users]);
    }

    public function post(): Json
    {
        $input = Validator::create([
            'email'    => 'required|email',
            'name'     => 'required|maxLength:100',
            'password' => 'required|minLength:8',
        ])->getData();

        $user = User::create($input);
        return Json::create(['id' => $user->id]);
    }
}

What you see is what runs

  • GET /users calls get()
  • POST /users calls post()
  • No annotations, no attributes, no route files
  • Validation throws automatically on failure
  • ActiveRecord ORM with static facade API
Learn about routing

Start building

Get productive in minutes with zero configuration overhead.