PHPackages                             josephscott/brilkic - 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. josephscott/brilkic

ActiveLibrary[Framework](/categories/framework)

josephscott/brilkic
===================

0.0.4(3w ago)06MITPHPPHP &gt;=8.4CI passing

Since Jun 17Pushed 3w agoCompare

[ Source](https://github.com/josephscott/brilkic)[ Packagist](https://packagist.org/packages/josephscott/brilkic)[ RSS](/packages/josephscott-brilkic/feed)WikiDiscussions trunk Synced 1w ago

READMEChangelog (4)Dependencies (13)Versions (5)Used By (0)

brilkic
=======

[](#brilkic)

A tiny PHP micro-framework. File-based routing on top of [FastRoute](https://github.com/nikic/FastRoute), isolated-scope template rendering, and built-in escaping, CSRF, and session helpers. No controllers, no classes to extend — routes and templates are plain PHP files.

Requires PHP &gt;= 8.4.

Quick start
-----------

[](#quick-start)

Install:

```
composer require josephscott/brilkic
```

### Fastest path: scaffold a starter site

[](#fastest-path-scaffold-a-starter-site)

Generate a runnable site (entry point, config, a home page, header/footer templates, and 404/500 error routes) into the current directory:

```
vendor/bin/brilkic init        # or: vendor/bin/brilkic init path/to/dir
php -S localhost:8080 -t public
```

The scaffold never overwrites existing files — it aborts if any are already present. It writes a single `init.php` that defines your `Config` class, HTTPS-ready out of the box (the session cookie is `Secure`). For plain-HTTP local work, uncomment the `SESSION_OPTIONS` line in `init.php` to turn `Secure` off.

### By hand

[](#by-hand)

Create a `Config` class, register routes, and call `run_app()`. A minimal app is four files:

```
// public/index.php — the single entry point (point your web server here)
