PHPackages                             gianvoci/nanocore - 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. gianvoci/nanocore

ActiveLibrary[Framework](/categories/framework)

gianvoci/nanocore
=================

Lightweight PHP micro-framework with routing, config management, a micro ORM, and utility functions. Zero dependencies.

2.4.0(4d ago)044GPL-3.0-or-laterPHPPHP &gt;=8.5

Since May 24Pushed 4d ago1 watchersCompare

[ Source](https://github.com/gianvoci/nanocore)[ Packagist](https://packagist.org/packages/gianvoci/nanocore)[ Docs](https://github.com/gianvoci/nanocore)[ RSS](/packages/gianvoci-nanocore/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (18)Used By (0)

NanoCore
========

[](#nanocore)

A lightweight PHP micro-framework with routing, config management, a micro ORM, and utility functions. Zero dependencies, PHP 8.5+.

Features
--------

[](#features)

- Pattern-based routing with path parameters and wildcards
- Response methods: `json()`, `html()`, `redirect()`
- Middleware pipeline with `$next` chaining, route and method passed to callbacks
- Input validation with 10 built-in rules
- Event system with built-in lifecycle events
- CLI command registration and auto-detection
- Session management with config-driven settings
- Env-based config management with dot-notation access
- NanoORM: lightweight ORM with CRUD, joins, pagination, transactions, migrations
- HTTP client with retry and SSRF protection
- Request body parser with size limit, cache, and Content-Type auto-detect
- HTML template rendering with XSS protection
- Background process execution
- Built-in error handling (JSON responses)
- Security hardening out of the box

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

[](#requirements)

- PHP &gt;= 8.5
- No extensions beyond standard PHP (curl extension needed for `curlRequest`)

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

[](#installation)

```
composer require gianvoci/nanocore
```

Or via local path in `composer.json`:

```
{
    "repositories": [{"type": "path", "url": "../nanocore"}],
    "require": {"gianvoci/nanocore": "@dev"}
}
```

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

[](#quick-start)

Create `index.php`:

```
