PHPackages                             horizom/app - 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. horizom/app

ActiveProject[Framework](/categories/framework)

horizom/app
===========

The lightness PHP framework.

3.1.0(3y ago)17MITPHPPHP ^8.0

Since Oct 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/horizom/app)[ Packagist](https://packagist.org/packages/horizom/app)[ Docs](https://horizom.github.io)[ RSS](/packages/horizom-app/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (20)Used By (0)

[![](https://camo.githubusercontent.com/62380dbb63cdb97c3cb0d517f9a7b32b85320f06b0671ec5be2d3be4d9b16b01/68747470733a2f2f686f72697a6f6d2e6769746875622e696f2f696d672f686f72697a6f6d2d6c6f676f2d636f6c6f722e737667)](https://camo.githubusercontent.com/62380dbb63cdb97c3cb0d517f9a7b32b85320f06b0671ec5be2d3be4d9b16b01/68747470733a2f2f686f72697a6f6d2e6769746875622e696f2f696d672f686f72697a6f6d2d6c6f676f2d636f6c6f722e737667)

[![Total Downloads](https://camo.githubusercontent.com/60b95adedd0fc79fb135c89a187ee24e1b709df9354c289cd25dad09da1c1d13/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f6170702f642f746f74616c2e737667)](https://packagist.org/packages/horizom/app)[![Latest Stable Version](https://camo.githubusercontent.com/d217f057d72fbe5b4549d703c63ebab009753ce80b8c5620c8f631261ed80e56/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f6170702f762f737461626c652e737667)](https://packagist.org/packages/horizom/app)[![License](https://camo.githubusercontent.com/9032c3b6521806390d68758ab896992c4cbe6688e462b4e364f134c3fd48465d/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f6170702f6c6963656e73652e737667)](https://packagist.org/packages/horizom/app)

> **The lightness PHP framework** — fast, minimal, PSR-compliant.

---

Overview
--------

[](#overview)

Horizom is a lightweight PHP micro-framework built on PSR standards. It provides a clean, expressive foundation for building web applications and REST APIs without the overhead of a full-stack framework.

**Core packages:**

PackageRole`horizom/core`Application container, configuration, lifecycle`horizom/routing`PSR-15 router powered by FastRoute`horizom/http`PSR-7 request/response helpers---

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

[](#requirements)

- PHP **8.0** or higher
- [Composer](https://getcomposer.org/) 2.x

---

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

[](#installation)

```
composer create-project horizom/app my-project
cd my-project
cp .env.example .env
```

Start the built-in development server:

```
composer serve
# → http://localhost:8000
```

---

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

[](#project-structure)

```
├── app/
│   ├── Controllers/       # Request handlers (PSR-7)
│   ├── Middlewares/       # PSR-15 middleware (CORS, errors…)
│   ├── Models/            # Domain models
│   └── Providers/         # Service providers
├── bootstrap/
│   ├── app.php            # Application bootstrap
│   └── dependencies.php   # Middleware registration
├── config/
│   ├── app.php            # App settings
│   ├── auth.php           # JWT / auth settings
│   └── database.php       # Database connections
├── public/
│   └── index.php          # Front controller
├── resources/
│   └── views/             # Blade templates
├── routes/
│   ├── web.php            # Web routes
│   └── api.php            # API routes
└── tests/
    └── Unit/              # PHPUnit test suites

```

---

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

[](#configuration)

All sensitive values must be set in your **`.env`** file and are never committed to version control.

```
# Application
APP_NAME=Horizom
APP_ENV=development
APP_URL=http://localhost:8000
APP_DEBUG=false

# Database
DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=horizom
DB_USERNAME=root
DB_PASSWORD=
```

Access config values anywhere with the `config()` helper:

```
$name = config('app.name');         // "Horizom"
$dsn  = config('database.default'); // "development"
```

---

Routing
-------

[](#routing)

### Web routes (`routes/web.php`)

[](#web-routes-routeswebphp)

```
$router->get('/', 'MainController@index');
```

### API routes (`routes/api.php`)

[](#api-routes-routesapiphp)

```
$router->group(['prefix' => 'api'], function (RouteCollector $router) {
    $router->get('/status',  'ApiController@status');
    $router->get('/version', 'ApiController@version');
});
```

Use explicit HTTP verbs — avoid `any()` as it widens the attack surface.

---

Controllers
-----------

[](#controllers)

Controllers are **`final`** classes. They return a PSR-7 `ResponseInterface`.

```
