PHPackages                             yurii-github/yii2-mylib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yurii-github/yii2-mylib

ActiveProject[Utility &amp; Helpers](/categories/utility)

yurii-github/yii2-mylib
=======================

My book library

v3.0(1y ago)4232[1 issues](https://github.com/yurii-github/my-library/issues)GPL-3.0-onlyJavaScriptPHP ~8.3

Since Feb 11Pushed 1y ago2 watchersCompare

[ Source](https://github.com/yurii-github/my-library)[ Packagist](https://packagist.org/packages/yurii-github/yii2-mylib)[ RSS](/packages/yurii-github-yii2-mylib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (9)Used By (0)

[![Maintainability](https://camo.githubusercontent.com/3866dbd08e4df2fcb1308e89d17be170b5f9a70efffec8878a766abd896ca781/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32346564363431383162313365323163643265632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/yurii-github/my-library/maintainability) [![Test Coverage](https://camo.githubusercontent.com/8787adac5ae7069390ab7ecc8be50de9483b92b8b6b6993198090c8857efa6b8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32346564363431383162313365323163643265632f746573745f636f766572616765)](https://codeclimate.com/github/yurii-github/my-library/test_coverage)

This is book library manager, written in PHP and based on Slim4 and JqueryUI.
The main purpose of it is to manage own book library as excel table with ratings and other stuff like filename synchronizations of your books and more.
It supports all JQuery UI themes.

[![library main](public/library_1.png)](public/library_1.png)

[![library config](public/library_2.png)](public/library_2.png)

[![library import ](public/library_3.png)](public/library_3.png)

Functionality
-------------

[](#functionality)

- excel table is sortable, pagable
- books CRUD
- books categories
- book cover is saved to database
- book cover can be dropped in web interface
- book cover can be imported from PDF (you need to have [ghostScript](https://www.ghostscript.com/))
- web interface is fully themed (all JqueryUI themes)
- i18n
- MySQL and SQLite support
- synchronization with filesystem (renames, deletes)
- migrations
- configuration is done via web interface

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- SQLite or MySQL database

Setup &amp; Run
---------------

[](#setup--run)

```
git clone git@github.com:yurii-github/my-library.git
cd my-library
composer install
./serve

```

Application will be available at

Structure
---------

[](#structure)

Here's the list of most interesting places:

```
├── data            -  -  -  -  -  -  -  - your data is stored here
│   ├── config.json          -  -  -  -  - settings set via web interface
│   └── mydb.s3db            -  -  -  -  - book SQLite database
├── src
├── tests
├── public
│   ├── 3rd         -  -  -  -  -  -  -  - 3rd party assets
│   ├── assets      -  -  -  -  -  -  -  - our assets
├── └── index.php   -  -  -  -  -  -  -  - entry point of the application
└── serve           -  -  -  -  -  -  -  - run webapp locally
------
```

Sync
----

[](#sync)

If you have enabled synchronization application will sync changes to your filesystem!

- Any cell change that has influence on filename of the book will cause its rename
- If you delete book in MyLibrary it will delete corresponding real file if sync is *ON*
- You cannot remove records without corresponding real file if sync is *ON*
- You have to manage file extension manually to rename file properly.
- If you change book filename format it will not rename all books! It will apply new format only to newly renamed books

Importing new books
-------------------

[](#importing-new-books)

To import books into the library you have to drop your books to library folder you've set in configuration and then on *Import* tab press "Import Books". It will import all books from file system that are not in database yet.

Development
===========

[](#development)

To configure tests' run you can create local env file `tests/local_test_env.php` with content like below

```
