Git Product home page Git Product logo

slim-skeleton's Introduction

Slim Skeleton

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.

Main features

  • Support logging follow PSR-3 with Monolog
  • Support template engines: PHP view, Twig (default PHP view)
  • Support database accessing with Doctrine DBAL, CakePHP Database (support MySql, Postgresql, SQLite, ...)
  • Support middlewares: Basic & Digest Authentication
  • Support providers, easy to integrate with slim/http-cache, slim/csrf, slim/flash
  • Support making database test and integration test with PHPUnit
  • Support coding style check with PHPCS
  • Support auto deploy with Deployer
  • Support using Gulp task to compile SASS, ES6, CoffeeScript, ...

Directories structure

path/to/project
|-- app
|   |-- assets
|   |-- config
|   |-- lang
|   `-- templates
|-- public
|-- src
|-- tests
|-- tmp
|   |-- cache
|   `-- logs
`-- vendor

Requirements

  • PHP 5.5+
  • [Composer][compoer]
  • npm (If using gulp to build assets)

Usage

Create project

Using composer to create new project:

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

Run PHP built-in server

Run a built-in server on 0.0.0.0:8888

$ php -S 0.0.0.0:8888 -t public public/index.php

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

Check coding style and test

$ ./vendor/bin/phpcs
$ ./vendor/bin/phpunit

Build assets with gulp, npm

You can use Gulp to compile SASS, ES6, CoffeeScript, ...

$ npm install
$ npm run-script build

Run a task with gulp

$ node_modules/.bin/gulp <task>

Deploy project

You can use Deployer to deploy project.
Copy and edit server's information from deploy.php.dist file to deploy.php file.
After that, you can run:

$ composer require deployer/deployer:^3.3.0 --dev
$ ./vendor/bin/dep <stage>

See an example in here.

Changelog

See all change logs in CHANGELOG.md

Contributing

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.

License

This project is released under the MIT License.
Copyright © 2013-2016 Oanh Nguyen.
Please see License File for more information.

slim-skeleton's People

Contributors

dependabot[bot] avatar oanhnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.