PHPackages                             enginr/enginr - 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. enginr/enginr

ActiveLibrary[Framework](/categories/framework)

enginr/enginr
=============

A lightweight PHP solution to creating easily PHP applications.

v1.0.2-alpha(7y ago)261[13 issues](https://github.com/Enginr/enginr/issues)MITPHPPHP &gt;=7.2.0

Since Oct 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Enginr/enginr)[ Packagist](https://packagist.org/packages/enginr/enginr)[ RSS](/packages/enginr-enginr/feed)WikiDiscussions master Synced yesterday

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

Enginr v1.0.\*-alpha
====================

[](#enginr-v10-alpha)

[![GitHub](https://camo.githubusercontent.com/934e91b52d90885c3f9ebf696e8fb84a7955e6b4a69a8c48b2bef2257a5934f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/934e91b52d90885c3f9ebf696e8fb84a7955e6b4a69a8c48b2bef2257a5934f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666f722d7468652d6261646765)[![PHP](https://camo.githubusercontent.com/9010a1d44aa0751a5e76ac0a928ac51175947e07730dbb0b257b4278ea834d84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e322e302d626c75652e7376673f267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/9010a1d44aa0751a5e76ac0a928ac51175947e07730dbb0b257b4278ea834d84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e322e302d626c75652e7376673f267374796c653d666f722d7468652d6261646765)[![RELEASE](https://camo.githubusercontent.com/ca9a251274f599d678c1cf0e3b05b933cf9d9867d95d24e21cf076ad7e33918c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7072652d2d72656c656173652d76312e302e312d2d616c7068612d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/ca9a251274f599d678c1cf0e3b05b933cf9d9867d95d24e21cf076ad7e33918c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7072652d2d72656c656173652d76312e302e312d2d616c7068612d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)

Enginr is a very lightweight micro-framework for writing Web applications or API quickly.

Strongly inspired by **Node.js** (and more particularly by its micro-framework **Express.js**), learning how to use it is therefore very simplified if you know these technologies.

The biggest difference is the use of `$` for your variables... Yey...

🚩 **Note :** This guide is for the alpha version. Many changes can be made in the near future.

- [**Getting started**](#gs)
    - [Installation](#gs-installation)
    - [Hello world](#gs-hello-world)
        - [Using manager (prototype)](#gs-manager)
        - [From scratch](#gs-from-scratch)
- [**Routing**](#route)
    - [Introduction](#route-intro)
    - [Usage](#route-usage)
- [**Static files**](#static)
    - [Introduction](#static-intro)
    - [Usage](#static-usage)
- [**Views**](#views)
    - [Introduction](#views-intro)
    - [Usage](#views-usage)
- [**View engine**](#ve)
    - [Introduction](#ve-intro)
    - [Usage](#ve-usage)
- [**HTTP**](#http)
    - [Introduction](#http-intro)
    - [Request](#http-req)
    - [Response](#http-res)
- [**Middlewares**](#mid)
    - [Introduction](#mid-intro)
    - [Usage](#mid-usage)
- [**Session**](#session)
    - [Introduction](#session-intro)
    - [Usage](#session-usage)

Getting started
---------------

[](#getting-started)

This section will show you how to create your first Enginr application.

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

[](#installation)

It is strongly recommended to use `composer` to work with Enginr.

#### Using composer

[](#using-composer)

```
composer require enginr/enginr:v1.0.*-alpha
```

#### Using git

[](#using-git)

```
git clone https://github.com/Enginr/enginr.git \
cd enginr \
composer update
```

Hello world
-----------

[](#hello-world)

### Using Manager (prototype)

[](#using-manager-prototype)

To easily create an Enginr project, you can use the manager.
To use it, start by installing it globally on your machine via composer.

```
composer global require enginr/manager:dev-master
```

Once the manager is installed. We will create our first project... For this guide, I will call it `myProject`. But you can give it any name you want !

```
enginr create myProject
```

You will have to follow a short interactive guide, then once done, your project will be generated !

Once the generation is complete, go (still in your terminal) to the folder of your project (its name corresponds to the name you gave to your project), then launch the server.

```
cd myProject \
php app.php
```

If your server has started correctly, go to your browser, then enter the address of your server.
**Note :** The alpha version of the manager will have given you the address `localhost:8000`.

You should see the Enginr welcome page !

### From scratch

[](#from-scratch)

The most existing moment... 😁
Let's create our first application !

#### 1. Create a new project

[](#1-create-a-new-project)

```
mkdir myApp \
cd myApp
```

#### 2. Deploy Enginr to the project

[](#2-deploy-enginr-to-the-project)

See [installation](#gs-installation) guide.

#### 3. Create the application file

[](#3-create-the-application-file)

You could named your **application file** like you want. By convention, I will use `app.php` for this guide...

```
touch app.php
```

This will be the **main file** of your application.
By analogy, I would say that it is in a way the **"motherboard"** of your application.
It will be in this file that you will define the *configuration of your server* and that you will add your different *modules*.

#### 4. Let's code !

[](#4-lets-code-)

Now, let's define what our application needs a minimum to work.
In your `app.php` file, enter the following code.

```
require 'vendor/autoload.php';

$app = new \Enginr\Enginr();

$app->get('/', function($req, $res) {
	$res->send('Hello world !');
});

$app->listen('127.0.0.1', 3000);
```

💡 Need some explanations ?

OK. First, we need to instanciate Enginr :

```
$app = new \Enginr\Enginr();
```

After that, the minimum to do is to declare our first route. Here, we listening for the root route of our website.

```
$app->get('/', ...
```

At the same time, we specify the controller (the action we choose to do) when a user goes to this route ...

```
$app->get('/', function($req, $res) {
	$res->send('Hello world !'); // Send 'Hello world !' to the client
});
```

Now, your application need an host and a port to listening connections ...

```
$app->listen('127.0.0.1', 3000);
```

#### 5. Run the server

[](#5-run-the-server)

For our application to work, we need to start it.
To do this, let's go to our terminal (to the root location of our project), then launch the application.

```
php app.php
```

#### 6. Test our app

[](#6-test-our-app)

Open our favorite browser, and enter the host:port of our app. Normaly, we get a great :

> Hello world !

That's it ! 🍻

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

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

Every ~29 days

Total

3

Last Release

2692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d46ff0fe02c28d99e09583cac672481674be9661863df6a6964727cad9b5f06?d=identicon)[Arthuchaut](/maintainers/Arthuchaut)

---

Top Contributors

[![Arthuchaut](https://avatars.githubusercontent.com/u/20032867?v=4)](https://github.com/Arthuchaut "Arthuchaut (52 commits)")[![Themimitoof](https://avatars.githubusercontent.com/u/1113348?v=4)](https://github.com/Themimitoof "Themimitoof (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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