/genesis

[Archived] Slim Framework 4 application starting point.

Primary LanguagePHPThe UnlicenseUnlicense

Genesis - Slim Framework Starting Point

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.

Get Started

Have a copy of this project up and running in seconds.

Pre-requisites

  1. Git
  2. PHP 7.2+
  3. Composer

Installation

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.

Configuration

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.

Documentation

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.

Components

These are the main packages bundled into this project:

PSR Adherence

This application adheres to the following PSR Standards:

These PSR standards may be supported in a future release:

This section lists only accepted PSR standards.

Known Issues

  • Doctrine migrations are planned but not implemented.

Contributing

See CONTRIBUTING.md for more details.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See the list of contributors.

License

This project is licensed under the MIT License - see the LICENSE.md file for details