PHPackages                             ahmedosama/php-api - 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. ahmedosama/php-api

ActiveProject[API Development](/categories/api)

ahmedosama/php-api
==================

Make an API for your application using PHP

v1.1.0(1y ago)533MITPHPPHP &gt;=8.0

Since Nov 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Ahmed-Osama2022/php-api)[ Packagist](https://packagist.org/packages/ahmedosama/php-api)[ RSS](/packages/ahmedosama-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

PHP API
=======

[](#php-api)

- This is a simple php-api project to make an API for your application using PHP native.

REQUIRMENTS
-----------

[](#requirments)

- PHP v8.0 or higher.
- composer

Download and install
--------------------

[](#download-and-install)

```
git clone https://github.com/ahmed-osama2022/php-api
cd php-api
composer install
```

- Then serve the public folder

```
# if you're using php-cli
php -S localhost:8000 -t public
```

### example of .env file

[](#example-of-env-file)

- You should put your `.env` file at the root folder in the project.

```
DB_HOST=
DB_NAME=
DB_PORT=
DB_USER=
DB_PASS=
```

### Check if it is working fine

[](#check-if-it-is-working-fine)

- If you start serving the project you should see this welcome page at your serving link.
- Welcome Page [![Welcome screen](./screenshots/php-api-welcome-page.png)](./screenshots/php-api-welcome-page.png)
- Test route [![Test route](./screenshots/php-api-test-route.png)](./screenshots/php-api-test-route.png)

### How to work with?

[](#how-to-work-with)

#### NOTE: This library uses `MVC` in the structure.

[](#note-this-library-uses-mvc-in-the-structure)

#### NOTE: This project uses `psr-4 autoloader` for the `src` and `App` folder.

[](#note-this-project-uses-psr-4-autoloader-for-the-src-and-app-folder)

- Put all your credentials for the database in the `.env` file.
- Define all your routes as explained in the `src/Router.php` file.
- You will see an example in the files to tell you How to use it fine.
- Start making the logic of your application as contrllers you defined in the `App/controllers` folder.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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 ~11 days

Total

2

Last Release

531d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfb23dfd544b8c8d55a2500073ab4541fca571e0a55cbaac01842b4e971bf20f?d=identicon)[ahmedosama](/maintainers/ahmedosama)

---

Top Contributors

[![Ahmed-Osama2022](https://avatars.githubusercontent.com/u/106707667?v=4)](https://github.com/Ahmed-Osama2022 "Ahmed-Osama2022 (31 commits)")

---

Tags

apiapi-restapi-serverapisphpphp-apiphp-apisphp-frameworkphp-libraryphp7php8rest-apirestful-apiphpapiREST APIphp8react-phpPHP-APIapis

### Embed Badge

![Health badge](/badges/ahmedosama-php-api/health.svg)

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

###  Alternatives

[docusign/esign-client

The Docusign PHP library makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-esign-php-client repository. Join the eSign revolution!

2087.4M13](/packages/docusign-esign-client)[hg/apidoc-thinkphp

thinkphp API文档自动生成

1311.8k](/packages/hg-apidoc-thinkphp)[uderline/openapi-php-attributes

Automatically render your OpenApi 3 file describing your PHP API using attributes

2136.3k](/packages/uderline-openapi-php-attributes)[shahghasiadil/laravel-api-versioning

Elegant attribute-based API versioning solution for Laravel applications with built-in deprecation management and version inheritance

2913.6k](/packages/shahghasiadil-laravel-api-versioning)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)[jeffreyhyer/bamboohr

PHP SDK for the BambooHR API

1077.3k1](/packages/jeffreyhyer-bamboohr)

PHPackages © 2026

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