2017 © Pedro Peláez
 

library app

image

limoncello-php/app

  • Wednesday, July 25, 2018
  • by neomerx
  • Repository
  • 3 Watchers
  • 60 Stars
  • 166 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 18 Open issues
  • 27 Versions
  • 19 % Grown

The README.md

License, (*1)

Summary

How to create JSON API application, (*2)

Limoncello App is a fully featured OAuth 2.0 JSON API quick start application., (*3)

Out-of-the-box it has, (*4)

  • JSON API CRUD operations (create, read, update and delete) for a few sample resources with to-one, to-many and many-to-many relationship types.
  • Support for such JSON API features as resource inclusion, sparse field sets, sorting, filtering and pagination.
  • Database migrations and seedings.
  • OAuth 2.0 server authentication and role authorization.
  • Admin panel for managing users and roles.
  • Cross-Origin Resource Sharing (CORS).
  • JSON API errors.
  • API tests.
  • Web tests.

Supported features - Multiple nested paths resource inclusion (e.g. posts,posts.user,posts.comments.user). - Filtering and sorting by multiple attributes in resources and its relationships. - Supported operators =, eq, equals, !=, neq, not-equals, <, lt, less-than, <=, lte, less-or-equals, >, gt, greater-than, >=, gte, greater-or-equals, like, not-like, in, not-in, is-null, not-null. - Pagination works for main resources and resources in relationships. Limits for maximum number of resources are configurable., (*5)

Based on - Zend Diactoros - Doctrine - Pimple - Monolog - FastRoute - Twig - JSON API implementation - Cross-Origin Resource Sharing - Built with :heart: Limoncello, (*6)

It could be a great start if you are planning to develop JSON API., (*7)

Feel free to ask questions and thank you for supporting the project with :star:., (*8)

Installation

1 Create project

$ composer create-project --prefer-dist limoncello-php/app app_name
$ cd app_name

Recommended additional step, (*9)

$ npm install

or, (*10)

$ yarn install

2 Run server

Application runs PHP built-in server on port 8080, (*11)

$ composer serve

Recommended, (*12)

$ npm serve

or, (*13)

$ yarn serve

Port could be configured in composer.json or client/webpack/base.config.js, (*14)

If you use Postman here is a collection of API requests that would work with a local server (reading users, filter users, create users, and etc)., (*15)

Run in Postman, (*16)

Here is a Postman screen-shot with the collection opened, (*17)

Requests in Postman, (*18)

3 Turn on production mode (optional)

By default the application is installed in development mode (less performance, tests and development libraries are available). Application could be switched into production mode (higher performance, no tests, no development libraries) with command, (*19)

$ composer build

Performance comparision with other frameworks could be found here and here., (*20)

Testing

$ composer test

How-to add Google Auth to the Application

You can find detailed instructions here., (*21)

License

MIT license, (*22)

The Versions