| Interactive Books' Atelier

Release version: 0.8.3.x

Introduction

In this introduction we assume you are some little familiar with Laravel, and know PHP, if otherwise, you can still follow the steps and reach same results, and delay the learning to a later date in your life ...

Primary Steps

Interactive Books' Atelier is published as a package for Laravel and not a standalone application, so, you can easily manipulate and do whatever you want with your Laravel instance without ever bordering to touch the package.

Setup Laravel

Follow the installation guidelines on the official Laravel website.

TIP | for advance functionalities you may need to touch your web server configuration, as our architecture is based on serving files with a flat-file architecture in mind, it is convenient to force / at the end of pages ...

Configure Database

Next, we need to configure the database, so you can enjoy the database based functionalities of IBA

Hint | However, as IBA is capable of serving flat-file architecture website, you can ignore this step and use IBA as a flat-file CMS until later day when your content grow so much that organizing them without a database is too inconvenient.

The current version of Interactive Books' Atelier should be compatible with any kind of database that Laravel supports, even though when you run the migrations you will wonder why iba create so many tables while there is not much extra functionality built-in, but don't worry, these are all for the sake of scalability.

so, configure the database, as described by Laravel's documentation.

Setup Auth

One of the guidelines in iba's design is to keep the intervention of iba to bare minimum, so you need to setup Laravel's built-in auth mechanism to be able to access your Atelier.

Info | "Atelier" is the terminology we are going to use instead of "admin dashboard" or "backend", as you know it is called Interactive Books' Atelier, so we rather stick with our good old-fashion bookbinding terminologies.

So, setup the auth functionality as by following the instruction in Laravel's documentation.

Create an admin account

Laravel built-in auth functionalities allows you to register and login and logout and to be able to access the Atelier, you need to be a registered user, so why not start here and create your user and by the way don't forget to stop new registrations after creating your admin user.

Installing IBA

So, by now, you should have a functioning Laravel 5.4+ instance on your device.

Now all you need to do is require iba package and add few configurations.

Require IBA

composer require lil-plp/iba

Info | lil-plp stands for Lost Ideas Lab & Pirate's Lost Pearl.

Good job. There are few configuration adjustment and off you go

Add tables

As always with Laravel, execute new migrations like:

php artisan migrate

Publish Resources & Configurations

The below code with add the resources and configuration files inside the iba package to your Laravel instance.

php artisan vendor:publish

After running this command you are required to choose which package you are publishing, so chose lil-plp\iba

Adjust Configurations

Now in your configs directory, you should see the file iba.php, there you will find a PHP array consisting variables required to run Interactive Books' Atelier, change them as necessary.

Setup a filesystem driver

As we mentioned in the notes in this installation guideline, Interactive Books' Atelier is composed of a flat-file storage, so in your storage directory of your Laravel instance, you need to create two new directories. Of course Laravel is smart and you don't need to literarily create two folders there, only adding the respective configuration to the filesystem conifguration of your Laravel instance, will do the job for you.

So, open your config\filestystems.php and add the following configruation lines:


'ibook' => [
    'driver' => 'local',
    'root' => storage_path('ibook'),
],
'leaves' => [
        'driver' => 'local',
        'root' => storage_path('leaves'),
],

The ibook directory is where iba will store the text and other files of your Interactive Book while the meta-data being stored in the database.

The leaves directory is where iba will look up for a "leaf", if it could not find an "interactive book", which means, you can use this directory as a typical flat-file CMS.

Finish

Now you have setup Interactive Books' Atelier and you can use your storage\leaves folder as a full-functioning flat-file CMS, but as of now, because we are just developing the documentation, stay tuned for more updates on how to use iba. But before walking away doubtful whether to spend the time to figure out how things works on your own or not, you can try to learn how things work by looking at the example package of full-functioning blog engine we created for iba and published open source and free under MIT liscence.

Require lil-plp/iba-blog package via composer and run php artisan vendor:publish command just as we did before to install this package.

Open configs/iba.php and add post to the book_types array.

Now if you access the /iba/atelier/analog/ route of your laravel instance, you will be able to create and edit new blog posts, mention people in your posts ...

Look at the Post.php file and the routes and migration folders and Http/Controllers/WeblogController.php to see what you need to create a new book_type. It may see a bit overwhelming at first, but it is really very very very simple.

More info