承接 assouan/demo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

assouan/demo

Composer 安装命令:

composer create-project assouan/demo

包简介

Example demo using the A PHP framework libraries.

README 文档

README

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

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

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-06-23