easiviotech/fabriq-skeleton 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

easiviotech/fabriq-skeleton

Composer 安装命令:

composer create-project easiviotech/fabriq-skeleton

包简介

Fabriq starter project — a ready-to-use scaffold for building Swoole-powered SaaS applications with multi-tenancy, realtime WebSockets, background jobs, and per-tenant frontend serving.

README 文档

README

The official starter project for Fabriq — a unified Swoole-powered platform for building multi-tenant SaaS applications with realtime WebSockets, background jobs, and per-tenant frontend serving.

Create a New Project

Linux / macOS:

composer create-project easiviotech/fabriq-skeleton myapp
cd myapp

Windows:

composer create-project easiviotech/fabriq-skeleton myapp --ignore-platform-req=ext-swoole
cd myapp

Swoole does not run natively on Windows or macOS. The --ignore-platform-req=ext-swoole flag skips the local Swoole check — Swoole runs inside Docker, so this is safe and expected.

Start the Stack

docker compose -f infra/docker-compose.yml up -d --build

This starts six containers:

Container Role
app Fabriq HTTP + WebSocket server
processor Background job + event bus worker
scheduler Cron-like task scheduler
mysql MySQL 8 database
redis Redis (jobs, events, pub/sub, rate limiting)
adminer Database UI at http://localhost:8080

Verify it's running:

curl http://localhost:8000/health
curl http://localhost:8000/api/welcome

Customise Project Name & Ports

Edit infra/.env to avoid port conflicts when running multiple projects:

COMPOSE_PROJECT_NAME=myapp
APP_PORT=8000
MYSQL_PORT=3306
REDIS_PORT=6379
ADMINER_PORT=8080

Project Structure

myapp/
├── app/
│   ├── Http/Controllers/    # HTTP request handlers
│   ├── Providers/           # Service providers (register + boot lifecycle)
│   ├── Models/              # ORM models (Active Record, tenant-scoped)
│   ├── Repositories/        # Data access layer
│   ├── Events/              # Domain event classes
│   ├── Listeners/           # Event listener handlers
│   ├── Jobs/                # Background job classes
│   └── Realtime/            # WebSocket handlers
├── bin/fabriq               # CLI entry point
├── bootstrap/app.php        # Application bootstrap
├── config/                  # Configuration files
├── routes/
│   ├── api.php              # HTTP API routes
│   └── channels.php         # WebSocket channel definitions
├── database/
│   └── migrations/          # SQL migration files
├── infra/
│   ├── .env                 # Project name + port variables
│   ├── Dockerfile
│   ├── docker-compose.yml
│   └── mysql/init.sql
├── public/_default/         # Default tenant frontend (static files)
├── storage/builds/          # Frontend build workspace
├── tests/
│   ├── Feature/
│   └── Unit/
├── composer.json
└── phpunit.xml

CLI Commands

# Server processes
php bin/fabriq serve                          # Start HTTP + WebSocket server
php bin/fabriq processor                      # Start queue + event processor
php bin/fabriq scheduler                      # Start task scheduler

# Code generators
php bin/fabriq make:controller Name           # Generate a controller
php bin/fabriq make:model Name                # Generate an ORM model
php bin/fabriq make:migration create_table    # Generate a migration
php bin/fabriq make:provider Name             # Generate a service provider
php bin/fabriq make:middleware Name           # Generate middleware
php bin/fabriq make:seeder Name               # Generate a database seeder
php bin/fabriq make:factory Name              # Generate a model factory

# Database
php bin/fabriq migrate                        # Run pending migrations
php bin/fabriq migrate:rollback               # Roll back the last migration batch
php bin/fabriq db:seed                        # Run database seeders

# Frontend (per-tenant)
php bin/fabriq frontend:build <tenant-slug>   # Build tenant frontend from Git
php bin/fabriq frontend:status <tenant-slug>  # Check frontend deploy status

# Help
php bin/fabriq help                           # List all available commands

Enable Optional Features

The skeleton ships with the core providers active. Uncomment providers in config/app.php to enable additional features:

Provider Feature
AuthServiceProvider JWT + API key authentication, RBAC/ABAC
EventServiceProvider Domain events and listeners
RealtimeServiceProvider WebSocket channels and presence
OrmServiceProvider Active Record ORM and migrations

Add Premium Packages

# Live streaming (WebRTC signaling, HLS transcoding, chat moderation)
composer require fabriq/streaming

# Game server engine (tick loop, matchmaking, lobbies, UDP protocol)
composer require fabriq/gaming

Documentation

License

MIT — see LICENSE

easiviotech/fabriq-skeleton 适用场景与选型建议

easiviotech/fabriq-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 easiviotech/fabriq-skeleton 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-05