PHPackages                             assouan/demo - 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. [Framework](/categories/framework)
4. /
5. assouan/demo

ActiveProject[Framework](/categories/framework)

assouan/demo
============

Example demo using the A PHP framework libraries.

00PHP

Since Jun 23Pushed 1mo agoCompare

[ Source](https://github.com/assouan/demo)[ Packagist](https://packagist.org/packages/assouan/demo)[ RSS](/packages/assouan-demo/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

demo
====

[](#demo)

Example application for the A PHP framework libraries.

It shows the intended simple path:

- `app.php` boots the HTTP application.
- Controllers live in `app/` and use `#[A\Http\Route]`.
- Templates sit next to controllers as `.phtml` files and use `#[A\Http\Template]`.
- `app/Layout.phtml` is a shared file layout selected by templates with `$layout`.
- API handlers live in `api/` and return arrays/objects as JSON.
- Database schemas live in `config/schema/`.
- FF generates ORM models in `src/Model*` and SQL in `data/generated/sql/`.
- FF also generates API/form contracts in `data/generated/contracts/` so the sample documents what handlers and forms should expose.
- `src/ModelBase/*` is regenerated; `src/Model/*` is generated once then kept for app-specific methods.
- Put small domain helpers such as `Article::published()`, `Article::for_manager()`, `Article::summary()`, `Article::state_name()`, and `Account::public_data()` in `src/Model/*`.
- Protected manager pages can use the same generated models for writes, as shown by `/manager/articles`.
- New article IDs use `assouan/snowflake` through `Article::new_id()`.
- Authentication uses generated `Account` and `AccountSession` models plus PHP sessions; the other identity schemas are extension points.

Run locally
-----------

[](#run-locally)

From this repository:

```
composer install
```

From the workspace root, with the Docker webstack running:

```
docker compose up -d
```

Then from this repository:

```
composer setup
```

Manual equivalent:

```
composer ff
composer db
composer check
```

Then open:

```
http://demo.localhost/

```

Default account:

```
admin / password

```

Useful checks:

```
composer check
```

Useful environment overrides:

```
demo_db_host=127.0.0.1
demo_db_port=3306
demo_db_user=root
demo_db_password=
demo_db_dsn=mysql:host=127.0.0.1;port=3306;charset=utf8mb4
demo_base_url=http://127.0.0.1
demo_host=demo.localhost
```

Example routes:

```
GET /              HTML home
GET /articles      Generated ORM page
GET /articles/{slug} Generated ORM detail page
GET /contracts     Generated FF API/form contracts
GET /contracts/{group}/{name} Generated FF contract detail
GET /dashboard     Protected page
GET /manager/articles Protected ORM write page
POST /manager/articles Create an article with the ORM
POST /manager/articles/{slug}/delete Delete an article with the ORM
GET /select/Ada    Route parameter + template
GET /auth/sign-in  Login form
GET /api/health    JSON endpoint with PHP version
GET /api/articles  JSON ORM endpoint
GET /api/articles/{slug} JSON ORM detail endpoint
POST /api/echo     JSON body input
GET /api/me        JSON auth endpoint

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance60

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/5c994e5cf2260a671aa22ab55eadfc76e9fcd1817e7c0181466179b6ec10e84e?d=identicon)[assouan](/maintainers/assouan)

---

Top Contributors

[![assouan](https://avatars.githubusercontent.com/u/750048?v=4)](https://github.com/assouan "assouan (92 commits)")

### Embed Badge

![Health badge](/badges/assouan-demo/health.svg)

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

###  Alternatives

[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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