PHPackages                             luk-z/api-proxy-php - 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. [API Development](/categories/api)
4. /
5. luk-z/api-proxy-php

ActiveLibrary[API Development](/categories/api)

luk-z/api-proxy-php
===================

API Proxy written in PHP using Lumen framework

v1.0.3(3mo ago)04[1 PRs](https://github.com/lukzed/api-proxy-php/pulls)MITPHPPHP ^7.3|^8.0

Since Jan 5Pushed 3mo agoCompare

[ Source](https://github.com/lukzed/api-proxy-php)[ Packagist](https://packagist.org/packages/luk-z/api-proxy-php)[ Docs](https://github.com/Luk-z/api-proxy-php)[ RSS](/packages/luk-z-api-proxy-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/f7fcb02f726f66503059388302fb633f9ef506b9e0cbcf99103215c73dd33945/68747470733a2f2f706f7365722e707567782e6f72672f6c756b2d7a2f6170692d70726f78792d7068702f76)](https://packagist.org/packages/luk-z/api-proxy-php)

api-proxy-php
=============

[](#api-proxy-php)

A PHP API proxy (headless) project built using the Lumen framework.

This is a lightweight API proxy built with Lumen (Laravel micro-framework). It provides a simple REST API structure without database or view management.

Usage in applications
---------------------

[](#usage-in-applications)

1. Install as dependency

```
composer require luk-z/api-proxy-php
```

2. Add custom includes To add custom Controllers and Routes just define these constants:

-

2. Copy the environment file:

```
cp .env.example .env
```

### Required `define`

[](#required-define)

In order to work the following php define should be defined:

- APP\_TABLE\_APPS

These php defined are optional

- `APP_ADD_DEFAULT_ROUTES`: add default hello world and test routes
- `APP_CUSTOM_INCLUDES_PATH`
- `APP_CUSTOM_ROUTES_PATH`

Requirements
------------

[](#requirements)

- PHP 7.3 or higher
- Composer

Development
-----------

[](#development)

### Setup local machine

[](#setup-local-machine)

To install dependencies php 7.3+ and composer are needed. Instead installing them in the local machine use a dockerized composer (requires Docker Desktop).

Create `php` and `composer` aliases following [this guide](https://github.com/lukzed/dockerized-composer).

1. Clone the repository:

```
git clone https://github.com/lukzed/api-proxy-php.git project_name && rm -rf ./project_name/.git
cd project_name
```

2. Install suggested vscode extensions
3. Copy the `php-cs-fixer-wrapper.sh` file:

```
cp php-cs-fixer-wrapper.sh.example php-cs-fixer-wrapper.sh
```

change `WORKSPACE_ROOT=""` inserting the application absolute path (use `pwd` command to obtain absolute path)

4. Install dependencies:

```
composer install
```

### Running the Application

[](#running-the-application)

Start the development server:

```
php -S localhost:8000 -t public
```

The application will be available at `http://localhost:8000`.

Development Tools
-----------------

[](#development-tools)

### Code Quality and Formatting

[](#code-quality-and-formatting)

This project includes PHP linting and formatting tools that work seamlessly with Visual Studio Code.

#### Tools Included

[](#tools-included)

- **PHP\_CodeSniffer (PHPCS)**: Linter for detecting coding standard violations (PSR-12)
- **PHP CS Fixer**: Automatic code formatter
- **PHPUnit**: Testing framework for unit and integration tests

#### Visual Studio Code Setup

[](#visual-studio-code-setup)

1. Install the recommended extensions when prompted, or manually install:

    - PHP CS Fixer (`junstyle.php-cs-fixer`)
    - PHP\_CodeSniffer (`ikappas.phpcs`)
    - PHP Intelephense (`bmewburn.vscode-intelephense-client`)
2. The workspace settings (`.vscode/settings.json`) are pre-configured to:

    - Enable format on save
    - Run PHP CS Fixer automatically
    - Show PHPCS violations in real-time

#### Command Line Usage

[](#command-line-usage)

Check for coding standard violations:

```
composer lint
```

Automatically fix coding standard violations:

```
composer lint:fix
```

Format code using PHP CS Fixer:

```
composer format
```

Check what PHP CS Fixer would change (dry run):

```
composer format:check
```

#### Configuration Files

[](#configuration-files)

- `phpcs.xml` - PHP\_CodeSniffer configuration (PSR-12 standard)
- `.php-cs-fixer.php` - PHP CS Fixer configuration
- `phpunit.xml` - PHPUnit configuration
- `.vscode/settings.json` - VS Code workspace settings
- `.vscode/extensions.json` - Recommended VS Code extensions

### Testing

[](#testing)

This project uses PHPUnit for testing.

Run all tests:

```
composer test
```

Run tests with coverage:

```
./vendor/bin/phpunit --coverage-html coverage
```

Tests are located in the `tests/` directory and follow the PSR-12 coding standard.

API Endpoints
-------------

[](#api-endpoints)

### Root Endpoint

[](#root-endpoint)

```
GET /

```

Returns the Lumen version information.

### Hello World Endpoint

[](#hello-world-endpoint)

```
GET /hello

```

Returns a simple JSON response:

```
{
  "message": "Hello World!"
}
```

Project Structure
-----------------

[](#project-structure)

```
.
├── app/
│   ├── Console/           # Console commands
│   ├── Exceptions/        # Exception handlers
│   └── Http/
│       └── Controllers/   # API controllers
├── bootstrap/             # Framework bootstrap
├── public/                # Public web root
├── routes/                # Route definitions
└── storage/               # Logs and cache

```

License
-------

[](#license)

This project is open-sourced software licensed under the MIT license.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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 ~10 days

Total

4

Last Release

101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55948cc6e05d34fe6bc3f96ce9d862bb421d28ef9a946051c90dccdad497017d?d=identicon)[lucagcc@gmail.com](/maintainers/lucagcc@gmail.com)

---

Top Contributors

[![Luk-z](https://avatars.githubusercontent.com/u/7655943?v=4)](https://github.com/Luk-z "Luk-z (20 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (12 commits)")

---

Tags

phpmiddlewareapiproxylumenapi-gateway

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/luk-z-api-proxy-php/health.svg)

```
[![Health](https://phpackages.com/badges/luk-z-api-proxy-php/health.svg)](https://phpackages.com/packages/luk-z-api-proxy-php)
```

###  Alternatives

[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3372.3M3](/packages/darkaonline-swagger-lume)[reindert-vetter/api-version-control

A Laravel package to manage versions of endpoints in an elegant way

1671.0M](/packages/reindert-vetter-api-version-control)[shipu/php-aamarpay-payment

PHP client for Aamarpay Payment Gateway API

3214.6k](/packages/shipu-php-aamarpay-payment)

PHPackages © 2026

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