PHPackages                             colibri-php/colibri - 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. colibri-php/colibri

ActiveProject[Framework](/categories/framework)

colibri-php/colibri
===================

Colibri project skeleton — a lightweight file-based PHP micro-framework

v1.0.0-alpha(2mo ago)04↓90.9%MITLattePHP &gt;=8.4

Since Apr 3Pushed 2mo agoCompare

[ Source](https://github.com/colibri-php/colibri)[ Packagist](https://packagist.org/packages/colibri-php/colibri)[ RSS](/packages/colibri-php-colibri/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Colibri
=======

[](#colibri)

A lightweight file-based PHP micro-framework.

Features
--------

[](#features)

- **File-based routing** — `routes/web/` for HTML pages, `routes/api/` for JSON endpoints. No route registration, just create files.
- **Three rendering modes** — `.latte` (static), `.php` (logic), `.php` + `.latte` twins (variables auto-injected)
- **Cascading conventions** — `_middleware.php`, `_styles.css`, `_scripts.js` inherit from parent directories
- **Latte templating** — auto-layouts, custom tags (`{page}`, `{t}`, `{image}`, `{meta}`, `{styles}`, `{scripts}`, `{pagination}`, `{alerts}`)
- **i18n** — JSON translation files, `t()` helper, locale prefixes in URLs, language switcher
- **Database** — Medoo DBAL with `DB::` facade, migrations, pagination
- **Flat-file storage** — `Data::` for JSON-based content, works without a database
- **Authentication** — session-based with `Auth::`, supports DB and file drivers
- **Middleware** — built-in auth, CSRF, CORS, rate limiting, security headers
- **Cache** — file or DB driver, configurable TTL
- **Mail** — PHPMailer with SMTP, sendmail, and log drivers. Latte templates for emails.
- **Image processing** — resize, crop, thumbnail with automatic caching
- **HTMX support** — partial rendering, HX headers, `$htmx` template variable
- **Vite integration** — optional, for Tailwind/Vue/Svelte projects
- **SEO** — `{meta}` tag, OpenGraph, Twitter Cards, canonical, `site_title()`
- **CLI** — extensible commands: `serve`, `migrate`, `make:page`, `cache:clear`, `down`/`up`
- **Driver pattern** — extensible via `registerDriver()` for mail, cache, auth (and future storage, log)
- **PHP 8.4** — property hooks, asymmetric visibility

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

[](#requirements)

- PHP &gt;= 8.4
- Extensions: `pdo`, `intl`, `mbstring`, `fileinfo`

Quick Start
-----------

[](#quick-start)

```
composer create-project colibri-php/colibri my-project
cd my-project
php colibri serve
```

Visit `http://localhost:8000`.

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

[](#project-structure)

```
my-project/
├── colibri              # CLI entry point
├── config/              # Configuration files
├── core/                # Framework source (becomes vendor package after split)
├── data/                # Flat-file JSON storage
├── locales/             # Translation files (en.json, fr.json)
├── middleware/           # Custom middleware (anonymous classes)
├── migrations/           # Database migrations
├── public/              # Web root (index.php, .htaccess)
├── routes/
│   ├── web/             # HTML pages (.php, .latte)
│   └── api/             # JSON endpoints (.php)
├── storage/
│   ├── cache/           # Cache files
│   ├── logs/            # Log files
│   └── uploads/         # Uploaded files
├── templates/
│   ├── layouts/         # Latte layouts (default.latte)
│   ├── partials/        # Reusable partials (pagination, alerts)
│   ├── emails/          # Email templates
│   └── errors/          # Error pages (404, 500, 503)
└── tests/               # Project tests

```

Routing
-------

[](#routing)

Create a file, get a route:

```
routes/web/about.latte       → GET /about
routes/web/blog/[slug].latte → GET /blog/my-post
routes/api/users/index.php   → GET /api/users
routes/api/users/[id].php    → GET /api/users/42

```

### HTTP Methods

[](#http-methods)

```
// routes/api/posts/index.php
return [
    'GET' => fn($request, $params) => DB::select('posts', '*'),
    'POST' => fn($request, $params) => DB::insert('posts', $request->body()),
];
```

Templating
----------

[](#templating)

```
{page title: t('homepage'), layout: 'admin'}

{block content}
{t 'welcome'}
{image 'photos/hero.jpg', resize: 800, alt: 'Hero'}
{pagination $posts}
{/block}
```

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

[](#configuration)

All config via `.env` and `config/*.php`:

```
APP_NAME=MyApp
APP_DEBUG=true
DB_DRIVER=sqlite
AUTH_DRIVER=db       # or 'file' for no-database mode
CACHE_DRIVER=file    # or 'db'
MAIL_DRIVER=log      # or 'smtp'
```

Works Without a Database
------------------------

[](#works-without-a-database)

Set `AUTH_DRIVER=file` and use `Data::` instead of `DB::` — Colibri runs entirely on flat files.

CLI
---

[](#cli)

```
php colibri serve              # Development server
php colibri migrate            # Run migrations
php colibri make:page about    # Create a page
php colibri make:api users     # Create an API endpoint
php colibri cache:clear        # Clear caches
php colibri down               # Maintenance mode
php colibri routes             # List all routes
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Unknown

Total

1

Last Release

89d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18495095?v=4)[Richard Trudel](/maintainers/rtrudel)[@rtrudel](https://github.com/rtrudel)

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/colibri-php-colibri/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M294](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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