/engineering:saas-seederfrom engineering
Bootstraps a multi-tenant SaaS from a seeder template: database, environment, super admin, three-tier panel verification, and demo-login shortcuts.
Ships in engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.
Scope boundary: This template bootstrap skill is not the full-coverage business-data workflow. Use
saas/full-coverage-saas-seedingfor application-boundary demo activity; keep global categories, coding lists, units, statuses, permissions, and similar reference data separate.
| Input | Required | Use |
|---|---|---|
| Tenant scope and target environment | yes | Bound bootstrap changes |
| Approved configuration and credentials | yes | Create the intended instance |
Default to read-only or dry-run. Bootstrap only with explicit authority, least privilege, tenant scope, rollback, and auditable approval; never expose secrets.
If database, credentials, or target environment are unavailable, return a dry-run plan and do not claim initialization or verification.
| Condition | Action |
|---|---|
| Target and authority are verified | Bootstrap, test, and record |
| Any required access is missing | Stop at dry-run |
| Category | Artifact | Format | Example |
|---|---|---|---|
| Release evidence | SaaS bootstrap record | Markdown doc capturing database, super-admin, and environment setup decisions for the seeded SaaS | docs/saas/bootstrap-record-2026-04-16.md |
references/ directory for deep detail after reading the core workflow below.Bootstrap a new multi-tenant SaaS project using the SaaS Seeder Template with proper three-tier panel architecture, Argon2ID authentication, and franchise isolation.
Skill-specific references:
Complete documentation in subdirectories:
references/architecture.md - Complete architectural standardsreferences/workflow.md - Detailed step-by-step workflowreferences/troubleshooting.md - Common issues and solutionsreferences/php-tooling.md - PHP development tools setup and usage guideExternal references:
../../docs/PANEL-STRUCTURE.md - Three-tier architecture guide../../AGENTS.md - Development guidelines../project-requirements/ - Skill for creating requirements docsAlways 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.
All database schema setup, seeding, and migrations MUST follow mysql-best-practices skill patterns including character sets, indexing, foreign keys, and stored procedures.
All SaaS projects deploy across three environments:
| Environment | OS | Database | Web Root |
|---|---|---|---|
| Development | Windows 11 (WAMP) | MySQL 8.x | <WAMP root>\www\{project}\ |
| Staging | Ubuntu VPS | MySQL 8.x | /var/www/html/{project}/ |
| Production | Debian VPS | MySQL 8.x | /var/www/html/{project}/ |
Cross-platform rules: Use utf8mb4_unicode_ci collation. Match file/directory case exactly (Linux is case-sensitive). Use forward slashes in PHP paths. Production migrations go in database/migrations-production/ (non-destructive, idempotent).
Use when the user says:
BEFORE bootstrapping, developers MUST provide:
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 project-requirements skill to create these files with AI assistance.
/manuals/ and a public entry point (e.g., /public/user-manuals.php)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:
franchise_id columnutf8mb4_unicode_ci collationWhen starting a new project:
Read Project Requirements
docs/project-requirements/Review Database Schema
database/schema/Update Project Documentation
docs/plans/INDEX.md exists as the master plan status index and is maintained as plans are created or updatedCustomize Template
Validate Completeness
See references/architecture.md for complete details.
/public/ (root) - Franchise Admin Panel (THE MAIN WORKSPACE)
owner, staffdashboard.php, skeleton.php/public/adminpanel/ - Super Admin Panel
super_admin/public/memberpanel/ - End User Portal
member, student, customer, patientKey Principle: /public/ root is NOT a redirect router - it's the franchise admin workspace!
All session variables use a prefix:
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 exists
Customize per SaaS: school_, restaurant_, clinic_, etc.
Uses Argon2ID (NOT bcrypt):
Algorithm: Argon2ID + salt(32 chars) + pepper(64+ chars)
Hash: salt + Argon2ID(HMAC-SHA256(password, pepper) + salt)
CRITICAL: Use super-user-dev.php to create admin users, NOT migration defaults!
docs/seeder-template/migration.sql - Core auth/RBAC schemadocs/seeder-template/fix-collation-and-create-franchises.sql - Collation fixes + franchises tabledocs/project-requirements/ - Project requirements (developer provides)database/schema/ - Project database schemas (developer provides)public/super-user-dev.php - Super admin creator (DEV ONLY)public/dashboard.php - Franchise admin dashboardpublic/skeleton.php - Page template.env - Environment configurationSee references/workflow.md for complete step-by-step guide.
Environment Setup
.env fileInstall Dependencies
composer install
Install PHP Development Tools
See references/php-tooling.md for complete setup guide.
Quick install:
# 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-dependencies
Create configs and add composer scripts (see references/php-tooling.md for details).
Database Setup
.\setup-database.ps1 # Windows PowerShell
Fix Collations
.\fix-database.ps1 # Creates franchises table
Create Super Admin
http://localhost:8000/super-user-dev.phpVerify Setup
http://localhost:8000/sign-in.phpProject Customization
src/config/session.phpsuper_admin - Platform operators (franchise_id CAN be NULL)owner - Franchise owners (franchise_id REQUIRED)staff - Franchise staff with permissions (franchise_id REQUIRED)ALWAYS filter by franchise_id:
// CORRECT
$stmt = $db->prepare("SELECT * FROM students WHERE franchise_id = ?");
$stmt->execute([getSession('franchise_id')]);
// WRONG - data leakage!
$stmt = $db->prepare("SELECT * FROM students");
RESOURCE_ACTIONINVOICE_CREATE, STUDENT_DELETE, REPORT_VIEWSee references/troubleshooting.md for complete guide.
Session Not Persisting
Password Mismatch
super-user-dev.php, NOT manual password_hash()Collation Errors
.\fix-database.ps1Missing Franchises Table
.\fix-database.ps1Report 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]
- ✅ AGENTS.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 AGENTS.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: AGENTS.md
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
└── AGENTS.md # Development guide
See references/php-tooling.md for complete guide.
composer cs-fix # Format code (PSR-12)
composer stan # Static analysis
composer test # Run tests
composer quality # All checks
composer quality && git commit -m "feat: description"
✅ Authentication, franchise isolation, permissions, password hashing, session management, input validation
See references/php-tooling.md for testing examples, CI/CD setup, and IDE integration.
super-user-dev.php or restrict accessSESSION_PREFIX from saas_app_PASSWORD_PEPPER (64+ chars)COOKIE_ENCRYPTION_KEY (32+ chars)APP_ENV=production.env (600)Seeding must be deterministic, rerunnable without duplication, safe outside production, explicit about credentials, and verified across migrations, tenant boundaries, roles, and panels.
Every demo SaaS MUST keep a stable baseline and a fictional, tenant-scoped
rolling activity refresh (normally the latest 14 days). The refresh contract
requires deterministic keys, --from/--to/--days, --dry-run, a production
guard, a run ledger, coverage verification, no destructive changes, and
second-server portability. Demo login is one-click profile buttons with no
password anywhere: references/demo-one-click-login.md.
Use ../full-coverage-saas-seeding/references/synthetic-name-bank-standard.md for fictional, culturally scoped, deterministic, checksum-recorded four-CSV identity pools; never use a tiny repeated list or runtime-random names.
See references/recurring-demo-data.md
for the full contract, verification checklist, and command pattern.
| Artefact | Consumer | Acceptance condition |
|---|---|---|
| Seeded SaaS baseline and verification record | Application team | Environment, migrations, tenant isolation, super-admin access, panels, and repeatable seed execution pass the documented smoke checks |
references/architecture.md (opens in a new tab)references/demo-one-click-login.md (opens in a new tab)references/php-tooling.md (opens in a new tab)references/recurring-demo-data.md (opens in a new tab)references/seeder-template.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)references/workflow.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
saas-bootstrap, multi-tenant, seeding, super-admin, demo-data
npx claudepluginhub peterbamuhigire/chwezi-dev-engine --plugin engineering169 skills in this plugin
/accounting-engineUse when designing or implementing double-entry accounting policy and an embedded ledger engine for invoices, payments, stock, balanced postings, mapped accounts, idempotency, reversals, period locks, audit trails, and financial statements./accounting-finance-controllerUse when coordinating accounting and finance implementation reviews, doctrine routing, control evidence, remediation priorities, and release decisions across a software system./advanced-testing-strategyUse when designing or reviewing test strategy for production systems, APIs, mobile apps, SaaS platforms, ERP workflows, and AI-enabled systems. Covers unit, integration, contract, end-to-end, regression, release-gate, and risk-based testing decisions.Other plugins' skills for the same job