PHPackages                             phprest/phprest-api-blueprint-sample-project - 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. phprest/phprest-api-blueprint-sample-project

ActiveProject

phprest/phprest-api-blueprint-sample-project
============================================

Phprest Sample Project.

224PHP

Since Nov 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phprest/phprest-api-blueprint-sample-project)[ Packagist](https://packagist.org/packages/phprest/phprest-api-blueprint-sample-project)[ RSS](/packages/phprest-phprest-api-blueprint-sample-project/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phprest API Blueprint Sample Project
====================================

[](#phprest-api-blueprint-sample-project)

[![Author](https://camo.githubusercontent.com/2d3fe39a5db918fba059145d397ad932c4b5a88cc66d8bcc8ad7138ca1228286/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406164616d6d62616c6f67682d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/adammbalogh)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Requirements
============

[](#requirements)

- Composer
- Php 5.4 or latest
- MySql 5.x
- NodeJS for API and Documentation Testing
- [Hercule](https://github.com/jamesramsay/hercule) for creating [API Blueprint](https://github.com/apiaryio/api-blueprint) based documentation
- [Apiary client](https://github.com/apiaryio/apiary-client) for creating [API Blueprint](https://github.com/apiaryio/api-blueprint) based documentation
- [Dredd](https://github.com/apiaryio/dredd) for testing [API Blueprint](https://github.com/apiaryio/api-blueprint) based documentation

Installation
============

[](#installation)

1. Create project
-----------------

[](#1-create-project)

```
composer -sdev create-project phprest/phprest-api-blueprint-sample-project /path/to/your/project

```

2. Configure your database settings
-----------------------------------

[](#2-configure-your-database-settings)

In `app/config/orm.php` set your database credentials.

3. Create database
------------------

[](#3-create-database)

```
create database tesselboard collate=utf8mb4_unicode_ci;

```

4. Database migrations
----------------------

[](#4-database-migrations)

*(from the root of your project dir)*

```
vendor/bin/phprest-service-orm migrations:migrate

```

5. Database fixtures
--------------------

[](#5-database-fixtures)

*(from the root of your project dir)*

```
vendor/bin/phprest-service-orm fixtures:set

```

6. Storage dir
--------------

[](#6-storage-dir)

*(from the root of your project dir)*

Storage dir (`app/storage`) has to be writeable by the web server.

Create API Documentation
========================

[](#create-api-documentation)

*(from the root of your project dir)*

```
hercule blueprint/0.1/blueprint.md -o public/blueprint.md;
apiary preview --path=public/blueprint.md --output=public/api_documentation.html

```

Testing API Documentation
=========================

[](#testing-api-documentation)

```
vendor/bin/phprest-service-orm fixtures:set
dredd public/blueprint.md http://localhost/

```

API testing (spec tests)
========================

[](#api-testing-spec-tests)

*(from the root of your project dir)*

```
cd specs
npm install
cd ..
vendor/bin/phprest-service-orm fixtures:set
specs/node_modules/jasmine-node/bin/jasmine-node --verbose specs/tests

```

List your routes
================

[](#list-your-routes)

*(from the root of your project dir)*

```
vendor/bin/phprest routes:get

```

You should get something like this:

MethodRouteHandlerOPTIONS/{version:any}/camera\\Api\\Camera\\Controller\\Camera::optionsGET/{version:any}/camera\\Api\\Camera\\Controller\\Camera::getPOST/{version:any}/camera\\Api\\Camera\\Controller\\Camera::postGET/{version:any}/temperatures\\Api\\Temperature\\Controller\\Temperature::getAllPOST/{version:any}/temperatures\\Api\\Temperature\\Controller\\Temperature::postOPTIONS/{version:any}/temperatures\\Api\\Temperature\\Controller\\Temperature::optionsAllOPTIONS/{version:any}/temperatures/{id:number}\\Api\\Temperature\\Controller\\Temperature::optionsGET/{version:any}/temperatures/{id:number}\\Api\\Temperature\\Controller\\Temperature::getDELETE/{version:any}/temperatures/{id:number}\\Api\\Temperature\\Controller\\Temperature::deleteNginx sample configuration
--------------------------

[](#nginx-sample-configuration)

```
server {
    listen 80;
    server_name localhost;

    root /var/www/application/public;
    index index.php;

    location / {
        try_files $uri $uri/ @rewrite;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location @rewrite {
        rewrite ^ /index.php;
    }

    error_log /var/log/nginx/application_error.log;
}

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a6baa3e2a9539d9296837dc2de6ce61862f69fbe632d1116a0a2a67dbc924e9?d=identicon)[phprest](/maintainers/phprest)

---

Top Contributors

[![adammbalogh](https://avatars.githubusercontent.com/u/645053?v=4)](https://github.com/adammbalogh "adammbalogh (9 commits)")

### Embed Badge

![Health badge](/badges/phprest-phprest-api-blueprint-sample-project/health.svg)

```
[![Health](https://phpackages.com/badges/phprest-phprest-api-blueprint-sample-project/health.svg)](https://phpackages.com/packages/phprest-phprest-api-blueprint-sample-project)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
