# myLibrary

Documentation version 1.0

## Table of Content

1. Getting Started
2. How to Install
3. App Usage
4. Developers
5. Translations
6. Support Desk
7. Files & Sources
8. Version History (Changelog)

- Item Name : myLibrary
- Item Version : Version 1.0
- Minimum Required : PHP 5.6
- Author by : Manrix
- Support : https://codecanyon.net/user/manrix

myLibrary is a single page application (SPA) that allows you to easily manage your library activity. It allows you to manage books, clients and rentals. The interface is 100% responsive and can be used from any device. You can use it on you hosting or offline on your localhost server, there are't any dependency from external sources.

### Features:

- * Login system
- * Books, clients, rentals
- * Books and clients activity
- * Lightweight application
- * Responsive interface
- * Translatable interface
- * XSS, CSRF protections

## Getting Started #back to top

Thanks for purchase. Let's start !

There're 3 folders inside the archive:

1. upload - Contains all files to upload.
2. dev - Contains all the files used to develop the application. Better don't use them for hosting.
3. documentation

Before you can use the app you've to configure the database settings in upload/bootstrap/settings.php file and then follow the installation steps.

#### Settings Configuration

Open bootstrap/settings.php and set your database information

    						//Database
    						'db' => [
    							'host' => 'localhost',
    							'user' => 'your database user',
    							'pass' => 'your database password',
    							'dbname' => 'your database name',
    						],

## How to Install #back to top

Be sure you've configured the database informations in settings file or you can't go ahead with installation

These are the steps to install and configure the application first time.

1. Upload all files contained in upload folder to your host.
2. Open your browser and navigate to mydomain.com/my-app-folder/install. This will check requirements install the database tables. Check the image on right.
3. If all went ok with installation, you can now create a new user.
4. Compile the form at bottom of that page and press on "Submit".
5. Try to access the app.
6. If all is ok, delete the install folder.
7. Congratulations, you installed the app!

## App usage #back to top

myLibrary allows you to manage books, clients, rentals. It's composed by 3 main pages:

1. Overview: shows you the rentals and allows you to manage them.
2. Books: shows you all the books in database.
3. Clients: shows you all clients in database.
4. Settings: allows you to manage the staff and settings.

#### Overview #back to top

#### Books - #back to top

#### Clients - #back to top

## Developers #back to top

If you want to edit the code and make modifications to the app, you've to use the files inside dev folder.

The main difference between dev files and upload files are:

1. dev files are more than the ones in upload folder, unnecessary files for public use.
2. dev slim framework is set to display errors for developers.
3. dev files are't minified and compressed.

#### App explained

This app makes use of 2 main framework: Slim 3 and Backbone. Slim is used for all backend logic (connection with database). Backbone is used for all frontend to build the pages and interact with back-end. All communications between these two frameworks happens with CRUD interface.

#### Backend

If you want to edit the backend code you can find all php files inside app folder.

#### Frontend

If you want to edit the frontend code you can find all php files inside js folder. Here you've the main.js file that loads all js files with RequireJS and the app folder that contains all models and views used by backbone.

Once you made all the desired modifications, you can rebuild the upload folder using RequireJS Optimizer (r.js). To use the optimizer you need node.js and run this command from console:

    						//Navigate to your app folder

    						node r.js -o build/app.build.js

For more informations visit the official documentation.

## Translations #back to top

myLibrary frontend can also be translated to your native language. The application will auto detect the browser language with javascript.

To create a new translation follow these steps:

1. Go to js/nls folder and create a new folder named as your language identifier. Example italian = it-it, french = fr-fr ecc.
2. Go to js/nls/it-it, copy the language.js file and paste it in your new folder.
3. Open language.js and edit the strings as you want.
4. Open the main language.js in nls folder and add your language identifier at bottom, like this:

       								'it-it': true,
       								'fr-fr': true,
       								'custom-custom': true

## Support Desk #back to top

Please remember you have purchased a very affordable script and you have not paid for a full-time developer. Occasionally we will help with small tweaks, but these requests will be put on a lower priority due to their nature.

Please visit our profile page

Support for my items includes:

- * Responding to questions or problems regarding the item and its features
- * Fixing bugs and reported issues
- * Providing updates to ensure compatibility with new software versions

Item support does not include:

- * Customization and installation services
- * Support for third party software and plug-ins

Before seeking support, please...

- * Make sure your question is a valid script Issue and not a customization request.
- * Make sure you have read through the documentation and any related video guides before asking support on how to accomplish a task.
- * Make sure to double check the FAQs.
- * If you have customized your script and now have an issue, back-track to make sure you didn't make a mistake. If you have made changes and can't find the issue, please provide us with your changelog.
- * Almost 80% of the time we find that the solution to people's issues can be solved with a simple "Google Search". You might want to try that before seeking support. You might be able to fix the issue yourself much quicker than we can respond to your request.

## Files & Sources #back to top

Included Stylesheets

These are the primary CSS files used for general front-end styling. All included css codes under css folder

- 1. style.css - Primary stylesheet
- 2. bootstrap.css - Bootstrap stylesheet
- 3. animated.css - Animate
- 4. font-awesome.css - FontAwesome Font Icons stylesheet
- 5. nprogress.css - Nprogress
- 6. daterangepicker.css - Date Range Picker
- 7. select2.css - Select2

Included JavaScript

These are the various attribution inks to the Javascript files included or modified. All included JavaScript codes under js/libs folder

- 1. bootstrap.js - Bootstrap
- 2. underscore.js - Underscore
- 3. backbone.js - Backbone
- 4. backbone-validation.js - Backbone Validation
- 5. bootstrap-notify - Bootstrap Notify
- 6. daterangepicker.js - Date Range Picker
- 7. select2.js - Select2
- 8. moment.js - Select2
- 9. nprogress.js - Nprogress

## Version History (Changelog) #back to top

Once again, thank you so much for purchasing this script. As I said at the beginning, I'd be glad to help you if you have any questions relating to this script. No guarantees, but I'll do my best to assist. If you have a more general question relating to the scripts on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

#### Changelog

    						-----------------------------------------------------------------------------------------
    						Version 1.0.0 - 11-24-2016
    						-----------------------------------------------------------------------------------------

    						- first release