PHPackages                             emeraldion/emerails - 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. emeraldion/emerails

ActiveProject[Framework](/categories/framework)

emeraldion/emerails
===================

Rails-like LAMP web application framework

21.5k[12 issues](https://github.com/emeraldion/emerails/issues)PHP

Since Mar 21Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/emeraldion/emerails)[ Packagist](https://packagist.org/packages/emeraldion/emerails)[ RSS](/packages/emeraldion-emerails/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c52f43132b3fc70c67bffc2fc21786e21cd637ad6215409d5d0f844624112fed/68747470733a2f2f7472617669732d63692e6f72672f656d6572616c64696f6e2f656d657261696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/emeraldion/emerails)[![Coverage Status](https://camo.githubusercontent.com/221599266f1488cba36a97f969b81a6b64b00a74e7bed764c3464b963d6b8076/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f656d6572616c64696f6e2f656d657261696c732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/emeraldion/emerails?branch=master)[![Latest Unstable Version](https://camo.githubusercontent.com/f18eab7adf2262822fe63006fca459e689ac46ef0713cfda34578aa74b6202ba/68747470733a2f2f706f7365722e707567782e6f72672f656d6572616c64696f6e2f656d657261696c732f762f756e737461626c65)](https://packagist.org/packages/emeraldion/emerails)[![composer.lock](https://camo.githubusercontent.com/cef26b99f2a9da2354d9779864e6a63f35ebf61b215034f9b19544d6861bfe08/68747470733a2f2f706f7365722e707567782e6f72672f656d6572616c64696f6e2f656d657261696c732f636f6d706f7365726c6f636b)](https://packagist.org/packages/emeraldion/emerails)[![Total Downloads](https://camo.githubusercontent.com/945c87cef770b533674c5a2704ae7fffb21396d7f73f4755e2894a7724d83e9c/68747470733a2f2f706f7365722e707567782e6f72672f656d6572616c64696f6e2f656d657261696c732f646f776e6c6f616473)](https://packagist.org/packages/emeraldion/emerails)[![Monthly Downloads](https://camo.githubusercontent.com/decfe15c43d81d9558093bec389eb9a0962a8b6d874bb9f4ef4bdef551a98a8d/68747470733a2f2f706f7365722e707567782e6f72672f656d6572616c64696f6e2f656d657261696c732f642f6d6f6e74686c79)](https://packagist.org/packages/emeraldion/emerails)

EmeRails
========

[](#emerails)

EmeRails is a PHP web application framework loosely inspired to [Ruby on Rails](http://www.rubyonrails.org). It has a MVC architecture, an ORM layer that mimics ActiveRecord, and separates presentation from business logic quite nicely, prioritizing conventions over configuration.

It supports templating, page caching, action filtering, and a lot of useful features out of the box that save coding time and server load. Similarly to Rails, EmeRails has a `generate.php` script that can quickly get you up and running, creating your controllers, models, and views in no time.

EmeRails comes with default support for MySQL via `mysql` (deprecated) and `mysqli` extensions, is [continuously tested](https://travis-ci.org/emeraldion/emerails) on PHP `5.6`, `7.1`, and `nightly`.

Generator
---------

[](#generator)

EmeRails comes with a generator script that creates controllers, views, and models with no code:

```
scripts/generate.php
Usage: generate.php controller controller_name [action1 [action2 ...]]
       generate.php model model_name [field1 [type1 [field2 [type2 ...]]]]
```

In order to generate a controller and its views, run the generator script as follows:

```
scripts/generate.php controller foo bar baz
```

This will create a controller class `FooController` with the default `FooController::index` action, and two actions, `FooController::bar` and `FooController::baz`. It will also generate the views `index`, `bar`, and `baz`.

In order to generate a model with a list of fields and types, run the generator script as follows:

```
scripts/generate.php model foo bar int baz float
```

This will create a model class `Foo` with two fields, `bar` of type `int`, and `baz` of type `float`. It will also create the backing table in the DB.

Contributing
------------

[](#contributing)

Thank you for your interest in EmeRails! Feel free to open issues or submit a PR. See the [Contributing Guidelines](https://github.com/emeraldion/emerails/blob/master/CONTRIBUTING.md)for detailed instructions.

Development
-----------

[](#development)

EmeRails is a PHP web application. If you are unsure what to do, follow these steps:

### Installing a local MySQL server

[](#installing-a-local-mysql-server)

For development, it's best to use a [local MySQL server](https://dev.mysql.com/doc/mysql-getting-started/). I use [MAMP](https://www.mamp.info/) on Mac OS X, but you can also run MySQL server in [a Docker container](https://hub.docker.com/r/mysql/mysql-server/).

### Install dependencies

[](#install-dependencies)

```
make install
```

### Create test DB

[](#create-test-db)

This command will create a test MySQL DB:

```
make create_test_db
```

Note the script assumes there is a `mysql` command in the `PATH`. It also assumes the database user is `root` and will prompt for the password. If you want to use another user, you have to edit `Makefile`.

### Run tests

[](#run-tests)

Run tests (limited coverage):

```
php_env=test make test
```

Docker
------

[](#docker)

If you're familiar with [Docker](https://docs.docker.com/engine/) and Docker Compose, you may want to package your app as a Docker image thanks to the included `Dockerfile`:

```
make docker-build
```

This goal builds the app as the `emerails-app` image; to easily run the image in a container:

```
make docker-run
```

This goal runs a `mysql` DB container, spins up an app container, links them, and forwards the app container's port `80` to local port `8080`. You can then hit the app opening your browser on `http://localhost:8080`.

To stop the app and `mysql` containers, run the goal:

```
make docker-stop
```

There's also a handy goal to cleanup when you're done with Docker images:

```
make docker-clean
```

The included `docker-compose.yml` configuration also allows you to spin up the application locally:

```
docker-compose up --build -d
```

Documentation
-------------

[](#documentation)

To generate documentation, you will need [Doxygen](https://github.com/doxygen/doxygen.git). You can build it from sources, download a binary, or install it via [homebrew](http://brew.sh/):

```
brew install doxygen
```

Once you have Doxygen, you can run the `docs` target:

```
make docs
```

License
-------

[](#license)

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2008, 2017 Claudio Procida

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/860099?v=4)[Claudio Procida](/maintainers/claudiopro)[@claudiopro](https://github.com/claudiopro)

---

Top Contributors

[![claudiopro](https://avatars.githubusercontent.com/u/860099?v=4)](https://github.com/claudiopro "claudiopro (514 commits)")

### Embed Badge

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

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

###  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)
