API PRO

A simple, production-ready REST API architecture for PHP, designed and maintained by 4SS Software Solutions.

About API PRO

Built to remove unnecessary complexity

API PRO is a lightweight REST API architecture created to simplify complex PHP backends. It removes deep routing, excessive layers, and unnecessary framework overhead.

The goal of API PRO is to let developers focus entirely on business logic while keeping APIs clean, predictable, and easy to maintain.

How to Install API PRO

Install using Composer

composer create-project codesignificant/api-pro
php api-pro/publish.php

Packagist:

https://packagist.org/packages/codesignificant/api-pro


GitHub:

https://github.com/CodeSignificant/api-pro.git

Sample Code

API PRO structure and usage

// REST end points in /index.php

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/autoload.php';

require_once __DIR__ . '/lib/services/HelloService.php';

$helloService = ProNode::Service("/v1/hello", new HelloService());
helloService->get("/say", "sayHello");
helloService->post("/save", "save");

ProNode::start();
// SERVICES in /lib/services/HelloService.php

class HelloService{

  public function sayHello($node){
    return new DataSuccess("Welcome API PRO Rest API");
  }

  public function save($node){
    return new DataSuccess("Welcome API PRO Rest API");
  }
}
// GET in /lib/services/HelloService.php

public function HelloService($node)
{
  public function sayHello($node){
    return new DataSuccess("Welcome API PRO Rest API");
  }
}
// POST in /lib/services/HelloService.php

public function HelloService($node)
{
  public function save($node){
    $payload = $node->body();
    $name = $payload['name'];
    return new DataSuccess("Welcome ".$name);
  }
}

Contact

API PRO by 4SS Software Solutions

Company: 4SS Software Solutions Pvt. Ltd.

Email: adi@4ss.in

Website: https://4ss.in