PHPackages                             oligus/jad - 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. [Database &amp; ORM](/categories/database)
4. /
5. oligus/jad

ActiveLibrary[Database &amp; ORM](/categories/database)

oligus/jad
==========

Json Api to Doctrine ORM

v1.1.6(6y ago)231.6k5[3 issues](https://github.com/oligus/jad/issues)1MITPHPPHP &gt;=7.2CI failing

Since Jun 6Pushed 5y ago4 watchersCompare

[ Source](https://github.com/oligus/jad)[ Packagist](https://packagist.org/packages/oligus/jad)[ RSS](/packages/oligus-jad/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (9)Versions (23)Used By (1)

JAD
===

[](#jad)

JSON Api ❤️ Doctrine ORM

[![Build Status](https://camo.githubusercontent.com/bed7e89e7c1b9b08c23f1444f2f93b99a071146af86ed17bf466d9ee5733475c/68747470733a2f2f7472617669732d63692e6f72672f6f6c696775732f6a61642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/oligus/jad)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Codecov.io](https://camo.githubusercontent.com/0d4101ddd4e5bc770cb983af7f53d3621e1101687d20af0763ba3fdad19cbc7d/68747470733a2f2f636f6465636f762e696f2f67682f6f6c696775732f6a61642f6272616e63682f6d61737465722f6772617068732f62616467652e737667)](https://codecov.io/gh/oligus/jad)[![Maintainability](https://camo.githubusercontent.com/3d4fe26a0075bfad86a741b5b68f4e1f61d2611cc3cb0eb2579fbc427b500630/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64623435613464323962393736303630666538612f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/oligus/jad/maintainability)

JAD is a library created for rapid development of [JSON API](http://jsonapi.org) backend REST implementation. You can run JAD as a standalone server with php -S (see [demo](demo/README.md)), or you can use it as a middleware in your framework.

It turns doctrine entities ([doctrine/doctrine2](https://github.com/doctrine/doctrine2)) to a JSON API resource, or collection of resources automagically.

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

[](#requirements)

You need to have Doctrine installed and preferably setup before you can use Jad.

Install
-------

[](#install)

`composer require oligus/jad`

Quick start
-----------

[](#quick-start)

1. Annotate your entities that you want to expose to JSON-API:

```
/**
 * @ORM\Entity
 * @ORM\Table(name="albums")
 * @Jad\Map\Annotations\Header(type="albums")
 */
class Albums
{
...
```

2. Setup JAD using current entity manager.

```
$jad = new Jad(new Jad\Map\AnnotationMapper($em));
$jad->setPathPrefix('/api/v1/jad');
$jad->jsonApiResult();
```

3. Fetch results

```
GET /api/v1/jad/albums

```

Contents
--------

[](#contents)

[Configure](docs/configure.md)

[Mapping your entities](docs/mapping.md)

[Fetching the resources](docs/fetch.md)

[Fetching resources with relationships](docs/relations.md)

[Creating a new resource](docs/create.md)

[Updating a resource](docs/update.md)

[Deleting resources / relationships](docs/delete.md)

[Validation](docs/validation.md)

Support
-------

[](#support)

### Lumen

[](#lumen)

Support for lumen via middleware.

In your Lumen bootstrap file (../lumen/bootstrap/app.php)

```
// Jad middleware
$app->middleware([
    'jad' => Jad\Support\Lumen\JadMiddleWare::class,
]);

...

// Register Service Providers
$app->register(Jad\Support\Lumen\JadServiceProvider::class);
```

You can go with the default configuration or copy `lumen/vendor/oligus/jad/src/Support/Lumen/jad.php` to `/lumen/config`and change it there.

Contributing
------------

[](#contributing)

When contributing to this repository, please first discuss the change you wish to make via issue before making a pull request.

Authors
-------

[](#authors)

- **Oli Gustafsson** - *Initial work* - [oligus](https://github.com/oligus)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 93.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 ~57 days

Recently: every ~226 days

Total

20

Last Release

2214d ago

PHP version history (3 changes)v1.0.0-alphaPHP &gt;=7.0.0

v1.1.4PHP &gt;=7.1

v1.1.6PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2466591?v=4)[Oli Gustafsson](/maintainers/oligus)[@oligus](https://github.com/oligus)

---

Top Contributors

[![oligus](https://avatars.githubusercontent.com/u/2466591?v=4)](https://github.com/oligus "oligus (157 commits)")[![stimbjorn](https://avatars.githubusercontent.com/u/94977274?v=4)](https://github.com/stimbjorn "stimbjorn (4 commits)")[![freton](https://avatars.githubusercontent.com/u/8527291?v=4)](https://github.com/freton "freton (2 commits)")[![bjolar](https://avatars.githubusercontent.com/u/3543642?v=4)](https://github.com/bjolar "bjolar (2 commits)")[![kazin8](https://avatars.githubusercontent.com/u/44418782?v=4)](https://github.com/kazin8 "kazin8 (1 commits)")[![codetriage-readme-bot](https://avatars.githubusercontent.com/u/35302948?v=4)](https://github.com/codetriage-readme-bot "codetriage-readme-bot (1 commits)")[![maxwihlborg](https://avatars.githubusercontent.com/u/6181962?v=4)](https://github.com/maxwihlborg "maxwihlborg (1 commits)")

---

Tags

apiautomapperdoctrinejson-apimappermiddlewarerestrest-apirestfulrestful-apijsonapiormdoctrine

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/oligus-jad/health.svg)

```
[![Health](https://phpackages.com/badges/oligus-jad/health.svg)](https://phpackages.com/packages/oligus-jad)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k50.1M314](/packages/api-platform-core)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58825.2M48](/packages/scienta-doctrine-json-functions)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[sylius/grid-bundle

Amazing grids with support of filters and custom fields integrated into Symfony.

1338.7M56](/packages/sylius-grid-bundle)[sylius/resource

Basic resource interfaces for PHP applications.

252.7M83](/packages/sylius-resource)

PHPackages © 2026

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