Notice: I can no longer maintain this project. However, it is open-source under The Unlicense. Fork, modify, build something awesome!
This is a (very opinionated) starting point for a Slim Framework 4 application that bundles together a few useful packages. Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This application uses the latest Slim 4 with Slim PSR-7 implementation and PHP-DI container implementation. It also uses the Monolog logger.
This application was based on slim/slim-skeleton, but continues to be updated with improvements from internal projects.
Have a copy of this project up and running in seconds.
- Git
- PHP 7.2+
- Composer
Clone this project onto your machine.
git clone https://github.com/eurekahq/genesis.git [my-app-name]
Replace [my-app-name]
with the desired directory name for your new application.
In a production scenario, you'll want to:
- Point your virtual host document root to your new application's
public/
directory. - Ensure
logs/
is web writable.
Install dependencies:
cd [my-app-name]
composer install
To run the application in development, you can either use PHP's command line tool:
php -S localhost:8000 -t public
Or you can use the predefined Composer script to do the the same thing:
composer app:serve
Or you can use docker-compose
to run the app with docker
, so you can run these commands:
docker-compose up -d
After that, open http://localhost:8000
in your browser.
Run this command in the application directory to run the test suite
composer test
Some helper scripts are included in composer.json to ease development.
That's it! Now go build something cool.
The application looks for a .env file in the root directory. A .env.example file is available that demonstates the structure of this file.
Additional project configuration lives in the app/settings.php file.
This project contains very little original code, and is more of a "collection" of packages for the sake of convenience. Consequently, documentation can be obtained and applied directly from the parent projects' websites.
- Framework - Slim Framework 4
- Structure - Slim Skeleton
- PSR-7 Implementation - Slim PSR-7
- Logger - Monolog
- ORM - Doctrine ORM
- Dependency Injection - PHP-DI
- Dependency Management - Composer
These are the main packages bundled into this project:
- Slim Framework 4 - Framework
- Slim Skeleton - MVC "skeleton"
- Slim PSR-7 - PSR-7 Implementation
- Monolog - Logger
- Doctrine ORM - Object Relational Mapping
- PHP-DI - Dependecy Injection Container Implementation
- Composer - Dependency Management
This application adheres to the following PSR Standards:
- PSR-1 Basic Coding Standard
- PSR-3 Logger Interface
- PSR-4 Autoloading Standard
- PSR-7 HTTP Message Interface
- PSR-11 Container Interface
- PSR-12 Extended Coding Style
- PSR-15 HTTP Handlers
These PSR standards may be supported in a future release:
- PSR-6 Caching Interface
- PSR-13 Hypermedia Links
- PSR-14 Event Dispatcher
- PSR-16 Simple Cache
- PSR-17 HTTP Factories
- PSR-18 HTTP Client
This section lists only accepted PSR standards.
- Doctrine migrations are planned but not implemented.
See CONTRIBUTING.md for more details.
I use SemVer for versioning. For the versions available, see the tags on this repository.
See the list of contributors.
This project is licensed under the MIT License - see the LICENSE.md file for details