saas-seeder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRequired Plugins
所需插件
Superpowers plugin: MUST be active for all work using this skill. Use throughout the entire build pipeline — design decisions, code generation, debugging, quality checks, and any task where it offers enhanced capabilities. If superpowers provides a better way to accomplish something, prefer it over the default approach.
Superpowers plugin: 使用本技能进行所有工作时必须激活该插件。在整个构建流程中都要使用——包括设计决策、代码生成、调试、质量检查,以及任何能借助它提升能力的任务。如果Superpowers提供了更优的实现方式,优先使用它而非默认方案。
SaaS Seeder Template Bootstrap
SaaS Seeder模板快速启动指南
Bootstrap a new multi-tenant SaaS project using the SaaS Seeder Template with proper three-tier panel architecture, Argon2ID authentication, and franchise isolation.
使用SaaS Seeder模板快速启动新的多租户SaaS项目,具备规范的三层面板架构、Argon2ID身份认证和租户隔离能力。
Security Baseline (Required)
安全基线(必填)
Always load and apply the Vibe Security Skill for any seeder work that touches web pages, APIs, authentication, data access, or file handling. Treat its checklist as mandatory.
任何涉及网页、API、身份认证、数据访问或文件处理的模板搭建工作,都必须加载并应用Vibe Security Skill,其检查清单为强制要求。
Database Standards (Required)
数据库规范(必填)
All database schema setup, seeding, and migrations MUST follow mysql-best-practices skill patterns including character sets, indexing, foreign keys, and stored procedures.
所有数据库 schema 搭建、数据导入和迁移都必须遵循mysql-best-practices技能规范,包括字符集、索引、外键和存储过程的要求。
Standard Deployment Environments
标准部署环境
All SaaS projects deploy across three environments:
| Environment | OS | Database | Web Root |
|---|---|---|---|
| Development | Windows 11 (WAMP) | MySQL 8.x | |
| Staging | Ubuntu VPS | MySQL 8.x | |
| Production | Debian VPS | MySQL 8.x | |
Cross-platform rules: Use collation. Match file/directory case exactly (Linux is case-sensitive). Use forward slashes in PHP paths. Production migrations go in (non-destructive, idempotent).
utf8mb4_unicode_cidatabase/migrations-production/所有SaaS项目都需要在三个环境部署:
| 环境 | OS | 数据库 | 网站根目录 |
|---|---|---|---|
| 开发环境 | Windows 11 (WAMP) | MySQL 8.x | |
| 预发环境 | Ubuntu VPS | MySQL 8.x | |
| 生产环境 | Debian VPS | MySQL 8.x | |
跨平台规则: 使用排序规则。严格匹配文件/目录大小写(Linux系统大小写敏感)。PHP路径中使用正斜杠。生产环境的迁移文件存放在目录下(非破坏性、幂等性)。
utf8mb4_unicode_cidatabase/migrations-production/When to Use
适用场景
Use when the user says:
- "Using the seeder-script skill, prepare this repository for [SaaS name]"
- "Bootstrap a new SaaS from this template"
- "Initialize the SaaS Seeder Template"
- "Setup database for new SaaS project"
- "Start a new project from the template"
当用户提出以下需求时使用本指南:
- "使用seeder-script技能,为[SaaS名称]准备这个代码仓库"
- "基于这个模板快速启动一个新的SaaS项目"
- "初始化SaaS Seeder模板"
- "为新的SaaS项目搭建数据库"
- "基于模板启动新项目"
Project Preparation Workflow
项目准备工作流
BEFORE bootstrapping, developers MUST provide:
在启动搭建之前,开发者必须提供以下内容:
1. Requirements & Design Specifications
1. 需求与设计规范
Place in :
docs/project-requirements/docs/project-requirements/
├── requirements.md # Detailed feature requirements
├── business-rules.md # Business logic and validation rules
├── user-types.md # User types and their permissions
├── workflows.md # Key user workflows and processes
└── ui-mockups/ # UI mockups or wireframes (optional)Use the skill to create these files with AI assistance.
project-requirements存放在目录下:
docs/project-requirements/docs/project-requirements/
├── requirements.md # 详细功能需求
├── business-rules.md # 业务逻辑和校验规则
├── user-types.md # 用户类型及其权限
├── workflows.md # 核心用户工作流和流程
└── ui-mockups/ # UI原型或线框图(可选)使用技能配合AI创建这些文件。
project-requirements1.1 Documentation Readiness (Required)
1.1 文档就绪要求(必填)
- Confirm end-user manual scope is defined for each core feature
- Plan manual locations in and a public entry point (e.g.,
/manuals/)/public/user-manuals.php - Ensure specs are written in a way that can be translated into manuals and step-by-step guides
- 确认每个核心功能的终端用户手册范围已定义
- 规划手册在的存放位置,以及公开入口(例如
/manuals/)/public/user-manuals.php - 确保规范的编写方式可以直接转化为手册和分步指南
2. Database Schema Files
2. 数据库Schema文件
Place in :
database/schema/database/schema/
├── core-schema.sql # Main database schema
├── seed-data.sql # Sample/seed data (optional)
└── schema-diagram.png # Database diagram (optional)Schema Requirements:
- All franchise-scoped tables MUST have column
franchise_id - Use collation
utf8mb4_unicode_ci - Include proper indexes and foreign keys
存放在目录下:
database/schema/database/schema/
├── core-schema.sql # 主数据库Schema
├── seed-data.sql # 示例/种子数据(可选)
└── schema-diagram.png # 数据库结构图(可选)Schema要求:
- 所有租户级别的表必须包含字段
franchise_id - 使用排序规则
utf8mb4_unicode_ci - 包含合理的索引和外键
AI Agent Preparation Steps
AI Agent准备步骤
When starting a new project:
-
Read Project Requirements
- Load all files from
docs/project-requirements/ - Understand user types, workflows, business rules
- Identify custom tables needed beyond template defaults
- Load all files from
-
Review Database Schema
- Read schema files from
database/schema/ - Validate against multi-tenant patterns (franchise_id filtering)
- Ensure collation is utf8mb4_unicode_ci
- Check for proper indexes and foreign keys
- Read schema files from
-
Update Project Documentation
- Replace README.md with project-specific content
- Update CLAUDE.md with project-specific guidance
- Remove template docs from docs/ (keep only project-relevant ones)
- Add project-specific documentation based on requirements
- Ensure exists as the master plan status index and is maintained as plans are created or updated
docs/plans/INDEX.md
-
Customize Template
- Update branding (SaaS Seeder → Project Name)
- Set SESSION_PREFIX to project-specific value
- Customize user types enum if needed
- Update environment variable examples
- Register GIS settings when mapping is required (tile provider keys such as system_settings.osm_api_key)
-
Validate Completeness
- Check all requirements are documented
- Verify database schema follows multi-tenant patterns
- Ensure session prefix is customized
- Confirm user types match requirements
启动新项目时:
-
读取项目需求
- 加载下的所有文件
docs/project-requirements/ - 理解用户类型、工作流、业务规则
- 识别模板默认配置之外需要的自定义表
- 加载
-
审核数据库Schema
- 读取下的schema文件
database/schema/ - 校验是否符合多租户规范(franchise_id过滤逻辑)
- 确保排序规则为utf8mb4_unicode_ci
- 检查是否有合理的索引和外键
- 读取
-
更新项目文档
- 替换README.md为项目专属内容
- 更新CLAUDE.md为项目专属指导
- 移除docs/目录下的模板文档(仅保留和项目相关的内容)
- 基于需求添加项目专属文档
- 确保作为总计划状态索引存在,并在计划创建或更新时同步维护
docs/plans/INDEX.md
-
自定义模板
- 更新品牌标识(SaaS Seeder → 项目名称)
- 将SESSION_PREFIX设置为项目专属值
- 按需自定义用户类型枚举
- 更新环境变量示例
- 需要地图功能时注册GIS设置(瓦片提供商密钥,例如system_settings.osm_api_key)
-
校验完整性
- 检查所有需求都已文档化
- 验证数据库Schema符合多租户规范
- 确认会话前缀已自定义
- 确认用户类型和需求匹配
Critical Architecture Standards
核心架构规范
See for complete details.
references/architecture.md完整细节请查看。
references/architecture.mdThree-Tier Panel Structure (CORE Concept)
三层面板结构(核心概念)
-
(root) - Franchise Admin Panel (THE MAIN WORKSPACE)
/public/- Single franchise management
- User types: ,
ownerstaff - Files: ,
dashboard.phpskeleton.php
-
- Super Admin Panel
/public/adminpanel/- System-wide management
- Multi-franchise oversight
- User type:
super_admin
-
- End User Portal
/public/memberpanel/- Self-service for end users
- User types: ,
member,student,customerpatient
Key Principle: root is NOT a redirect router - it's the franchise admin workspace!
/public/-
(根目录) - 租户管理面板(主要工作区)
/public/- 单个租户管理
- 用户类型:、
ownerstaff - 对应文件:、
dashboard.phpskeleton.php
-
- 超级管理员面板
/public/adminpanel/- 全系统管理
- 多租户管控
- 用户类型:
super_admin
-
- 终端用户门户
/public/memberpanel/- 终端用户自助服务
- 用户类型:、
member、student、customerpatient
核心原则: 根目录不是重定向路由——它是租户管理员的工作区!
/publicSession Prefix System
会话前缀系统
All session variables use a prefix:
php
define('SESSION_PREFIX', 'saas_app_'); // Change per SaaS
// ALWAYS use helpers
setSession('user_id', 123); // Sets $_SESSION['saas_app_user_id']
$userId = getSession('user_id'); // Gets $_SESSION['saas_app_user_id']
hasSession('user_id'); // Checks if existsCustomize per SaaS: , , , etc.
school_restaurant_clinic_所有会话变量都使用前缀:
php
define('SESSION_PREFIX', 'saas_app_'); // 每个SaaS项目单独修改
// 始终使用助手函数
setSession('user_id', 123); // 设置$_SESSION['saas_app_user_id']
$userId = getSession('user_id'); // 获取$_SESSION['saas_app_user_id']
hasSession('user_id'); // 检查是否存在每个SaaS项目自定义: 、、等。
school_restaurant_clinic_Password Hashing
密码哈希
Uses Argon2ID (NOT bcrypt):
Algorithm: Argon2ID + salt(32 chars) + pepper(64+ chars)
Hash: salt + Argon2ID(HMAC-SHA256(password, pepper) + salt)CRITICAL: Use to create admin users, NOT migration defaults!
super-user-dev.php使用Argon2ID(不使用bcrypt):
算法:Argon2ID + salt(32字符) + pepper(64+字符)
哈希值:salt + Argon2ID(HMAC-SHA256(password, pepper) + salt)重要提示: 使用创建管理员用户,不要使用迁移文件中的默认值!
super-user-dev.phpRequired Files And Paths
所需文件和路径
- - Core auth/RBAC schema
docs/seeder-template/migration.sql - - Collation fixes + franchises table
docs/seeder-template/fix-collation-and-create-franchises.sql - - Project requirements (developer provides)
docs/project-requirements/ - - Project database schemas (developer provides)
database/schema/ - - Super admin creator (DEV ONLY)
public/super-user-dev.php - - Franchise admin dashboard
public/dashboard.php - - Page template
public/skeleton.php - - Environment configuration
.env
- - 核心身份认证/RBAC schema
docs/seeder-template/migration.sql - - 排序规则修复 + 租户表创建
docs/seeder-template/fix-collation-and-create-franchises.sql - - 项目需求(开发者提供)
docs/project-requirements/ - - 项目数据库schema(开发者提供)
database/schema/ - - 超级管理员创建工具(仅开发环境使用)
public/super-user-dev.php - - 租户管理面板仪表盘
public/dashboard.php - - 页面模板
public/skeleton.php - - 环境配置
.env
Standard Workflow
标准工作流
See for complete step-by-step guide.
references/workflow.md完整分步指南请查看。
references/workflow.mdQuick Bootstrap Steps
快速启动步骤
-
Environment Setup
- Ask for DB credentials, cookie domain, encryption keys
- Create/update file
.env
-
Install Dependenciesbash
composer install -
Install PHP Development ToolsSeefor complete setup guide.
references/php-tooling.mdQuick install:bash# Check existing tools composer show | grep -E "(phpstan|phpunit|pest|php-cs-fixer)" # Install essential tools composer require --dev phpstan/phpstan composer require --dev friendsofphp/php-cs-fixer composer require --dev pestphp/pest --with-all-dependenciesCreate configs and add composer scripts (see references/php-tooling.md for details). -
Database Setupbash
.\setup-database.ps1 # Windows PowerShell -
Fix Collationsbash
.\fix-database.ps1 # Creates franchises table -
Create Super Admin
- Visit
http://localhost:8000/super-user-dev.php - Uses correct Argon2ID hashing
- Visit
-
Verify Setup
- Login at
http://localhost:8000/sign-in.php - See landing page with navigation buttons
- Login at
-
Project Customization
- Update SESSION_PREFIX in
src/config/session.php - Customize user types enum
- Apply project database schema
- Update branding throughout
- Create project-specific CLAUDE.md
- Update SESSION_PREFIX in
-
环境配置
- 索要数据库凭证、cookie域名、加密密钥
- 创建/更新文件
.env
-
安装依赖bash
composer install -
安装PHP开发工具完整安装指南请查看。
references/php-tooling.md快速安装:bash# 检查现有工具 composer show | grep -E "(phpstan|phpunit|pest|php-cs-fixer)" # 安装核心工具 composer require --dev phpstan/phpstan composer require --dev friendsofphp/php-cs-fixer composer require --dev pestphp/pest --with-all-dependencies创建配置文件并添加composer脚本(详情查看references/php-tooling.md)。 -
数据库搭建bash
.\setup-database.ps1 # Windows PowerShell -
修复排序规则bash
.\fix-database.ps1 # 创建租户表 -
创建超级管理员
- 访问
http://localhost:8000/super-user-dev.php - 使用正确的Argon2ID哈希算法
- 访问
-
验证搭建结果
- 在登录
http://localhost:8000/sign-in.php - 查看带导航按钮的落地页
- 在
-
项目自定义
- 更新中的SESSION_PREFIX
src/config/session.php - 自定义用户类型枚举
- 应用项目数据库Schema
- 全局更新品牌标识
- 创建项目专属的CLAUDE.md
- 更新
Seeding Rules
数据导入规则
User Types & Franchise Requirements
用户类型与租户要求
- - Platform operators (franchise_id CAN be NULL)
super_admin - - Franchise owners (franchise_id REQUIRED)
owner - - Franchise staff with permissions (franchise_id REQUIRED)
staff - Custom types - End users (franchise_id REQUIRED)
- - 平台运营人员(franchise_id可以为NULL)
super_admin - - 租户所有者(必须填写franchise_id)
owner - - 有权限的租户员工(必须填写franchise_id)
staff - 自定义类型 - 终端用户(必须填写franchise_id)
Franchise Data
租户数据
ALWAYS filter by franchise_id:
php
// CORRECT
$stmt = $db->prepare("SELECT * FROM students WHERE franchise_id = ?");
$stmt->execute([getSession('franchise_id')]);
// WRONG - data leakage!
$stmt = $db->prepare("SELECT * FROM students");始终通过franchise_id过滤:
php
// 正确写法
$stmt = $db->prepare("SELECT * FROM students WHERE franchise_id = ?");
$stmt->execute([getSession('franchise_id')]);
// 错误写法 - 会导致数据泄露!
$stmt = $db->prepare("SELECT * FROM students");Permission Codes
权限编码
- Uppercase with underscores
- Format:
RESOURCE_ACTION - Examples: ,
INVOICE_CREATE,STUDENT_DELETEREPORT_VIEW
- 大写字母加下划线
- 格式:
RESOURCE_ACTION - 示例:、
INVOICE_CREATE、STUDENT_DELETEREPORT_VIEW
Troubleshooting
故障排查
See for complete guide.
references/troubleshooting.md完整指南请查看。
references/troubleshooting.mdCommon Issues
常见问题
Session Not Persisting
- HTTPS auto-detection already handled
- Localhost HTTP works without HTTPS requirement
Password Mismatch
- Use , NOT manual password_hash()
super-user-dev.php - Template uses Argon2ID, not bcrypt
Collation Errors
- Run
.\fix-database.ps1 - Fixes utf8mb4_unicode_ci mismatches
Missing Franchises Table
- Run
.\fix-database.ps1 - Creates tbl_franchises with default data
会话不持久化
- HTTPS自动检测已内置处理
- 本地HTTP环境不需要HTTPS即可正常使用
密码不匹配
- 使用创建用户,不要手动调用password_hash()
super-user-dev.php - 模板使用Argon2ID而非bcrypt
排序规则错误
- 运行
.\fix-database.ps1 - 修复utf8mb4_unicode_ci不匹配问题
缺少租户表
- 运行
.\fix-database.ps1 - 创建带默认数据的tbl_franchises表
Output After Completion
完成后输出内容
For New Project from Template
基于模板创建的新项目
Report to user:
✅ [Project Name] Initialized!
Requirements Loaded:
- ✅ Read from docs/project-requirements/
- ✅ Database schema reviewed from database/schema/
- ✅ User types customized: [list custom types]
- ✅ Session prefix set to: [prefix]_
Database Setup:
- ✅ Core schema applied
- ✅ Seed data loaded (if provided)
- ✅ Multi-tenant validation passed
PHP Development Tools Installed:
- ✅ PHPStan (level 8) - Static analysis
- ✅ PHP CS Fixer - PSR-12 formatting
- ✅ PHPUnit/Pest - Testing framework
- ✅ Configuration files created
- ✅ Composer scripts configured
Project Documentation:
- ✅ README.md updated for [Project Name]
- ✅ CLAUDE.md created with project-specific guidance
- ✅ Template docs archived/removed
Branding:
- ✅ Updated throughout application
- ✅ Landing page customized
- ✅ Login page branded
Next Steps:
1. Review updated CLAUDE.md for project-specific guidance
2. Create super admin at http://localhost:8000/super-user-dev.php
3. Login and verify three-tier panel structure
4. Run quality checks: composer quality
5. Begin implementing features from docs/project-requirements/
Development Commands:
- composer test # Run tests
- composer stan # Static analysis
- composer cs-fix # Format code (PSR-12)
- composer quality # Run all checks
References:
- Requirements: docs/project-requirements/
- Schema: database/schema/
- Development Guide: CLAUDE.md向用户报告:
✅ [项目名称] 初始化完成!
已加载需求:
- ✅ 已从docs/project-requirements/读取需求
- ✅ 已审核database/schema/中的数据库Schema
- ✅ 已自定义用户类型:[列出自定义类型]
- ✅ 已设置会话前缀:[prefix]_
数据库搭建:
- ✅ 已应用核心Schema
- ✅ 已加载种子数据(如有提供)
- ✅ 多租户校验通过
PHP开发工具已安装:
- ✅ PHPStan (level 8) - 静态分析
- ✅ PHP CS Fixer - PSR-12代码格式化
- ✅ PHPUnit/Pest - 测试框架
- ✅ 已创建配置文件
- ✅ 已配置Composer脚本
项目文档:
- ✅ 已更新[项目名称]的README.md
- ✅ 已创建带项目专属指导的CLAUDE.md
- ✅ 模板文档已归档/移除
品牌标识:
- ✅ 全应用已更新
- ✅ 落地页已自定义
- ✅ 登录页已替换品牌
下一步:
1. 查看更新后的CLAUDE.md获取项目专属指导
2. 访问http://localhost:8000/super-user-dev.php创建超级管理员
3. 登录并验证三层面板结构
4. 运行质量检查:composer quality
5. 开始实现docs/project-requirements/中的功能
开发命令:
- composer test # 运行测试
- composer stan # 静态分析
- composer cs-fix # 格式化代码(PSR-12)
- composer quality # 运行所有检查
参考文档:
- 需求:docs/project-requirements/
- Schema:database/schema/
- 开发指南:CLAUDE.mdFile Structure After Setup
搭建后的文件结构
Template Structure (Before Project Customization)
模板结构(项目自定义前)
saas-seeder/
├── public/ # Web root
│ ├── index.php # Landing page with nav buttons
│ ├── sign-in.php # Login
│ ├── super-user-dev.php # Super admin creator
│ ├── dashboard.php # Franchise admin dashboard
│ ├── skeleton.php # Page template
│ ├── adminpanel/ # Super admin panel
│ ├── memberpanel/ # End user portal
│ └── assets/ # Shared CSS/JS
├── src/
│ ├── config/
│ │ ├── auth.php # Auth functions + access control
│ │ ├── session.php # Session prefix helpers
│ │ └── database.php # Database connection
│ └── Auth/ # Auth services, helpers, DTOs
├── docs/
│ ├── seeder-template/ # Template schemas
│ ├── PANEL-STRUCTURE.md # Architecture guide
│ └── project-requirements/ # ⭐ PUT PROJECT REQUIREMENTS HERE
│ ├── requirements.md
│ ├── business-rules.md
│ ├── user-types.md
│ └── workflows.md
├── database/
│ └── schema/ # ⭐ PUT DATABASE SCHEMAS HERE
│ ├── core-schema.sql
│ └── seed-data.sql
├── .env # Environment config
├── composer.json # Dependencies
├── setup-database.ps1 # Setup script
├── fix-database.ps1 # Fix script
└── CLAUDE.md # Development guidesaas-seeder/
├── public/ # 网站根目录
│ ├── index.php # 带导航按钮的落地页
│ ├── sign-in.php # 登录页
│ ├── super-user-dev.php # 超级管理员创建工具
│ ├── dashboard.php # 租户管理面板仪表盘
│ ├── skeleton.php # 页面模板
│ ├── adminpanel/ # 超级管理员面板
│ ├── memberpanel/ # 终端用户门户
│ └── assets/ # 公共CSS/JS
├── src/
│ ├── config/
│ │ ├── auth.php # 身份认证函数 + 访问控制
│ │ ├── session.php # 会话前缀助手函数
│ │ └── database.php # 数据库连接
│ └── Auth/ # 身份认证服务、助手、DTO
├── docs/
│ ├── seeder-template/ # 模板Schema
│ ├── PANEL-STRUCTURE.md # 架构指南
│ └── project-requirements/ # ⭐ 在此处存放项目需求
│ ├── requirements.md
│ ├── business-rules.md
│ ├── user-types.md
│ └── workflows.md
├── database/
│ └── schema/ # ⭐ 在此处存放数据库Schema
│ ├── core-schema.sql
│ └── seed-data.sql
├── .env # 环境配置
├── composer.json # 依赖
├── setup-database.ps1 # 搭建脚本
├── fix-database.ps1 # 修复脚本
└── CLAUDE.md # 开发指南References
参考文档
Complete documentation in subdirectories:
- - Complete architectural standards
references/architecture.md - - Detailed step-by-step workflow
references/workflow.md - - Common issues and solutions
references/troubleshooting.md - - PHP development tools setup and usage guide
references/php-tooling.md
External references:
- - Three-tier architecture guide
../../docs/PANEL-STRUCTURE.md - - Development guidelines
../../CLAUDE.md - - Skill for creating requirements docs
../project-requirements/
子目录中的完整文档:
- - 完整架构规范
references/architecture.md - - 详细分步工作流
references/workflow.md - - 常见问题与解决方案
references/troubleshooting.md - - PHP开发工具安装与使用指南
references/php-tooling.md
外部参考:
- - 三层架构指南
../../docs/PANEL-STRUCTURE.md - - 开发规范
../../CLAUDE.md - - 需求文档创建技能
../project-requirements/
Quality Assurance
质量保证
See for complete guide.
references/php-tooling.md完整指南请查看。
references/php-tooling.mdQuick Commands
快速命令
bash
composer cs-fix # Format code (PSR-12)
composer stan # Static analysis
composer test # Run tests
composer quality # All checksbash
composer cs-fix # 格式化代码(PSR-12)
composer stan # 静态分析
composer test # 运行测试
composer quality # 运行所有检查Pre-Commit Workflow
预提交工作流
bash
composer quality && git commit -m "feat: description"bash
composer quality && git commit -m "feat: description"What to Test
测试范围
✅ Authentication, franchise isolation, permissions, password hashing, session management, input validation
See for testing examples, CI/CD setup, and IDE integration.
references/php-tooling.md✅ 身份认证、租户隔离、权限、密码哈希、会话管理、输入校验
测试示例、CI/CD搭建和IDE集成请查看。
references/php-tooling.mdSecurity Checklist Before Production
生产环境前置安全检查清单
- Remove or restrict access
super-user-dev.php - Change from
SESSION_PREFIXsaas_app_ - Set strong (64+ chars)
PASSWORD_PEPPER - Set strong (32+ chars)
COOKIE_ENCRYPTION_KEY - Set
APP_ENV=production - Enable HTTPS (session cookies require it)
- Review all queries for franchise_id filtering
- Set proper file permissions on (600)
.env
- 移除或限制访问权限
super-user-dev.php - 修改默认值
SESSION_PREFIXsaas_app_ - 设置强(64字符以上)
PASSWORD_PEPPER - 设置强(32字符以上)
COOKIE_ENCRYPTION_KEY - 设置
APP_ENV=production - 启用HTTPS(会话cookie要求)
- 检查所有查询是否添加了franchise_id过滤
- 给设置正确的文件权限(600)
.env