2017 © Pedro Peláez
 

library resttemplate

Boilerplate project template for create RESTFul services with docker and database integrated

image

byjg/resttemplate

Boilerplate project template for create RESTFul services with docker and database integrated

  • Monday, July 9, 2018
  • by byjg
  • Repository
  • 2 Watchers
  • 3 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 12 Versions
  • 9 % Grown

The README.md

Reference Architecture project for RESTFul services in PHP

Build Status Opensource ByJG GitHub source GitHub license GitHub release Scrutinizer Code Quality, (*1)

This project is a boilerplate for create Rest Applications API Ready to Use with the best techniques to improve your productivity., (*2)

What is a PHP Rest Template?

mindmap
  (("Reference Architecture"))
    ("PSR Standards")
      ("WebRequests")
      ("Container & Dependency Injection")
      ("Cache")
    ("Authentication & Authorization")
    ("Decoupled Code")
    ("Database")
      ("ORM Integration")
      ("Migration")
      ("Routing")
    ("OpenAPI Integration")
      ("Rest Methods")
      ("Contract Testing")
      ("Documentation")
    ("Error Handling")

It is a PHP-based RESTful API template or boilerplate that aims to simplify the development process of RESTful web services in PHP. It provides a foundation or starting point for building APIs following REST architectural principles., (*3)

Using this PHP Rest Reference Architecture you can focus on the business logic of your application and not in the infrastructure as for example:, (*4)

  • Rapid Development: By offering a pre-defined structure and essential components, the template can expedite the process of building RESTful APIs in PHP.
  • Standardization: The template promotes consistency and adherence to RESTful design principles, making it easier for developers to understand and collaborate on the codebase.
  • Customizable: Developers can modify and extend the template to fit their specific requirements, allowing for flexibility in implementing additional features or business logic.

Key features and components:, (*5)

  • Uses OpenAPI specification for API documentation and endpoint creation.
  • Routing: Includes a routing system that helps map incoming HTTP requests to specific API endpoints or resources.
  • Middleware: It allows developers to add custom logic or perform operations before and after the request is processed.
  • Handling: The project offer utilities to handle and parse incoming requests, extract parameters, and handle request methods (GET, POST, PUT, DELETE, etc.).
  • Response Formatting: It provides mechanisms to format and structure API responses, including JSON serialization, error handling, and status codes.
  • Authentication and Authorization: The template include support for implementing authentication and authorization mechanisms to secure API endpoints using JWT.
  • Database Integration: It offers integration for connecting to databases, executing queries, and managing data persistence.
  • Error Handling: The project include error handling mechanisms to properly handle and format error responses.
  • Dependency Injection: It includes support for dependency injection and inversion of control (IoC) containers.
  • Testing: It includes support for testing the API endpoints and resources, including unit testing and functional testing.
  • PHP Standards: PSR-7 (Http Message Interface), PSR-11 (Container), PSR-16 and PSR-6 (Cache Interface) and others.

This project is not a framework. It is a template that you can use to create your own project. You can use the template as a starting point for your own project and customize it to fit your specific requirements., (*6)

Some Features Explained

This project install the follow components (click on the link for more details):, (*7)

Getting Started

Here some examples of how to use the template:, (*8)


Open source ByJG, (*9)

The Versions

09/07 2018

dev-master

9999999-dev

Boilerplate project template for create RESTFul services with docker and database integrated

  Sources   Download

MIT

The Requires

 

The Development Requires