Deployment

Unzip the archive into your server directory.

I. Folder architecture

folder architecture

1.app

Folder containing the sources specific to your project.

2. public

Folder contains your application’s public resources (CSS, JS, Images, etc.) This is the only folder accessible from the outside.

3. supplier

Folder containing the libraries used by your application.

4.storage

Folder containing the data used by your application (configuration, cache, translations, log, etc.).

5. Index.php

Application entry point

II. Basic configuration

1. Main configuration

Open the “storage/config/main.json” . This file contains the basic configurations of your application.

main.json
{
    "dao_source": "pdo",
    "cookie_iv": "2f57912d7bd53cc6f8e8af813c8d738a",
    "cookie_key": "ra51pnvb",
    "default_lang": "en",
    "dev_mode": true,
    "app_installed": false,
    "ssl_enabled": false
}

a. dao_source

Represents the name of the primary data access medium.

b. cookie_iv

Represents one of the keys used to encrypt cookies.

c. cookie_key

Represents one of the keys used to encrypt cookies. It is also used to encrypt passwords.

d. default_lang

Represents the default language.

e. dev_mode

Indicates whether you are in developer mode or not.

F. app_installed

Indicates that the application is installed.

 

2. Database configuration

Open the “storage/config/db.json” file. This file contains the configuration information for your database.

db.json
{
	"host": "localhost",
	"user": "root",
	"password": "",
	"database": "corefw",
	"table_prefix": "msk_"
}

 

a. host

Represents the address of the database server

b. user

Represents the username.

c. password

Represents the password.

d. database

Represents the name of the database.

e. table_prefix

Represents the prefix of tables.

f. driver

Represents the name of the database driver. The default is “mysql”. Possible values are oracle, pgsql, etc …

g. dsn

Represents the complete database access dsn. This field is optional. Because the previous information will be used to create the dsn. This field can be useful in case you want to use a driver that does not use the previous information (eg sqllite, odbc).

3.  Configuration of sub-applications

Open the “storage/config/sub_apps.json” file. This file contains the configuration information of the available sub-applications (Front office, Back office, API, etc.).

 

sub_app.json
{
	"FRONT": {
		"url_path": "",
		"lang_in_url": true
	}
}

 

In this file, the key represents the name of the sub-application (FRONT, ADMIN, API, etc…).

a. url_path

Represents the relative path (eg admin, api) to access the sub application. The full path will be in the form {baseUrl}/{url_path} where baseUrl represents the base url eg http:localhost/muuska or https: www.domain.com.

Example full path: http: localhost/muuska/admin (where url_path = admin), http: localhost/muuska/api (where url_path = api), http: localhost/muuska (where url_path is empty), https: www.domain .com/admin.

b. lang_in_url

Indicates whether the language should be added in the final URL or not. If the value of this field is true, the full path will be in the form {baseUrl}/{url_path}/{lang} where lang represents the language code.
Example full path: http: localhost/muuska/admin/en (where lang = en), http: localhost/muuska/admin/fr (where lang = fr), http: localhost/muuska/admin (where lang is empty) , https: www.domain.com/fr (where url_path is empty and lang = fr).

c. host

Allows you to define a specific address for the sub-application. You can for example use a subdomain as host of your sub application (admin.domain.com, api.domain.com).

d. authentication_required

Indicates whether authentication is required to access the sub-application or not.

e. access_checking_required

Indicates whether access rights checking is enabled.

f. cookie_lifetime

Represents the number of hours the visitor’s cookies will be kept.