PHPackages                             rekalogika/api-lite - 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. rekalogika/api-lite

ActiveSymfony-bundle[API Development](/categories/api)

rekalogika/api-lite
===================

A set of tools to simplify working with API Platform in your projects. Comes with guides, patterns, and practical examples for building API Platform-based projects.

v0.9.1(1y ago)62.3k[3 PRs](https://github.com/rekalogika/api-lite/pulls)MITPHPPHP &gt;=8.2CI passing

Since Feb 28Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/rekalogika/api-lite)[ Packagist](https://packagist.org/packages/rekalogika/api-lite)[ Docs](https://rekalogika.dev/api-lite)[ GitHub Sponsors](https://github.com/priyadi)[ RSS](/packages/rekalogika-api-lite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (52)Versions (23)Used By (0)

rekalogika/api-lite
===================

[](#rekalogikaapi-lite)

A set of tools to simplify working with [API Platform](https://api-platform.com/) in your projects. Comes with guides, patterns, and practical examples for building API Platform-based projects.

Apply existing knowledge, experience, and patterns of working with Symfony controllers to API Platform state providers and processors. Decouple your persistence layer from the API frontend layer. Apply Domain-Driven Design (DDD) principles to your API Platform-based projects, as well as other architectural patterns and best practices, including SOLID, onion architecture, clean architecture, hexagonal architecture, and others.

'Lite' means we are refraining from using all of API Platform's features and automations in favor of better readability, simplicity, and flexibility.

Full documentation is available at [rekalogika.dev/api-lite](https://rekalogika.dev/api-lite/).

Motivation
----------

[](#motivation)

API Platform documentation encourages developers to use plain old PHP objects (POPOs) or data transfer objects (DTOs) as the models for API communication, instead of using domain entities directly for this purpose. But it does not establish a practical working patterns for that approach.

Practically all the examples and demos we find on the Internet still attach `ApiResource` to Doctrine entities.

Sometimes API Platform can feel very rigid. It can be difficult to figure out how to accomplish things outside its conventions. There are ways around any problem, just not always immediately obvious. It can feel like that we just want to express what we need by writing a PHP code, not by figuring out the correct combination of attributes to use.

Those coming from Symfony controllers might find API Platform's approach very different, but it does not have to be.

Installation
------------

[](#installation)

```
composer require rekalogika/api-lite
```

Synopsis
--------

[](#synopsis)

```
use Doctrine\Common\Collections\Collection;
use Rekalogika\ApiLite\State\AbstractProvider;
use Rekalogika\Mapper\CollectionInterface;

#[ApiResource(
    shortName: 'Book',
    operations: [
        new Get(
            uriTemplate: '/books/{id}',
            provider: BookProvider::class
        ),
    ]
)]
class BookDto
{
    public ?Uuid $id = null;
    public ?string $title = null;
    public ?string $description = null;

    /**
     * @var ?CollectionInterface
     */
    public ?CollectionInterface $reviews = null;
}

/**
 * @extends AbstractProvider
 */
class BookProvider extends AbstractProvider
{
    public function __construct(
        private BookRepository $bookRepository
    ) {
    }

    public function provide(
        Operation $operation,
        array $uriVariables = [],
        array $context = []
    ): object|array|null {
        $book = $this->bookRepository
            ->find($uriVariables['id'] ?? null)
            ?? throw new NotFoundException('Book not found');

        $this->denyAccessUnlessGranted('view', $book);

        return $this->map($book, BookDto::class);
    }
}
```

To-Do List
----------

[](#to-do-list)

- Figure out &amp; implement filtering.

Documentation
-------------

[](#documentation)

[rekalogika.dev/api-lite](https://rekalogika.dev/api-lite/)

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~23 days

Recently: every ~29 days

Total

19

Last Release

383d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d0eed333cf2f0d552e9a4d0ca1c6a8fc0be0506bbc5e7516f6985b17b86043?d=identicon)[priyadi](/maintainers/priyadi)

---

Top Contributors

[![priyadi](https://avatars.githubusercontent.com/u/1102197?v=4)](https://github.com/priyadi "priyadi (48 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

apisymfonyopenapiddddtoapi-platform

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rekalogika-api-lite/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[rekalogika/mapper

An object mapper for PHP and Symfony. Maps an object to another object. Primarily used for transforming an entity to a DTO and vice versa.

3847.7k1](/packages/rekalogika-mapper)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[harmbandstra/swagger-ui-bundle

Exposes swagger UI inside your Symfony project through a route (eg. /docs)

42867.3k](/packages/harmbandstra-swagger-ui-bundle)[artyuum/request-dto-mapper-bundle

This bundle provides an easy way to automatically map the incoming request data to a DTO and optionally validate it.

515.8k](/packages/artyuum-request-dto-mapper-bundle)

PHPackages © 2026

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