PHPackages                             codesignificant/api-pro - 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. codesignificant/api-pro

ActiveProject

codesignificant/api-pro
=======================

API PRO – Lightweight PHP REST API framework

v1.0.1(1mo ago)024↓100%MITPHPPHP &gt;=7.4

Since Jan 5Pushed 1mo agoCompare

[ Source](https://github.com/CodeSignificant/api-pro)[ Packagist](https://packagist.org/packages/codesignificant/api-pro)[ RSS](/packages/codesignificant-api-pro/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (6)Used By (0)

ApiPro

ApiPro is a lightweight, production-ready PHP API framework designed for structured service-based applications.

It provides:

Deterministic pagination (including grouped queries)

UUID-first schema design

Structured API responses

Strict file upload handling

Safe storage for generated files

Service-driven architecture

Microservice-ready foundation

Installation

Install via Composer:

composer require your-vendor/apipro

Requirements:

PHP 8.1+

MySQL / MariaDB

ext-curl (recommended)

Core Concepts

1. Structured Responses

All endpoints return a consistent response structure:

return new DataSuccess("Message", $data); return new DataFailed("Error message");

Example response:

{ "success": true, "message": "Fetched successfully", "data": { ... } }

2. UUID-First Database Design

All tables use UUID as primary key:

id CHAR(36) NOT NULL DEFAULT uuid()

Benefits:

Distributed-safe

Microservice-friendly

No auto-increment conflicts

Horizontally scalable

3. Pagination (Deterministic &amp; Group-Safe)

ApiPro provides production-grade pagination:

ProSql::FetchPaginated( $table, $columns, $where, $page, $orderBy, $pageSize );

Supports:

JOIN queries

GROUP BY queries

Subqueries

Deterministic ordering

Custom counters

Order direction convention:

\['+created\_at'\] // DESC \['-created\_at'\] // ASC

Grouped pagination is handled safely to prevent duplicate counts.

4. File Handling Upload Files (HTTP only) Files::save($\_FILES\['file'\], "/storage/images");

Features:

Strict is\_uploaded\_file() validation

Safe directory creation

Unique naming

Size reporting

Store Generated Files (Exports, Reports) Files::storage($absolutePath, "/exports/reports");

Used for:

Excel exports

CSV reports

Background-generated files

Upload and generated file flows are intentionally separated for security and correctness.

5. Service-Based Architecture

Each module follows a service structure:

class ProductService {

```
public function fetch($node) {}
public function create($node) {}
public function update($node) {}
public function setup($node) {}

```

}

Responsibilities:

setup() → schema creation

fetch() → paginated listing

create() → insert logic

update() → modification logic

Example Use Cases

ApiPro is suitable for:

E-commerce platforms

Variant-based product filtering

RGB color nearest search

Cart and order management

Seller onboarding systems

Invoice generation

Export automation

Logging systems

Safe Schema Setup Pattern public function setup($node) { ProSql::Query(" CREATE TABLE IF NOT EXISTS products ( id CHAR(36) NOT NULL DEFAULT uuid(), PRIMARY KEY(id), title VARCHAR(255) NOT NULL ) ");

```
return new DataSuccess("Table ready");

```

}

Supports:

Force recreate mode

Idempotent table creation

Production-safe migrations

Security Model

No file path leakage

Strict upload validation

No bypass of is\_uploaded\_file

Escaped SQL inputs

Explicit API failure handling

Suggested Project Structure app/ ├── Services/ │ ├── ProductService.php │ ├── OrderService.php │ ├── SellerService.php │ └── LogService.php ├── Core/ │ ├── ProSql.php │ ├── Files.php │ └── DataResponse.php

Best Practices

Always use FetchPaginated for listings

Use UUID everywhere

Keep upload and storage flows separate

Validate external API status responses

Use grouped pagination correctly

Roadmap

Background job support

Queue system

Token-based file downloads

Validation layer

Rate limiting

Module scaffolding

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~13 days

Total

4

Last Release

37d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5efa8616d71ab7a6817a8e54ef43c72a395e30f274f250136a93e7ff1a964d34?d=identicon)[CodeSignificant-4SS](/maintainers/CodeSignificant-4SS)

---

Top Contributors

[![CodeSignificant](https://avatars.githubusercontent.com/u/108189881?v=4)](https://github.com/CodeSignificant "CodeSignificant (25 commits)")

### Embed Badge

![Health badge](/badges/codesignificant-api-pro/health.svg)

```
[![Health](https://phpackages.com/badges/codesignificant-api-pro/health.svg)](https://phpackages.com/packages/codesignificant-api-pro)
```

PHPackages © 2026

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