uogsoe/laravel-init
Composer 安装命令:
composer require --dev uogsoe/laravel-init
包简介
Bootstraps Laravel projects with Flux UI, Keycloak SSO, and common packages
关键字:
README 文档
README
A Composer package that bootstraps Laravel projects with Flux UI, Keycloak SSO, Docker/Lando setup, and common packages via a single Artisan command.
What It Does
- Installs and activates Flux UI with Tailwind CSS v4
- Configures Keycloak SSO via Laravel Socialite
- Installs Horizon and Sanctum
- Installs Docker/Lando scaffolding used for local/dev/CI workflows
- Copies template files (routes, providers, views, etc.) with diff preview
- Injects config into
routes/web.phpandconfig/services.php - Registers
SSOServiceProviderinbootstrap/providers.php - Sets up environment variables
Requirements
- A fresh Laravel 11+ project with a clean git working tree
- Flux UI licence
- Node.js and Composer
Installation
Install as a dev dependency:
composer require --dev uogsoe/laravel-init
Usage
export FLUX_USERNAME="your-flux-username" export FLUX_LICENSE_KEY="your-flux-license-key" php artisan project:init
Options
| Option | Description |
|---|---|
--skip-npm |
Skip npm package installation |
--skip-composer |
Skip composer package installation |
--skip-flux |
Skip Flux activation |
--skip-docker |
Skip Docker/Lando/CI template files |
--dry-run |
Show what would change without writing files |
--force |
Overwrite all files without prompting |
File Diff Preview
When copying template files that already exist in your project, the command prompts with y/n/d(iff). Pressing d shows a unified diff between your existing file and the template, so you can make an informed decision before overwriting.
At the end of execution, project:init prints a summary of copied/skipped files and command execution status.
Docker/Lando Setup
project:init installs Docker/Lando files from stubs/, including:
docker/scripts/config.lando.ymldocker-compose.yml,prod-stack.yml,qa-stack.yml- CI files (
.github/,.gitlab-ci.yml,phpunit*.xml,phpunit*.Dockerfile) Dockerfile,.dockerignore, and related support files
Environment handling is applied in this order:
- If
.envis missing, it is created from the project's.env.example stubs/.env.landovalues are merged into.envAPP_NAMEis set from the project folder name (title-cased)APP_URLis set tohttps://<project-folder>.lndo.site/.lando.ymlname:is set to<project-folder>(slug form).env.exampleis updated to match the final.envAPP_KEYin.env.exampleis refreshed usingphp artisan key:generate --show
It also adds required Docker/Lando ignore entries to your project .gitignore and ensures:
storage/minio_dev/bucket/.gitkeepstorage/meilisearch/.gitkeep
Packages Installed
Composer:
livewire/livewirelivewire/fluxlaravel/socialitesocialiteproviders/keycloaklaravel/horizonlaravel/sanctum
NPM:
vitetailwindcss@tailwindcss/vitelaravel-vite-plugin
Customisation
Fork this repo and modify the properties in src/Commands/ProjectInitCommand.php:
| Property | Purpose |
|---|---|
$autoCopyPatterns |
Patterns that overwrite without prompting |
$internalStubFiles |
Stub files used internally (not copied directly) |
$gitignoreEntries |
Entries appended to .gitignore |
$boostPromptUrl |
URL for team conventions file |
Template Files
Template files live in the stubs/ directory. The command copies stubs into the target project, except internal helper files such as stubs/.env.lando. Existing files prompt before overwriting (unless matched by $autoCopyPatterns or --force is used).
laravel-init/
├── composer.json
├── src/
│ ├── LaravelInitServiceProvider.php
│ └── Commands/
│ └── ProjectInitCommand.php
└── stubs/
├── app/
│ └── Providers/
│ └── SSOServiceProvider.php
├── routes/
│ └── sso-auth.php
├── resources/
│ └── views/
│ └── ...
└── config/
└── ...
Environment Variables
Project-specific environment values are defined in stubs/.env.lando and merged into .env, then copied to .env.example. This includes keys such as:
KEYCLOAK_BASE_URL=https:// KEYCLOAK_REALM= KEYCLOAK_CLIENT_ID=name-in-keycloak KEYCLOAK_CLIENT_SECRET=secret-in-keycloak KEYCLOAK_REDIRECT_URI=http://your-app/auth/callback SSO_ENABLED=false SSO_AUTOCREATE_NEW_USERS=false SSO_ALLOW_STUDENTS=false SSO_ADMINS_ONLY=false
Licence
MIT
uogsoe/laravel-init 适用场景与选型建议
uogsoe/laravel-init 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 105 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dev」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 uogsoe/laravel-init 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 uogsoe/laravel-init 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 uogsoe/laravel-init 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Monolog bridge for PHP Debugbar
Simple and fast methods to read private properties and call private methods
Analysis module for finding problematical shop data.
Analysis module for finding problematical shop data.
Enforce architecture by defining modules with allowed dependencies. Detects forbidden, uncovered, missing and unused module dependencies in PHP projects.
Analysis module for finding problematical shop data.
统计信息
- 总下载量: 105
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-08