PHPackages                             omaressaouaf/plain-kit - 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. omaressaouaf/plain-kit

ActiveLibrary[Framework](/categories/framework)

omaressaouaf/plain-kit
======================

A small PHP toolkit for building MVC-style demos and prototypes without a full framework.

v1.0.0(1mo ago)15MITPHPPHP ^8.2CI passing

Since Jul 11Pushed 1mo agoCompare

[ Source](https://github.com/omaressaouaf/plain-kit)[ Packagist](https://packagist.org/packages/omaressaouaf/plain-kit)[ Docs](https://github.com/omaressaouaf/plain-kit)[ RSS](/packages/omaressaouaf-plain-kit/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

PlainKit
========

[](#plainkit)

[![Latest Stable Version](https://camo.githubusercontent.com/b685e274814f58c778c614c714a3ade9b812a43a9928310cd96b5fb3b6b2b975/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6d6172657373616f7561662f706c61696e2d6b69742e737667)](https://packagist.org/packages/omaressaouaf/plain-kit)[![License](https://camo.githubusercontent.com/60740f27e8137b0acff0a6d8b562b34540b48f20010548b1cf122f73d9695713/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6d6172657373616f7561662f706c61696e2d6b6974)](LICENSE)[![Tests](https://github.com/omaressaouaf/plain-kit/actions/workflows/tests.yml/badge.svg)](https://github.com/omaressaouaf/plain-kit/actions/workflows/tests.yml)

A small personal PHP toolkit for building **MVC-style demos, prototypes, and coding exercises** without installing a full framework.

PlainKit gives you just enough structure around routing, middleware, request handling, sessions, CSRF protection, validation, simple views, environment configuration, and a lightweight service container — while staying close to plain PHP.

> PlainKit is **not** a production framework. It is not intended to replace Laravel, Symfony, Slim, or any mature PHP framework. It exists as a practical foundation for personal small projects, experiments, and learning how framework pieces fit together.

---

Features
--------

[](#features)

- **Application bootstrap** with `App::create()` and fluent service binding
- **Router** with HTTP verbs, middleware, route parameters, and file-based controllers
- **Middleware** for `auth`, `guest`, and CSRF verification
- **Request** and **Response** helpers for input, redirects, JSON, and views
- **Session** storage with flash data
- **CSRF** token generation and verification
- **Form validation** flow with `Form` and `Validator`
- **Authenticator** for login, logout, and password updates
- **Database** wrapper around PDO
- **Environment** loading via `.env` ([`vlucas/phpdotenv`](https://github.com/vlucas/phpdotenv))
- Global **helpers** for paths, escaping, debugging, and env access

---

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

[](#requirements)

- PHP **8.2+**
- Composer

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require omaressaouaf/plain-kit
```

---

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

[](#quick-start)

A PlainKit application needs:

1. A **public entry point** (`public/index.php`)
2. A **routes file** (`routes.php`)
3. **Controllers** under `app/Http/Controllers/`
4. **Views** under `app/Views/`
5. Optional **config**, **`.env`**, repositories, and services

### Entry point

[](#entry-point)

```
