Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation

Quick Start

To have a new application set up with Maslosoft Components, there is a [command line][cli] tool to bootstrap it.

But first, let's install it with composer, by issuing following command:

composer require "maslosoft/df"

This will download and install all dependencies. It make take some time to finish, as there are a a bit of dependencies to resolve (as of time of writing this files it is 67 packages).

Initializing New Application

NOTE: In older releases executable name is df

To initialize new application, issue msft command from vendor directory - this is the only one time where this command will be called from vendor folder - afterwards it will be available in document root:

vendor/bin/msft init

While application is initialized, it is not yet built to be usable. Notice that there are msft command in project root now available. This will collect commands available in application. Running it now, will yield only few commands, in fact only collect command - which we should call now:

./msft collect

This might take some time on the first run, as it will search for all signals thorough application. After collecting commands, calling msft should yield a lot more available commands, ie:


The list may vary, depending on installed components. The next step is to build application. Make sure that the sprites are generated first (to be fixed), than call:

./msft sprite:signal
./msft build:all

This will take some time, as JavaScript packages need to be downloaded, and some files processed. When finished, point Your web server to www directory, ensuring that any requests for non-existing files are routed to index.php file.

Example nginx configuration:

server {
    listen 80 default;
    index index.php index.html index.jpg index.png index.gif index.ico;

    root       /var/www/domains/$domain/;
    access_log /var/log/nginx/$domain.access.log;

    location / {
        try_files $uri $uri/ /index.php?$args;

    location ~ \.php$ {
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_read_timeout 240s;
        fastcgi_split_path_info ^(.+?\.php)(/.+)$;

        client_max_body_size 500m;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SERVER_NAME $domain;