PHPackages                             yknsilva/phractico - 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. yknsilva/phractico

ActiveProject[API Development](/categories/api)

yknsilva/phractico
==================

A PHP micro-project for APIs

1.0.1(1y ago)1115[2 PRs](https://github.com/yknsilva/phractico/pulls)MITPHP ^8.2

Since Aug 25Compare

[ Source](https://github.com/yknsilva/phractico)[ Packagist](https://packagist.org/packages/yknsilva/phractico)[ RSS](/packages/yknsilva-phractico/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

[About phractico](#about-phractico)
===================================

[](#about-phractico)

🚀 Go fast with ***phractico***, a PHP micro-project designed to accelerate your API projects with simplicity.

```
composer create-project yknsilva/phractico
```

[Summary](#summary)
===================

[](#summary)

- [Usage](#usage)
- [Database](#database)
- [Container DI](#container-di)
- [Installation](#installation)
- [Tests and Quality Tools](#tests-and-quality-tools)
- [Contributing](#contributing)

[Usage](#usage)
===============

[](#usage)

***phractico*** was designed with your precious resource in mind: *time!* ⌚

The ***phractico*** ideology involves fewer configuration files to get your PHP API working. The [Bootstrap file](./src/Core/Bootstrap.php) concentrates the entire application configuration for *controllers*, *routing*, etc.

To introduce new endpoints in your API, you simply need to create a *controller* class by implementing the [`Controller`](./src/Core/Infrastructure/Http/Controller.php) interface and its `routes` method. Then, describe routing resources to their actions. Finally, map the new controller in [ApplicationControllerProvider.php](src/API/Http/Provider/ApplicationControllerProvider.php).

*Voilà!* 🎉

For examples, see [ExampleController](./src/API/Http/Controller/ExampleController.php).

[Database](#database)
=====================

[](#database)

Your database connection must be mapped inside [ApplicationDatabaseProvider.php](./src/Database/ApplicationDatabaseProvider.php) class, which is consumed by bootstrap file when application is initialized.

By default, ***phractico*** comes with a [SQLite database adapter](./src/Database/Connection/SQLiteAdapter.php)assuming database file is located at path `/path/to/phractico/database/database.sqlite`.

If you want to have others adapters, you just need to implement [Connection](./src/Core/Infrastructure/Database/Connection.php)and then mapping your new adapter in `ApplicationDatabaseProvider` file.

[Container DI](#container-di)
=============================

[](#container-di)

***phractico*** uses a dependency container to manage dependencies throughout the application. The container and its corresponding dependency mapping are declared in [ApplicationContainer](./src/DI/ApplicationContainer.php). During the application's runtime, the dependency container is injected into the application instance and then used in application bootstrap phase.

While ***phractico*** includes a [simple container](./src/Core/Infrastructure/DI/Container.php), it is designed to support any other dependency injection container that implements the [PSR-11](https://www.php-fig.org/psr/psr-11/), such as [PHP-DI](https://php-di.org/).

[Installation](#installation)
=============================

[](#installation)

Go fast with ***phractico*** and [phpctl](https://github.com/opencodeco/phpctl):

- Run `composer`

```
phpctl composer install
```

- Run a local server

```
phpctl server 8000 public/
```

- Perform an HTTP request to ensure everything works fine!

```
curl -X GET 'http://localhost:8000/example'
```

- Perform an HTTP request to ensure database connection works fine!
    - **Note:** `sqlite3` PHP extension is required for `SQLiteAdapter`

```
curl -X POST 'http://localhost:8000/exampleDatabase' \
--header 'Content-Type: application/json' \
--data '{
    "test": "database"
}'
```

[Tests and Quality Tools](#tests-and-quality-tools)
===================================================

[](#tests-and-quality-tools)

To execute all PHPUnit test suites, run:

```
phpctl composer test
```

To execute quality tools, run:

```
phpctl composer quality
```

[Contributing](#contributing)
=============================

[](#contributing)

Feel free to explore the project and turn ***phractico*** more practical!

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87c2e218d17c27fab3ca5ac19dfb8f27ddf175a617bea936caddb20ef14af1f1?d=identicon)[yknsilva](/maintainers/yknsilva)

---

Top Contributors

[![yknsilva](https://avatars.githubusercontent.com/u/12822075?v=4)](https://github.com/yknsilva "yknsilva (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yknsilva-phractico/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.0k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M982](/packages/statamic-cms)[sylius/sylius

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

8.5k5.9M734](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)

PHPackages © 2026

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