Introduction
Getting started

Kipchak is designed for developers who want a minimal, extensible, yet robust foundation for building high-performance APIs in PHP.
It complies with PHP Standards Recommendations (PSRs) for code interoperability and has modular architecture, making it easy to extend and maintain.
It is battle tested on APIs serving over 3,000 requests per second and uses up to 60% less resources than similar APIs built with larger frameworks like Symfony / Laravel running on Apache / FPM.
Use Kipchak's pre-built drivers and middlewares to help you get production ready with just a few lines of code.
Kipchak is developed by Mamluk LLC in the United Arab Emirates.
NOTE: This documentation is always relevant for the latest major Kipchak version (which is currently 3.x). For how to upgrade, please see the Upgrade Guide.
High Performance
Leverage Caddy and FrankenPHP in worker mode for blazing fast response times.
Deployment
Fully containerised and Kubernetes ready out of the box.
Drivers
Extend Kipchak with custom drivers for databases, storage, and more.
Middleware
Use pre-built or custom build middleware to handle requests and responses.
Why Kipchak?
Kipchak provides a solid structure for your PHP APIs without the overhead of larger frameworks. It only adds a handful of files on top of Slim Framework to bootstrap effectively and add formal structure around initialising Drivers and Middleware.
Key Features
- Lightweight: Built on Slim Framework 4.
- High Performance: Runs on Caddy and Optimized for FrankenPHP's worker mode.
- Container Ready: Comes with Docker and Kubernetes configurations.
- Extensible: Modular driver and middleware system.
- Configuration Driven: Centralised configuration for easy management.
- Helper Components: Includes built-in components for formatted API responses and a base Controller.
- PSR Interoperability: Kipchak is PHP at its best - you don't have to learn a new framework to use it.
Requirements
- Docker, to run the API.
- PHP 8.4 or later and Composer, to create a project and run the tests. Without them, the official Composer image can create the project, as shown below.
Installation
composer create-project kipchak/starter my-api
cd my-api
docker compose up --watch
Or, with Docker alone:
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD":/app -w /app composer create-project kipchak/starter my-api
cd my-api
docker compose up --watch
This starts the API in FrankenPHP's worker mode on http://localhost:8080, and restarts the worker when a file changes. Visit http://localhost:8080/v1/sultans for the example resource, and http://localhost:8080/openapi.json for its OpenAPI document.
Add a driver or middleware with the Kipchak CLI, which the project includes:
vendor/bin/kipchak add doctrine
It installs the package, copies its configuration into config/ and initialises it, with any drivers it needs.
The starter project page describes what the project contains. The examples repository has a working route for every free driver and middleware.
Using an AI Assistant
To have Claude Code, Codex, Cursor or another coding assistant write Kipchak code as Kipchak intends, install the Kipchak agent skill. AI Assistants describes how.
Core Project
The core logic of Kipchak is maintained in a separate repository to ensure easy updates and a clean separation of concerns. You will see this repository as kipchak/core in your project's composer.json file, alongside the drivers and middleware your API uses.
You can find the core project's source code at https://1x.ax/mamluk/kipchak/core.
See the Core Project section for more information.