# bones

![logo](docs/graphics/logo.png)

Minimalist PHP framework that follows the KISS principle.

[![PDS Skeleton](https://img.shields.io/badge/pds-skeleton-blue.svg?style=flat-square)](https://github.com/php-pds/skeleton)

## About

![meme](docs/graphics/meme.png)

### **bones** is an experimental project!

It's not ready for production. If anything, the goal is to show you how to build your own framework.

Using **bones** requires basic knowledge of object-oriented programming, as **bones** is a pure **OOP-based framework**.

**KISS** (an acronym for "keep it simple stupid") is a design rule that every good developer should apply to their code. It reduces complexity and improves readability as well as maintainability by aiming for the simplest solution.

### Key features

* **bones** is a stripped-down **micro PHP framework**.
* It has **no third-party dependencies**.
* It is especially suited for building **small applications**.
* It is **easy to learn** and understand.
* Because there is little configuration required, the framework is **simple to install** and use.
* The project is **well documented**.
* It follows **best coding practices** such as abiding by the [Standard PHP Package Skeleton](https://github.com/php-pds/skeleton).
* Regarding the **coding style**, the code adheres to the [PSR-12](https://www.php-fig.org/psr/psr-12/) specification.
* The framework provides a very basic **template engine**.
* It also has support for **SQLite**.

## Getting started

### Requirements

* **PHP 7.3** with **SQLite3** support enabled.

### Installing **bones**

You can use **git**:

        git clone https://git.lattuga.net/netico/code-library.git

Go to the root directory of the framework:

        cd code-library/Framework/bones

And finally:

        composer install

### Usage

The *documentation* app is built with **bones** and is the best starting point to learn how the framework works.

You can run the *documentation* app with PHP's built-in webserver:

        composer app

Now open the address *https://localhost:8000* in your browser.

## Screenshots

![screeenshot-01](docs/graphics/screenshot-01.png)

*documentation* app

![screeenshot-02](docs/graphics/screenshot-02.png)

API documentation

## Hacking

It may be helpful to read the **API documentation**, inside the *documentation* app.

There are other commands available via **composer**.

To build and deploy **bones**:

        composer build

To check the code:

        composer cs

## Further reading

* [PHP Tutorial](https://www.w3schools.com/php/default.asp)
* [PHP: The Right Way](https://phptherightway.com/)
* [Phing - a PHP build tool](https://www.phing.info/)
* [Have you tried Composer Scripts? You may not need Phing](https://blog.martinhujer.cz/have-you-tried-composer-scripts/)
* [Organize Your Next PHP Project the Right Way](https://code.tutsplus.com/tutorials/organize-your-next-php-project-the-right-way--net-5873)

## Logo credits

The [SedgwickAve-Regular](https://fonts.google.com/specimen/Sedgwick+Ave) font is designed by [Kevin Burke](http://www.blastframe.com/). The author of the icon is [Diego Naive](https://www.diegonaive.com/).
