PHPackages                             chubbyphp/petstore - 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. chubbyphp/petstore

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

chubbyphp/petstore
==================

A simple skeleton to build api's based on the chubbyphp-framework.

38436PHPCI passing

Since May 5Pushed 1w ago2 watchersCompare

[ Source](https://github.com/chubbyphp/chubbyphp-petstore)[ Packagist](https://packagist.org/packages/chubbyphp/petstore)[ RSS](/packages/chubbyphp-petstore/feed)WikiDiscussions chubbyphp-postgres Synced 4d ago

READMEChangelogDependenciesVersions (4)Used By (0)

petstore
========

[](#petstore)

[![CI](https://github.com/chubbyphp/petstore/actions/workflows/ci.yml/badge.svg?branch=chubbyphp)](https://github.com/chubbyphp/petstore/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/af2a33194a80fc201937e47aa65be4054be19d2976897bb858df3c9aa8c5fff0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6368756262797068702f70657473746f72652f62616467652e7376673f6272616e63683d636875626279706870)](https://coveralls.io/github/chubbyphp/petstore?branch=chubbyphp)[![Mutation testing badge](https://camo.githubusercontent.com/6fd2c70cbe7df925b4de2c04beb577f9280229b2ac9575f2a5fb52e911634054/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324663687562627970687025324670657473746f7265253246636875626279706870)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/petstore/chubbyphp)

[![bugs](https://camo.githubusercontent.com/ee75886805b84556bd476935b899fb80efa543e7c05005b2e4c749dc622c6e7c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d62756773)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![code_smells](https://camo.githubusercontent.com/0fc90fb3a8c3fe0954bc25072a9944fd465e74e5d64164fd23040128274571e0/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d636f64655f736d656c6c73)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![coverage](https://camo.githubusercontent.com/c24a6cbbaaf240d122b15fb8f661e573a3372ec023562bf315bd0d6d60c63b4f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![duplicated_lines_density](https://camo.githubusercontent.com/049e44d53b23080e83bd7184c14f04e6483b983c52b0e5f449da3a05e36821cc/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d6475706c6963617465645f6c696e65735f64656e73697479)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![ncloc](https://camo.githubusercontent.com/473f1bb3d9bd36b7df60ffbe3cdaeeb00bd3a88e21eba3636d3e03c8bdecc4f6/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d6e636c6f63)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![sqale_rating](https://camo.githubusercontent.com/3b29b0382895d7fd11cfb58c949a0b02eaf9bfa2bc0a25eb9e37d71a60f0809e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![alert_status](https://camo.githubusercontent.com/9cc053d39d337cba14112ba35d25873e7d6dbe0951a41124460955181db120f6/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![reliability_rating](https://camo.githubusercontent.com/4550309b3198132daa341eb0a195c70f55bef89475a951b4e6f8d271b12ddce6/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![security_rating](https://camo.githubusercontent.com/7fa5e120b691f317991c254fc5b828fd23e5770db3baa64b27654e7727e62c8f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![sqale_index](https://camo.githubusercontent.com/c8b01940c67e8b46b7124fdba377091be520fbb0da125a08091eeaea5322e542/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)[![vulnerabilities](https://camo.githubusercontent.com/bc2df8e5a93ed1018c8f089a67ce8c7adfae61a25800a4f531cbd28bfb7cf63c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6368756262797068705f6368756262797068702d70657473746f7265266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-petstore)

Description
-----------

[](#description)

A simple skeleton to build api's based on the [chubbyphp-framework](https://github.com/chubbyphp/chubbyphp-framework).

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

[](#requirements)

- php: ^8.3
- [chubbyphp/chubbyphp-api](https://packagist.org/packages/chubbyphp/chubbyphp-api): ^1.1
- [chubbyphp/chubbyphp-clean-directories](https://packagist.org/packages/chubbyphp/chubbyphp-clean-directories): ^1.5.1
- [chubbyphp/chubbyphp-cors](https://packagist.org/packages/chubbyphp/chubbyphp-cors): ^1.7.1
- [chubbyphp/chubbyphp-decode-encode](https://packagist.org/packages/chubbyphp/chubbyphp-decode-encode): ^1.4
- [chubbyphp/chubbyphp-framework](https://packagist.org/packages/chubbyphp/chubbyphp-framework): ^6.0.2
- [chubbyphp/chubbyphp-framework-router-fastroute](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-fastroute): ^2.3.3
- [chubbyphp/chubbyphp-http-exception](https://packagist.org/packages/chubbyphp/chubbyphp-http-exception): ^1.3.2
- [chubbyphp/chubbyphp-laminas-config](https://packagist.org/packages/chubbyphp/chubbyphp-laminas-config): ^1.5.1
- [chubbyphp/chubbyphp-laminas-config-doctrine](https://packagist.org/packages/chubbyphp/chubbyphp-laminas-config-doctrine): ^3.1.1
- [chubbyphp/chubbyphp-laminas-config-factory](https://packagist.org/packages/chubbyphp/chubbyphp-laminas-config-factory): ^1.5.1
- [chubbyphp/chubbyphp-negotiation](https://packagist.org/packages/chubbyphp/chubbyphp-negotiation): ^2.3.1
- [chubbyphp/chubbyphp-parsing](https://packagist.org/packages/chubbyphp/chubbyphp-parsing): ^2.5.2
- [doctrine/orm](https://packagist.org/packages/doctrine/orm): ^3.6.2
- [monolog/monolog](https://packagist.org/packages/monolog/monolog): ^3.10
- [ramsey/uuid](https://packagist.org/packages/ramsey/uuid): ^4.9.2
- [slim/psr7](https://packagist.org/packages/slim/psr7): ^1.8
- [symfony/console](https://packagist.org/packages/symfony/console): ^7.4.7|^8.0.7
- [symfony/var-exporter](https://packagist.org/packages/symfony/var-exporter): ^7.4|^8.0

Environment
-----------

[](#environment)

Add the following environment variable to your system, for example within `~/.bashrc` or `~/.zshrc`:

```
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
```

Make sure all the mount points are given

```
touch ~/.bash_docker
touch ~/.bash_history
```

```
touch ~/.gitconfig
touch ~/.gitignore
```

```
mkdir -p ~/.config/opencode
[ ! -f ~/.local/share/opencode/auth.json ] && echo '{}' > ~/.config/opencode/tui.json
mkdir -p ~/.local/share/opencode
[ ! -f ~/.local/share/opencode/auth.json ] && echo '{}' > ~/.local/share/opencode/auth.json
```

```
touch ~/.zsh_docker
touch ~/.zsh_history
```

### Docker

[](#docker)

```
docker-compose up -d
docker-compose exec php bash
```

Setup
-----

[](#setup)

```
composer install
composer setup:dev
```

Urls
----

[](#urls)

- GET
- GET  ()

### Pet

[](#pet)

- GET [https://localhost/api/pets?sort\[name\]=asc](https://localhost/api/pets?sort%5Bname%5D=asc)
- POST
- GET
- PUT
- DELETE

### Database

[](#database)

```
psql "postgresql://petstore:4aAUfBjDACcdZxNwJgJ6@localhost:5432/petstore"
```

Structure
---------

[](#structure)

### Collection

[](#collection)

Collections are sortable, filterable paginated lists of models.

- [App\\Pet\\Collection](src/Pet/Collection)

### Dto

[](#dto)

A DTO, or Data Transfer Object, is a simple object used to transport data between software application components.

- [App\\Pet\\Dto](src/Pet/Dto)

### Model

[](#model)

Models, entities, documents what ever fits your purpose the best.

- [App\\Pet\\Model](src/Pet/Model)

### ORM

[](#orm)

ORM Mapping definitions.

- [App\\Pet\\Orm](src/Pet/Orm)

### Parsing

[](#parsing)

Parses and validates data against predefined schemas, ensuring that incoming data conforms to expected structures and criteria.

- [App\\Pet\\Parsing](src/Pet/Parsing)

### Repository

[](#repository)

Repositories get data from storages like databases, elasticsearch, redis or whereever your models are stored or cached.

- [App\\Pet\\Repository](src/Pet/Repository)

### RequestHandler

[](#requesthandler)

RequestHandler alias Controller, or Controller actions to be more precise. There is a directory with generic crud controllers. If you like the idea adapt them for your generic use case, if not drop them. I highly recommend to not extend them.

- [App\\Core\\RequestHandler](src/Core/RequestHandler)

### ServiceFactory

[](#servicefactory)

Service factories are the glue code of the dependeny injection container.

- [App\\Core\\ServiceFactory](src/Core/ServiceFactory)
- [App\\Pet\\ServiceFactory](src/Pet/ServiceFactory)

Opensearch
----------

[](#opensearch)

### Policy to delete logstash formatted indicies after 14 days.

[](#policy-to-delete-logstash-formatted-indicies-after-14-days)

```
curl -XPUT 'https://localhost:9200/_plugins/_ism/policies/logstash-policy' \
    -u 'admin:98T722Eqw99oqFCSJCnB' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{
      "policy": {
        "description": "Logstash",
        "default_state": "hot",
        "states": [
          {
            "name": "hot",
            "actions": [],
            "transitions": [
              {
                "state_name": "delete",
                "conditions": {
                  "min_index_age": "14d"
                }
              }
            ]
          },
          {
            "name": "delete",
            "actions": [
              {
                "delete": {}
              }
            ]
          }
        ],
        "ism_template": {
          "index_patterns" : ["logstash-*"],
          "priority": 100
        }
      }
    }' \
    --insecure
```

### Dashboard

[](#dashboard)

Before you start, produce at least one error, [produce a 404](https://localhost/api/unknown).

[Create Index Pattern](http://localhost:5601/app/management/opensearch-dashboards/indexPatterns/create)

- Username: admin
- Password: 98T722Eqw99oqFCSJCnB
- Index pattern name: logstash-\*
- Time field: @timestamp

[Discover](http://localhost:5601/app/data-explorer/discover)

Copyright
---------

[](#copyright)

2026 Dominik Zogg

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance64

Regular maintenance activity

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 99.6% 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/55048de83ca5e5d8c67164a19c78edcaad413b0c1a4ae10d92edf8d77bedd90f?d=identicon)[dominikzogg](/maintainers/dominikzogg)

---

Top Contributors

[![dominikzogg](https://avatars.githubusercontent.com/u/1011217?v=4)](https://github.com/dominikzogg "dominikzogg (455 commits)")[![blacksmith-sh[bot]](https://avatars.githubusercontent.com/in/807020?v=4)](https://github.com/blacksmith-sh[bot] "blacksmith-sh[bot] (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

apiboilerplatechubbyphp-frameworkdbaldoctrinemezziomongodbodmormphppostgresskeletonslim-framewokzend-expressive

### Embed Badge

![Health badge](/badges/chubbyphp-petstore/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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