PHPackages                             jcarrasco96/my-api-rest - 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. jcarrasco96/my-api-rest

ActiveLibrary

jcarrasco96/my-api-rest
=======================

PHP library for creating secure and simple REST APIs.

10PHP

Since Aug 5Pushed 9mo agoCompare

[ Source](https://github.com/Jcarrasco96/my-api-rest)[ Packagist](https://packagist.org/packages/jcarrasco96/my-api-rest)[ RSS](/packages/jcarrasco96-my-api-rest/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

My API REST – Microframework PHP
================================

[](#my-api-rest--microframework-php)

[![PHP](https://camo.githubusercontent.com/bf1fa3e5f43304def94761944b3015b94c9fb2fa925232f058f4d04ca4d3e995/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666f722d7468652d6261646765266d6573736167653d50485026636f6c6f723d373737424234266c6f676f3d706870266c6f676f436f6c6f723d464646464646266c6162656c3d)](https://camo.githubusercontent.com/bf1fa3e5f43304def94761944b3015b94c9fb2fa925232f058f4d04ca4d3e995/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666f722d7468652d6261646765266d6573736167653d50485026636f6c6f723d373737424234266c6f676f3d706870266c6f676f436f6c6f723d464646464646266c6162656c3d)

[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/Jcarrasco96/my-api-rest)

📝 Description
-------------

[](#-description)

This project is a RESTful microframework written in **pure PHP**, designed for developing modern APIs in a simple, organized way without external dependencies. It includes dynamic controllers by convention, permission checking via attributes, access control, and request limits (`RateLimit`).

🚀 Features
----------

[](#-features)

✅ Versioned Controllers
✅ Dynamic Routing
✅ Custom Attributes
✅ Permission Checking and JWT
✅ Request Limiting
✅ Layer Separation
✅ No External Dependencies

📁 Project structure
-------------------

[](#-project-structure)

```
/attributes/
/console/
/core/
/db/
/exceptions/
/languages/
/query/
/rest/
/validators/
composer.json
LICENSE.md
README.md (this file)

```

🔧 Requirements
--------------

[](#-requirements)

✅ PHP &gt;=8.2
✅ Apache or Nginx server (friendly URLs)
✅ PDO extension enabled
✅ File system access (for logs and rate limiting)

⚙️ Example of use of Rate Limit Checker
---------------------------------------

[](#️-example-of-use-of-rate-limit-checker)

```
#[RateLimit(limit: 10, seconds: 60)]
#[Route('auth/login', [Route::ROUTER_POST])]
public function actionLogin(): string
{
    // Login logic and token generation
}
```

📡 Example routes
----------------

[](#-example-routes)

```
GET  /v1/user
POST /v1/user
GET  /v1/product/5

```

The URL automatically determines the controller and method.

📥 Installation
--------------

[](#-installation)

1. Clone this repository ```
    git clone https://github.com/Jcarrasco96/my-api-rest.git

    ```
2. In **composer.json** of main application merge: ```
    {
      "require": {
        "jcarrasco96/simple-api-rest": "1.0.*@dev"
      },
      "repositories": [
        {
          "type": "path",
          "url": "path\\to\\my-api-rest\\src"
        }
      ]
    }
    ```
3. In **index.php** of main application ```
    require_once 'vendor/autoload.php';

    $config = require_once 'config/rest.php'; // config file

    (new Rest($config))->run();
    ```

🪤 Pull requests are welcome
---------------------------

[](#-pull-requests-are-welcome)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance41

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/23435b3c0eaaef12c98316e73580a78b38f8ff35d9163ce769d5d6190420c566?d=identicon)[Jcarrasco96](/maintainers/Jcarrasco96)

---

Top Contributors

[![Jcarrasco96](https://avatars.githubusercontent.com/u/35962267?v=4)](https://github.com/Jcarrasco96 "Jcarrasco96 (15 commits)")

### Embed Badge

![Health badge](/badges/jcarrasco96-my-api-rest/health.svg)

```
[![Health](https://phpackages.com/badges/jcarrasco96-my-api-rest/health.svg)](https://phpackages.com/packages/jcarrasco96-my-api-rest)
```

PHPackages © 2026

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