A skeleton for Slim framework

Installs: 95

Dependents: 0

Suggesters: 0

Stars: 16

Watchers: 5

Forks: 4

Open Issues: 0

Type: application

3.1.1 2016-01-14 03:51 UTC


Build Status Latest Stable Version Total Downloads License

Join the chat at https://gitter.im/oanhnn/slim-skeleton

A skeleton for Slim Framework v3 following MVC pattern.
It support:

  • Logging with monolog
  • Template with twig view (PHP view, ...)
  • Database accessing with doctrine dbal
  • Builds assets with gulp, npm
  • Tests call a request with PHPUnit, example in here


  • PHP >= 5.5.0
  • slim/slim: ~3.0
  • monolog/monolog: ~1.13


  • slim/twig-view: ^2.0
  • slim/php-view: ^2.0
  • slim/csrf: ^0.4.0
  • slim/http-cache: ^0.3.0


Create project

Using composer to create new project:

$ composer create-project oanhnn/slim-skeleton path/to/project --prefer-dist

Composer will create Slim project and all its dependencies under the path/to/project directory.

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:

$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Run PHP build-in server

Run a build-in server on

$ php -S -t public public/index.php

Open web browser with address http://localhost:8888

Run PHP Unit test
$ composer test
Build assets (css, js, ...) with gulp, npm
$ npm install
$ npm run-script build
Run task with gulp
$ node_modules/.bin/gulp <task>
Deploy project

To deploy a project using this skeleton, you can use Deployer.
See an example in here.

Directories structure
|-- app
|   |-- assets
|   |-- config
|   |-- lang
|   |-- src
|   |-- tests
|   \-- views
|-- bin
|-- public
|   \-- assets
|-- tmp
|   |-- cache
|   \-- logs
\-- vendor


All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send a pull request.

To ensure a consistent code base, you should make sure the code follows the PSR-2.

If you would like to help take a look at the list of issues.

Change log

Please see CHANGELOG for more information what has changed recently.


Licensed under the MIT license. Please see License File for more information.