定制 beauty-framework/module-app 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

beauty-framework/module-app

Composer 安装命令:

composer create-project beauty-framework/module-app

包简介

Beauty Framework app

README 文档

README

logo

🧱 Beauty Framework

Beauty is a blazing-fast, PSR-compliant, modular microframework for building REST and gRPC APIs on top of RoadRunner. It provides first-class support for clean architecture, strong developer ergonomics, and production-ready features without FPM overhead. This skeleton is ideal for building microservices, APIs, and gRPC services with Modular Architecture.

🎯 Goals

Beauty is designed as a lightweight, modular and fast foundation for building microservices:

  • 🧩 Package-oriented: each module is self-contained and reusable
  • 🚀 RoadRunner-native: zero FPM, ultra-low latency
  • ⚙️ Clean architecture: clear separation between application layers
  • 🧪 Testing-friendly: services are testable by design
  • 🐳 Docker-first: fully containerized by default
  • 📦 Modularity: easy to extend

🚀 Features

  • Fully PSR-compliant (PSR-3, 4, 7, 11, 15, 14)
  • Built-in DI container (PHP-DI powered)
  • Attribute-based routing and middleware
  • Event system with listener registry
  • Lightweight config and cache system
  • Jobs, events, queues (via RoadRunner)
  • Console kernel for CLI tools
  • Powered by RoadRunner — no FPM
  • Modular architecture

🗂 Project Structure

├── app
│   ├── Console               # CLI commands
│   └── Container             # DI bindings for core services      
├── modules
│   └── hello                 # Example module
│       ├── composer.json     # Module metadata
│       └── src
│           ├── Container     # Module-specific DI bindings
│           ├── Controllers   # HTTP/API controllers
│           ├── Events        # Application events
│           ├── Jobs          # Async jobs
│           ├── Listeners     # Event listeners
│           ├── Middlewares   # PSR-15 middleware
│           ├── Repositories  # Data access
│           ├── Requests      # Validated requests
│           ├── Responses     # Typed responses
│           └── Services      # Business logic
├── config                    # Configuration files
├── workers                   # RoadRunner workers (http, jobs, etc)
├── bootstrap                 # Kernel bootstrapping
├── public/index.php          # Entry point (optional)

📦 Installation

composer create-project beauty-framework/module-app beauty-framework
cd beauty-framework
cp .env.example .env
make up # or make prod

⚙️ Configuration (.env)

APP_NAME=Beauty
APP_ENV=local
APP_VERSION=1.0
APP_TIMEZONE=UTC
APP_LOCALE=en
APP_DEBUG=true
USE_DI_CACHE=true

DB_CONNECTION=pgsql
DB_HOST=database
DB_PORT=5432
DB_DATABASE=my_db
DB_USERNAME=root
DB_PASSWORD=password

CACHE_DRIVER=redis

REDIS_HOST=redis
REDIS_PORT=6379

🧠 CLI Commands

Command Description
generate:controller Generate controller
generate:command Generate a new CLI command
generate:middleware Generate a new middleware
generate:request Generate a new request
generate:event Create a new event
generate:listener Create a new listener
generate:job Create a new job
generate:module Create a new module

🐳 Docker Setup (default)

Beauty is designed to run natively inside Docker. By default, all services are containerized:

Service Image Notes
app php:8.4-alpine + RR RoadRunner + CLI build targets
db postgres:16 PostgreSQL 16
redis redis:alpine Redis 7
services:
  app:
    build:
      target: dev
    environment:
      PHP_IDE_CONFIG: "serverName=stage"
    restart: unless-stopped

  db:
    image: postgres:16
    ports:
      - "5432:5432"

  redis:
    image: redis:alpine
    ports:
      - "6379:6379"

🛠 Makefile Commands

Category Command Description
Start make up Start the DEV environment
make prod Start the PROD environment
Stop make stop Stop all containers
make down Remove all containers and volumes
make restart Restart all containers
make restart-container CONTAINER=... Restart a specific container
make stop-container CONTAINER=... Stop a specific container
PHP make php <cmd> Run php command inside the app container
make beauty <cmd> Run beauty CLI command inside the app container
Tests make test Run PHPUnit tests
Composer make composer <cmd> Run composer command inside the app container
Shell make bash Open bash shell inside the app container
Logs make logs <container> View logs of specific container
Database make psql Access PostgreSQL CLI
Cache make redis Access Redis CLI

📚 Documentation

See Documentation page

📦 Related Modules

See full list of modules at Documentation page.

📝 TODO

  • ORM support (query builder + migrations)
  • beauty/testing package with framework-aware test harness
  • gRPC server module with RoadRunner integration
  • Job retries, delays, and failure handlers
  • OpenAPI/Swagger support
  • Full module documentation

Welcome to Beauty Framework — lean, fast, clean. Let's build some serious APIs ⚡

beauty-framework/module-app 适用场景与选型建议

beauty-framework/module-app 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「modules」 「app」 「beauty」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 beauty-framework/module-app 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 beauty-framework/module-app 我们能提供哪些服务?
定制开发 / 二次开发

基于 beauty-framework/module-app 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-22