Documentation

Setup

Server Requirements

General requirements

  • PHP >= 5.6
  • Short tag enabled into php.ini (short_open_tag = On)
  • PDO PHP Extension

Apache modules enabled (httpd.conf):

  • mod_rewrite
  • mod_headers
  • mod_filters

Virtual host configuration:

<Directory /var/www/html>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

Installation

Via GIT Clone

git clone https://github.com/offmania9/boostack.git

Via Composer

composer require offmania9/boostack

Direct download

https://github.com/offmania9/boostack

Automatic Configuration

Go to

http://<your_local_path_to_boostack_installation>/setup

and begin the automated setup procedure.

At first, the setup will check for the PHP and Apache configurations

Boostack Setup 1

Then you will be prompted to insert your environment configuration parameters

Boostack Setup 2

When the setup procedure is ended, you will see a message that remember you to delete or rename "setup" folder from the project.

Boostack Setup 3

Manual Configuration

Alternatively to the automatic setup, you can proceed with manual configuration by copying and renaming the file config/env/sample.env.php to config/env/env.php and fill it with your preferred configurations.

Friendly URLs Configuration

Boostack includes a .htaccess file that is used to provide friendly URLs without the file extension .php in the path.

There are the one served by default:

RewriteRule ^home$ index.php [L]
RewriteRule ^setup$ /setup/index.php [L]
RewriteRule ^docs/([a-zA-Z0-9_-]+)$ documentation.php?docpath=$1 [L]
RewriteRule ^docs$ documentation.php [L]
RewriteRule ^download$ download.php [L]
RewriteRule ^login$ login.php [L]
RewriteRule ^registration$ registration.php [L]
RewriteRule ^logout$ logout.php [L]
RewriteRule ^api/([^\.]+)$ api.php?request=$1 [L]

Accessing Configuration Values

You may easily access your configuration values using the Config class from anywhere in your application.

Config::get("configuration_key")

Development Mode

When your application is in development mode, errors and exceptions will be displayed for all requests into your application. This makes it easy to debug your application while coding. You can edit the development mode configuration in the config/env/env.php file. To check if the application is in development mode, you can use:

if(Config::get('developmentMode')) {
    ...
}

Optimal Server Configuration

HTTP Strict Transport Security (HSTS) is an opt-in security enhancement that is specified by a web application through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. It also prevents HTTPS click through prompts on browsers.