PHPackages                             arefshojaei/delta-app - 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. arefshojaei/delta-app

ActiveProject

arefshojaei/delta-app
=====================

Delta Application

00PHP

Since Aug 28Pushed todayCompare

[ Source](https://github.com/ArefShojaei/Delta-app)[ Packagist](https://packagist.org/packages/arefshojaei/delta-app)[ RSS](/packages/arefshojaei-delta-app/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Delta App
=========

[](#delta-app)

**Delta Application** — A starter REST API project built on the [Delta](https://github.com/ArefShojaei/Delta) PHP framework.

It provides a ready-to-use modular structure for building clean JSON APIs with attribute-based routing, dependency injection, Eloquent models, and Swagger documentation.

**Packagist:** [arefshojaei/delta-app](https://packagist.org/packages/arefshojaei/delta-app)

Features
--------

[](#features)

- Modular architecture (App, User, Swagger modules)
- Attribute-based controllers &amp; routes (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`)
- Full User CRUD API (`/api/users`)
- OpenAPI / Swagger UI at `/docs`
- Eloquent ORM (Illuminate Database)
- File-based cache &amp; logging
- CLI helper (`bin/cli`) for serving the app and generating Swagger docs
- PHP 8.2+

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

[](#requirements)

- PHP &gt;= 8.2
- Composer
- Database (MySQL / MariaDB recommended)

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

[](#installation)

### Option 1 — Create project with Composer (recommended)

[](#option-1--create-project-with-composer-recommended)

```
composer create-project arefshojaei/delta-app my-delta-app
cd my-delta-app
```

> Currently the package is published as `dev-main`.
> If needed you can force it with:
>
> ```
> composer create-project arefshojaei/delta-app my-delta-app dev-main
> ```

### Option 2 — Clone from GitHub

[](#option-2--clone-from-github)

```
git clone https://github.com/ArefShojaei/Delta-app.git
cd Delta-app
composer install
```

### Configure environment

[](#configure-environment)

```
cp .env.example .env
```

Edit `.env` and set your database credentials:

```
APP_NAME=Delta
APP_ENV=local

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=delta
DB_USERNAME=root
DB_PASSWORD=
```

Create the database and run any migrations/seeders located under `database/`.

Running the Application
-----------------------

[](#running-the-application)

### Using the built-in CLI

[](#using-the-built-in-cli)

```
# Default: localhost:5000
php bin/cli serve

# Custom host / port
php bin/cli serve --host=127.0.0.1 --port=8000
```

### Or with PHP’s built-in server

[](#or-with-phps-built-in-server)

```
php -S 127.0.0.1:8000 -t public
```

Open the browser at `http://127.0.0.1:8000` (or the host/port you chose).

Project Structure
-----------------

[](#project-structure)

```
Delta-app/
├── bin/
│   └── cli                     # Console entry point
├── console/
│   └── commands.php            # CLI commands
├── database/
│   ├── factories/
│   ├── migrations/
│   └── seeders/
├── public/
│   ├── index.php               # Application entry point
│   └── swagger.json            # Generated OpenAPI specification
├── src/
│   ├── Database/
│   │   └── DatabaseManager.php
│   └── Modules/
│       ├── App/                # Root module
│       ├── User/               # User CRUD module
│       └── Swagger/            # Swagger UI module
├── storage/
│   ├── cache/
│   └── logs/
├── .env.example
└── composer.json

```

How It Works
------------

[](#how-it-works)

1. `public/index.php` bootstraps the Delta application using the root `AppModule`.
2. `AppModule` imports `UserModule` and `SwaggerModule`.
3. Controllers are registered via PHP attributes (`#[Controller]`, `#[Get]`, `#[Post]`, …).
4. Services marked with `#[Injectable]` are automatically injected into controllers.
5. `DatabaseManager` boots Illuminate Capsule / Eloquent on every request.
6. Responses are sent as JSON through Delta’s `Response` object.

### Available Endpoints

[](#available-endpoints)

MethodPathDescription`GET``/`Welcome / health check`GET``/api/users`List all users`GET``/api/users/{id}`Get a single user`POST``/api/users`Create a user`PUT``/api/users/{id}`Full update`PATCH``/api/users/{id}`Partial update`DELETE``/api/users/{id}`Delete a user`GET``/docs`Swagger UI`GET``/docs/swagger.json`OpenAPI JSON### Generating Swagger Documentation

[](#generating-swagger-documentation)

```
php bin/cli swagger:generate
```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/ab587c1a6f8067452db012ede97d8f6c2b7362c4442ddc95d798d81e8922dc67?d=identicon)[ArefShojaei](/maintainers/ArefShojaei)

---

Top Contributors

[![ArefShojaei](https://avatars.githubusercontent.com/u/134844185?v=4)](https://github.com/ArefShojaei "ArefShojaei (21 commits)")

### Embed Badge

![Health badge](/badges/arefshojaei-delta-app/health.svg)

```
[![Health](https://phpackages.com/badges/arefshojaei-delta-app/health.svg)](https://phpackages.com/packages/arefshojaei-delta-app)
```

PHPackages © 2026

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