Skip to content

Master Automation Plan

End-to-End Product Lifecycle Automation

Version: 3.0.0 Created: 2026-01-04 Author: Claude DevOps Platform: Pvdify App Factory Status: DRAFT - Ready for Review


Executive Summary

This document defines a complete automation pipeline for the Pvdify App Factory — a dual-plane architecture that separates marketing/launch sites (WHM/cPanel) from application runtimes (pvdifyd/Podman). The system enables rapid product launches with stable client hosting and safe app deployment.

Platform Philosophy

WHM/cPanel is a permanent, first-class plane for public-facing marketing and launch websites. pvdifyd + Podman form a controlled App Factory for application backends. Cloudflare binds them together at the edge. Claude + Beads orchestrate everything.

Available Infrastructure

SystemPlaneAPI/ToolResources
CloudflareEdgeflarectl, wrangler, Tunnels49 zones
cPanel/WHMMarketingwhmapi1, whmapiwrapper47 accounts
LiteSpeedMarketing.htaccess, cacheWeb server
WordPressMarketingWP-CLI, Block AssemblerCMS
MainWPMarketingmwp CLI40+ sites
pvdifydApp FactoryREST API (:9443)PaaS orchestrator
PodmanApp Factoryrootless containersRuntime
SendyExternalREST API, SendyKit4 brands
StripeExternalREST APIPayments
BeadsOrchestrationbd CLITask tracking
PostHogAnalyticsREST API, data.philoveracity.comMulti-brand analytics


Pvdify App Factory — Foundational Architecture

Platform Identity

Pvdify is a dual-plane App Factory built on a single Virtuozzo VPS. It cleanly separates marketing/launch sites (WHM/cPanel) from application runtimes (pvdifyd/Podman), enabling rapid product launches with stable client hosting and safe app deployment.

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│ PVDIFY APP FACTORY │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────┐ │
│ │ EDGE PLANE │ │
│ │ (Cloudflare) │ │
│ │ DNS · TLS · WAF │ │
│ └──────────┬──────────┘ │
│ │ │
│ ┌─────────────────────────┼─────────────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌────────────────────────┐ ┌─────────────────────┐ ┌─────────────────────────┐ │
│ │ MARKETING PLANE │ │ APP FACTORY PLANE │ │ ORCHESTRATION PLANE │ │
│ │ (WHM/cPanel) │ │ (pvdifyd + Podman) │ │ (Claude + Beads) │ │
│ ├────────────────────────┤ ├─────────────────────┤ ├─────────────────────────┤ │
│ │ • Product sites │ │ • API backends │ │ • App provisioning │ │
│ │ • Launch pages │ │ • SaaS logic │ │ • Deploy automation │ │
│ │ • Docs & blogs │ │ • Workers │ │ • CF API control │ │
│ │ • WordPress │ │ • Internal tools │ │ • Secrets management │ │
│ │ • Ports 80/443 │ │ • Ports 3000-3999 │ │ • Task audit log │ │
│ └────────────────────────┘ └─────────────────────┘ └─────────────────────────┘ │
│ │ │ │ │
│ │ │ │ │
│ └─────────────────────────┴─────────────────────────┘ │
│ │ │
│ ┌──────────┴──────────┐ │
│ │ SINGLE VPS │ │
│ │ (Virtuozzo) │ │
│ │ No Swap · Podman │ │
│ └─────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────────────────┘

Core Constraints (Non-Negotiable)

ConstraintImplication
Single Virtuozzo VPSAll planes share one host
WHM/cPanel permanentNever replaced, always authoritative for marketing
Podman (rootless)Container runtime, no Docker daemon
No swap memoryHard memory limits, strict resource discipline
Cloudflare controls DNS/TLSNo origin TLS management
External CI onlyNo builds on VPS, image-based deploys

Plane Definitions

1. Edge Plane — Cloudflare (Authoritative Ingress)

Role: Single point of entry for all traffic

ResponsibilityImplementation
DNSAll domains managed via cf CLI
TLS terminationFull (strict) mode
WAF / Rate limitingCloudflare rules
App ingressCloudflare Tunnel to pvdifyd
Traffic steeringRoutes to Marketing or App plane

Key Rule: No public exposure of Podman ports. All app traffic flows through Cloudflare Tunnel.


2. Marketing & Launch Plane — WHM/cPanel (Permanent)

Role: Public-facing product marketing, launch pages, SEO authority

AttributeValue
Web ServerLiteSpeed
RuntimePHP 8.0+ / EA4
CMSWordPress + Block Assembler (WP UI AI)
Ports80, 443 (via Cloudflare)
Account ModelcPanel sub-account per product/brand

Domain Patterns:

  • product.com — Main marketing site
  • www.product.com — WWW redirect
  • launch.product.com — Pre-launch / waitlist
  • docs.product.com — Documentation (static or WP)

What Runs Here:

  • Product marketing sites
  • Launch pages & waitlists
  • Documentation & blogs
  • Customer acquisition funnels
  • SEO-optimized content

What Does NOT Run Here:

  • Node.js applications
  • Container workloads
  • Business logic / APIs
  • Database-heavy SaaS features

Integration Model: Marketing sites act as the front door. They communicate with App Factory via:

  • REST API calls
  • Webhooks (Stripe, Sendy, etc.)
  • Secure service tokens
  • Never run business logic directly

3. App Factory Plane — pvdifyd + Podman

Role: Application backends, APIs, workers, SaaS logic

AttributeValue
Orchestratorpvdifyd (Go daemon, REST API on :9443)
RuntimePodman (rootless containers)
Ports3000–3999 (internal only)
Deploy ModelPre-built OCI images via REST API
Resource ModelHard memory/CPU limits per container

Domain Patterns:

  • api.product.com — Product API
  • app.product.com — Application frontend (React, Vue, etc.)
  • *.apps.pvdify.win — Internal namespace for staging/tools

What Runs Here:

  • API backends (Node, Python, Go, Rust)
  • SaaS application logic
  • Background workers
  • Internal tools (admin dashboards, etc.)
  • Redis, PostgreSQL (containerized)

What Does NOT Run Here:

  • Marketing content
  • SEO pages
  • WordPress
  • Any public-facing non-app content

App Unit Definition (Factory Slot):

app_name: billing-api
image: ghcr.io/pvdify/billing-api:2.0.1
port: 3002
domain: api.product.com
memory: 512MB
cpu: 0.5
health: /health
env:
DATABASE_URL: ${DATABASE_URL}
STRIPE_SECRET: ${STRIPE_SECRET}
workers:
- name: invoice-worker
command: node workers/invoice.js
memory: 256MB

4. Orchestration Plane — Claude Code + Beads

Role: Infrastructure automation, source of truth

ResponsibilityImplementation
App provisioningbd create, pvdifyd API calls
Deploy automationREST API → pvdifyd → Podman
Cloudflare controlcf CLI for DNS, tunnels
Secrets managementpvdifyd config + SOPS encryption
Task memoryBeads audit trail

Authority Model:

  • Claude + Beads decides → issues commands
  • pvdifyd executes → runs containers via Podman + systemd
  • Cloudflare routes → manages edge
  • WHM hosts → serves marketing
Terminal window
# Orchestration commands
bd create "Deploy billing-api v2.0.1" -p 0
curl -X POST https://pvdify.win/api/v1/apps/billing-api/releases \
-d '{"image":"ghcr.io/org/billing-api:2.0.1"}'
cf dns create --zone product.com --type CNAME --name api --content tunnel.cfargotunnel.com
bd close <id> --reason "Deployed successfully"

Domain & Traffic Flow

User Request
┌─────────────────────┐
│ Cloudflare │
│ (Edge Plane) │
└──────────┬──────────┘
┌────────────────────────────┼────────────────────────────┐
│ │ │
▼ ▼ ▼
product.com api.product.com app.product.com
www.product.com *.apps.pvdify.win
docs.product.com
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌───────────────────┐ ┌───────────────────┐
│ WHM / cPanel │ │ Cloudflare Tunnel │ │ Cloudflare Tunnel │
│ (LiteSpeed) │ └─────────┬─────────┘ └─────────┬─────────┘
│ Port 80/443 │ │ │
└─────────────────┘ ▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ pvdifyd App │ │ pvdifyd App │
│ Port 3001 │ │ Port 3002 │
└───────────────────┘ └───────────────────┘

Build & Deploy Pipeline

Principle: No builds occur on the VPS. External CI only.

┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Developer │ ──► │ Git Push │ ──► │ CI Build │ ──► │ Registry │
│ Commits │ │ (GitHub) │ │ (Actions) │ │ (GHCR) │
└─────────────┘ └─────────────┘ └─────────────┘ └──────┬──────┘
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Live App │ ◄── │ Health │ ◄── │ pvdifyd │ ◄── │ Beads │
│ Running │ │ Check │ │ Deploy │ │ Task │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘

Deploy Commands:

Terminal window
# From orchestration plane
curl -X POST https://pvdify.win/api/v1/apps/billing-api/releases \
-d '{"image":"ghcr.io/pvdify/billing-api:2.0.1"}'
# Health check
curl -f http://localhost:3002/health || curl -X POST https://pvdify.win/api/v1/apps/billing-api/rollback
# Rollback on failure
curl -X POST https://pvdify.win/api/v1/apps/billing-api/rollback

Resource Discipline (No-Swap Reality)

Hard memory limits prevent OOM cascade failures.

Workload TypeMemory CapCPU Cap
Web app (API)256–512MB0.5–1.0
Worker128–256MB0.25–0.5
Redis64–128MB0.25
PostgreSQL512MB–1GB1.0
WHM baseline~2GB reserved

Guarantee: WHM and pvdifyd resource usage never overlap at runtime.


Security Model

LayerControl
SSHKey-only access
UsersSeparate service accounts
AdminCloudflare Access protection
PortsNo public Podman ports
SecretsRuntime injection via pvdifyd config + SOPS encryption
PlanesStrict separation, no cross-contamination

Failure Isolation Guarantees

FailureImpact
Marketing site downApps unaffected
App OOMWHM unaffected
Single app crashOther apps unaffected
Rollback neededFast, deterministic

Integration: Launch Archetypes + App Factory

Product Launch Archetypes span both planes:

ArchetypeMarketing Plane (WHM)App Factory Plane (pvdifyd)
saas_landingLanding page, pricing, docsAPI backend, dashboard app
digital_productSales page, checkoutLicense API, download service
service_businessMarketing siteBooking API (optional)
ecommerce_storeProduct catalog (WooCommerce)Inventory API, fulfillment workers
membership_sitePublic pagesAuth API, content API, billing
portfolio_agencyFull siteNone (static)
event_launchLanding, registrationWebinar backend (optional)
docs_siteDocumentationAPI reference (optional)
newsletter_mediaArchive, subscribeDelivery workers (Sendy)

Example: SaaS Product Launch

product: acme-saas
brand: acme.com
marketing_plane:
domain: acme.com
cpanel_user: acme
sites:
- type: wordpress
archetype: saas_landing
pages: [home, features, pricing, docs, blog, contact]
integrations: [stripe_checkout, sendy_signup]
app_factory_plane:
apps:
- name: acme-api
domain: api.acme.com
image: ghcr.io/acme/api:latest
port: 3001
memory: 512MB
- name: acme-dashboard
domain: app.acme.com
image: ghcr.io/acme/dashboard:latest
port: 3002
memory: 256MB
- name: acme-worker
image: ghcr.io/acme/worker:latest
memory: 128MB
worker: true
edge_plane:
cloudflare_zone: acme.com
records:
- { type: A, name: @, content: 199.167.200.52, proxied: true }
- { type: CNAME, name: www, content: acme.com, proxied: true }
- { type: CNAME, name: api, content: tunnel-id.cfargotunnel.com, proxied: true }
- { type: CNAME, name: app, content: tunnel-id.cfargotunnel.com, proxied: true }

CLI Commands: App Factory Operations

Terminal window
# === pvdifyd API App Management ===
# Create new app slot
curl -X POST https://pvdify.win/api/v1/apps \
-d '{"name":"billing-api","environment":"production"}'
# Deploy image (create release)
curl -X POST https://pvdify.win/api/v1/apps/billing-api/releases \
-d '{"image":"ghcr.io/org/billing-api:2.0.1"}'
# Set environment variables
curl -X PUT https://pvdify.win/api/v1/apps/billing-api/config \
-d '{"vars":{"DATABASE_URL":"postgres://...","STRIPE_SECRET":"sk_..."}}'
# Scale processes
curl -X POST https://pvdify.win/api/v1/apps/billing-api/ps/scale \
-d '{"web":2,"worker":1}'
# Set domain
curl -X POST https://pvdify.win/api/v1/apps/billing-api/domains \
-d '{"name":"api.product.com"}'
# Check status
curl https://pvdify.win/api/v1/apps/billing-api
# View logs (SSE stream)
curl https://pvdify.win/api/v1/apps/billing-api/logs?follow=true
# Rollback
curl -X POST https://pvdify.win/api/v1/apps/billing-api/rollback
# Destroy app
curl -X DELETE https://pvdify.win/api/v1/apps/billing-api
# === Cloudflare Tunnel ===
# Create tunnel
cloudflared tunnel create pvdify-apps
# Route traffic
cloudflared tunnel route dns pvdify-apps api.product.com
# Run tunnel (systemd service)
cloudflared tunnel run pvdify-apps
# === Orchestration (Beads) ===
# Track deployment
bd create "Deploy billing-api v2.0.1" -p 0 -t deploy
bd update <id> --status in_progress
# ... deploy commands ...
bd close <id> --reason "Deployed, health check passed"

What This Architecture Enables

  1. Rapid product launches — Marketing first, apps later
  2. SEO-optimized launch sites — WordPress + LiteSpeed
  3. Safe SaaS iteration — Isolated app containers
  4. Clean WordPress ↔ App integration — API boundaries
  5. Foundation for:
    • App templates (pre-configured pvdifyd app slots)
    • Usage-based billing
    • Analytics dashboards
    • Multi-product scaling
    • White-label deployments

Explicit Non-Goals

Not DoingReason
KubernetesOverkill for single VPS
Local CIVPS resource constraints
Host-level NodeConflicts with cPanel
pvdifyd ingress ownershipCloudflare handles edge via tunnels
Replace WHMPermanent marketing plane

Phase Integration: MAP Workflow + App Factory

The 7-phase MAP workflow maps to the dual-plane model:

PhasePlaneActions
1. DNSEdgeCloudflare zone/record creation
2. HostingMarketingcPanel account provisioning
3. Website BuildMarketingBlock Assembler / WP UI AI
4. Fleet MgmtMarketingMainWP connection
5. EmailExternalSendy list/campaign creation
6. CommerceMarketing + AppStripe (checkout on WHM, webhooks to App)
7. FulfillmentAppLicense API, delivery workers

Extended for App Factory:

PhasePlaneActions
8. App ProvisioningApp Factorypvdifyd app creation via API, resource limits
9. App DeployApp FactoryImage deploy, health check
10. Tunnel SetupEdgeCloudflare Tunnel for app domains
11. IntegrationCross-PlaneWordPress ↔ API connection

Product Rebranding: Block Assembler → WP UI AI

Brand Transition

CurrentFuture
Block AssemblerWP UI AI
matcotravelcollective.com (dev)wpuiai.com (production)
/home/matco/public_html/wp-content/plugins/block-assembler/Same codebase, new branding

wpuiai.com Domain Strategy

Terminal window
# DNS Configuration for wpuiai.com
cf dns create --zone wpuiai.com --type A --name @ --content 199.167.200.52 --proxy=true
cf dns create --zone wpuiai.com --type A --name www --content 199.167.200.52 --proxy=true
cf dns create --zone wpuiai.com --type CNAME --name docs --content wpuiai.com --proxy=true
cf dns create --zone wpuiai.com --type CNAME --name app --content wpuiai.com --proxy=true
# Subdomains
# wpuiai.com - Marketing site / landing pages
# docs.wpuiai.com - Documentation
# app.wpuiai.com - SaaS dashboard (future)

Rebranding Checklist

  • Update plugin headers (Plugin Name, Plugin URI)
  • Update text domain from block-assembler to wpuiai
  • Create new logo assets
  • Update admin menu labels
  • Create redirect from old URLs (if any)
  • Update documentation references
  • Configure wpuiai.com hosting account

Phase 1: Domain Acquisition & DNS

1.1 Domain Registration (External)

Current Status: Manual process via registrar Recommended Registrars: Namecheap, Cloudflare Registrar, Google Domains

Automation Opportunity: Integrate with registrar APIs for automated domain purchase.

1.2 DNS Configuration (Cloudflare)

Once domain is acquired, automate DNS setup:

Terminal window
# Add domain to Cloudflare (if not already there)
# Manual step: Add zone via Cloudflare dashboard first
# Verify zone exists
cf zone list | grep "newdomain.com"
# Configure DNS records for VPS hosting
cf dns create --zone newdomain.com --type A --name @ --content 199.167.200.52 --proxy=true
cf dns create --zone newdomain.com --type A --name www --content 199.167.200.52 --proxy=true
cf dns create --zone newdomain.com --type CNAME --name mail --content mail.newdomain.com
cf dns create --zone newdomain.com --type MX --name @ --content mail.newdomain.com --priority=10
# Configure SSL mode
cf zone settings --zone newdomain.com --setting ssl=full

1.3 DNS Automation Script

/root/scripts/setup-domain-dns.sh
#!/bin/bash
DOMAIN="$1"
VPS_IP="${2:-199.167.200.52}"
if [ -z "$DOMAIN" ]; then
echo "Usage: setup-domain-dns.sh <domain> [ip]"
exit 1
fi
echo "=== Configuring DNS for $DOMAIN ==="
# Root A record
cf dns create --zone "$DOMAIN" --type A --name @ --content "$VPS_IP" --proxy=true
# WWW record
cf dns create --zone "$DOMAIN" --type A --name www --content "$VPS_IP" --proxy=true
# Mail records (for email)
cf dns create --zone "$DOMAIN" --type MX --name @ --content "mail.$DOMAIN" --priority=10
cf dns create --zone "$DOMAIN" --type A --name mail --content "$VPS_IP"
# SPF record for email
cf dns create --zone "$DOMAIN" --type TXT --name @ --content "v=spf1 +a +mx +ip4:$VPS_IP ~all"
# SSL mode
cf zone settings --zone "$DOMAIN" --setting ssl=full
echo "DNS configured for $DOMAIN"

Phase 2: Hosting Account Setup (cPanel)

2.1 Create cPanel Account

Terminal window
# Using whmapiwrapper
whmapiwrapper create newdomain.com
# Or direct WHM API
whmapi1 createacct \
domain=newdomain.com \
username=newdomainuser \
plan=Edge \
contactemail=admin@philoveracity.com

2.2 Available Hosting Packages

PackagePurpose
EdgeStandard production sites
PVD_ParkedPlaceholder/parked domains
DevDevelopment sites

2.3 Configure PHP Version

Terminal window
# Set PHP 8.0 for the account
whmapiwrapper php-set newdomainuser ea-php80
# Verify
whmapiwrapper php | grep newdomainuser

2.4 SSL Certificate

Terminal window
# Run AutoSSL for the domain
whmapiwrapper autossl newdomainuser
# Check SSL status
whmapiwrapper ssl newdomain.com

Phase 3: Website Build (Block Assembler / WP UI AI)

3.1 Plugin Overview

Block Assembler (future: WP UI AI) provides the core automation for website content creation:

  • Composable Layouts - Pages built from governed block patterns
  • Page Archetypes - Structured templates (home, listing, detail, about)
  • Content Injection - Dynamic content via placeholders
  • AI Verification - Design critique and iterative refinement
  • Google Drive Integration - Client content via shared folders
  • Mimic Mode - Clone any website’s design with 23-step workflow
  • Intake Q&A System - Structured client questionnaire for content inference

3.2 Intake Q&A System (Content Inference Engine)

The intake system is the foundation for automated content generation. It gathers structured information that feeds directly into the MD Map planning document.

3.2.1 Question Categories (7 Categories, 25+ Questions)

CategoryPurposeExample Questions
Business BasicsCore identityBusiness name, tagline, phone, address
Goals & FeaturesWebsite objectivesWhat should visitors do? Purchase, contact, subscribe?
PagesSite structureWhich pages needed? Home, About, Services, Shop?
InspirationDesign directionReference URLs, style preferences
BrandingVisual identityLogo upload, color preferences, font style
Target AudienceUser personasWho are your customers? What problems do you solve?
Social & MarketingExternal presenceSocial links, existing marketing channels

3.2.2 Complete Question Reference

// Full 25 default questions from admin/views/wizard.php
// BUSINESS BASICS
{ id: 'business_name', label: 'Business Name', type: 'text', required: true }
{ id: 'tagline', label: 'Tagline / Slogan', type: 'text' }
{ id: 'phone_number', label: 'Phone Number', type: 'phone' }
{ id: 'email_address', label: 'Email Address', type: 'email' }
{ id: 'physical_address', label: 'Physical Address', type: 'textarea' }
{ id: 'business_type', label: 'Business Type', type: 'chips',
options: ['Business/Corporate', 'Portfolio/Creative', 'Professional Services',
'Non-profit', 'E-commerce', 'Blog/Content'] }
// GOALS & FEATURES
{ id: 'user_actions', label: 'What should visitors do on this website?', type: 'chips',
options: ['Contact Form', 'Click to Call', 'Search', 'View Pricing',
'Comment on Blog', 'Forum', 'See Map', 'View Products',
'View Services', 'Purchase (E-commerce)', 'Schedule Appointment',
'Events Calendar', 'Subscribe Newsletter'] }
{ id: 'primary_goal', label: 'Primary Website Goal', type: 'select',
options: ['Generate Leads', 'Sell Products', 'Build Community',
'Showcase Portfolio', 'Provide Information'] }
// PAGES
{ id: 'pages', label: 'Pages Needed', type: 'chips',
options: ['Home', 'About', 'Contact', 'Services', 'Products', 'Pricing',
'Blog', 'Events', 'Testimonials', 'FAQ', 'Team', 'Portfolio',
'Shop', 'Privacy Policy'] }
// INSPIRATION
{ id: 'inspiration_urls', label: 'Websites You Like (URLs)', type: 'textarea' }
{ id: 'style_preference', label: 'Design Style', type: 'chips',
options: ['Modern/Minimal', 'Bold/Colorful', 'Classic/Traditional',
'Playful/Fun', 'Corporate/Professional'] }
// BRANDING
{ id: 'logo', label: 'Logo File', type: 'file' }
{ id: 'brand_colors', label: 'Brand Colors (hex codes)', type: 'text' }
{ id: 'font_preference', label: 'Font Style', type: 'select',
options: ['Sans-serif (Modern)', 'Serif (Classic)', 'Mixed'] }
// TARGET AUDIENCE
{ id: 'target_audience', label: 'Who are your ideal customers?', type: 'textarea' }
{ id: 'problems_solved', label: 'What problems do you solve?', type: 'textarea' }
{ id: 'unique_value', label: 'What makes you different?', type: 'textarea' }
// SOCIAL & MARKETING
{ id: 'social_facebook', label: 'Facebook URL', type: 'url' }
{ id: 'social_instagram', label: 'Instagram URL', type: 'url' }
{ id: 'social_twitter', label: 'Twitter/X URL', type: 'url' }
{ id: 'social_linkedin', label: 'LinkedIn URL', type: 'url' }
{ id: 'social_youtube', label: 'YouTube URL', type: 'url' }

3.2.3 Intake CLI Commands

Terminal window
# Create intake questionnaire for a client
wp block-assembler intake-create --business="Acme Corp" --email="client@acme.com"
# Returns: intake_id (e.g., 15)
# Fill intake headlessly (for automation)
wp block-assembler intake-run 15 --headless --answers='{
"business_name": "Acme Corp",
"tagline": "Innovation Delivered",
"business_type": "Business/Corporate",
"primary_goal": "Generate Leads",
"pages": ["Home", "About", "Services", "Contact"],
"user_actions": ["Contact Form", "Subscribe Newsletter"],
"target_audience": "Small business owners seeking automation",
"unique_value": "AI-powered solutions at SMB prices"
}' --complete
# Interactive CLI mode (prompts for each question)
wp block-assembler intake-run 15 --cli --complete
# View intake status
wp block-assembler intake-status 15
# Generate MD Map from intake answers
wp block-assembler intake-to-mdmap 15 --output=/tmp/site-plan.md

3.2.4 Token-Gated Client Intake Form

Terminal window
# Deploy intake form on any WordPress site
# Shortcode: [ba_intake_form]
# Generate unique client token
wp block-assembler intake-create --business="Client Name" --email="client@example.com"
# Returns token URL: https://site.com/intake/?token=abc123xyz
# Client fills form at their own pace
# Auto-saves progress, supports file uploads (logo, images)
# Completion triggers webhook (optional)

3.2.5 Content Inference Pipeline

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Intake Q&A │ → │ MD Map │ → │ Page Assembly │
│ (25 questions) │ │ (Site Plan) │ │ (Autopilot) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
- Business info - Page structure - Hero patterns
- Goals & features - Content mapping - Feature grids
- Target audience - Pattern assignments - CTA blocks
- Brand identity - Archetype rules - Design critique

Example: Inferring Hero Content

Terminal window
# From intake answers:
{
"business_name": "Acme Solutions",
"tagline": "Automate Everything",
"primary_goal": "Generate Leads",
"user_actions": ["Contact Form", "View Services"]
}
# Inferred hero pattern content:
{
"hero": {
"headline": "Acme Solutions",
"subheadline": "Automate Everything",
"cta_text": "Get Started",
"cta_url": "/contact"
}
}

3.3 Page Archetypes Reference

ArchetypeRequired PatternsCommon Patterns
homeherofeatures, about-preview, stats, testimonials, cta
listingpage-headerservices-grid, team-grid, cta
detailhero-detailcontent, gallery, testimonials, cta
abouthero-aboutstory, values, timeline, team-grid, cta

3.4 MD Map (Site Planning Document)

The MD Map is a Markdown document that serves as the master plan for site construction:

# Site Plan: Acme Solutions
## Business Context
- **Name:** Acme Solutions
- **Tagline:** Automate Everything
- **Type:** Business/Corporate
- **Goal:** Generate Leads
## Target Audience
Small business owners seeking automation solutions
## Pages
### Home (archetype: home)
- **Patterns:** hero, features, testimonials, cta
- **Hero Content:**
- Headline: Acme Solutions
- Subheadline: Automate Everything
- CTA: Get Started → /contact
### About (archetype: about)
- **Patterns:** hero-about, story, values, team-grid, cta
- **Content Source:** about.gdoc
### Services (archetype: listing)
- **Patterns:** page-header, services-grid, cta
- **Content Source:** services.gdoc
### Contact (archetype: detail)
- **Patterns:** page-header, contact-form, map, cta
- **Form:** Contact Form integration
## Design Direction
- **Style:** Modern/Minimal
- **Colors:** Extract from logo
- **Inspiration:** [reference URLs]

3.5 Automated Website Creation

Terminal window
# From intake questionnaire (after client completes)
su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-intake=15"
# From Google Drive content
su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-gdrive=FOLDER_ID"
# From wizard configuration
su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-wizard"
# Manual page assembly
su - $USERNAME -c "cd ~/public_html && wp block-assembler assemble \
--title='Home' \
--archetype=home \
--patterns=hero,features,cta \
--content='{\"hero\":{\"headline\":\"Welcome\"}}'"

3.6 Design Critique (Quality Assurance)

Terminal window
# Run AI design critique
su - $USERNAME -c "cd ~/public_html && wp block-assembler critique https://$DOMAIN"
# Scoring dimensions (0-10 each):
# - Layout, Color Contrast, Text Readability
# - Button Usability, Learnability, Design Cohesion
# - Responsivity/Adaptability (7th dimension, 25% weight)

3.7 23-Step Mimic Mode Workflow

#StepDescription
1capture_reference_screenshotsScreenshot inspiration sites
2pull_drive_contentPull content from Google Drive
3import_drive_imagesImport images to Media Library
4import_logoImport and set logo
5create_md_mapCreate planning document
6define_page_structureDefine pages and hierarchy
7extract_color_paletteExtract colors from logo
8assign_archetypesAssign page archetypes
9map_content_to_pagesMap Drive content to pages
10assign_patternsAssign patterns to pages
11delete_old_pagesClean up existing pages
12set_homepageConfigure static homepage
13build_navigationCreate navigation menu
14apply_brandingApply color palette to theme
15-22build_pagesBuild each page to 7.0+ score
23final_reviewFull site review

Phase 4: MainWP Fleet Integration

4.1 Connect to MainWP Dashboard

Terminal window
PHP_CLI="/opt/cpanel/ea-php80/root/usr/bin/php"
MAINWP_PATH="/home/nucleus/field.wpnucle.us"
# Install MainWP Child plugin
su - $USERNAME -c "cd ~/public_html && wp plugin install mainwp-child --activate"
# Generate unique ID and connect
UNIQUE_ID=$(openssl rand -hex 12)
$PHP_CLI -d memory_limit=512M /usr/local/bin/wp option update mainwp_child_uniqueId "$UNIQUE_ID" \
--path=$SITE_PATH --allow-root
$PHP_CLI -d memory_limit=512M /usr/local/bin/wp mainwp site \
--add-site \
--site-url="https://$DOMAIN" \
--name="$DOMAIN" \
--admin="Philoveracity_Design" \
--uniqueid="$UNIQUE_ID" \
--path="$MAINWP_PATH" \
--allow-root

Phase 5: Email Campaign Setup (Sendy/SendyKit)

5.1 Sendy Brands

IDBrand
1Philoveracity
2James L. Smith Realtor
3Startempire Wire
4ASAP Digest

5.2 Create Email List

Terminal window
curl -X POST "https://mail.thedream.rocks/api/lists/create-list.php" \
-d "api_key=BsZRrJFU3uDLhzRrEcXA" \
-d "brand_id=1" \
-d "list_name=Newsletter" \
-d "from_email=hello@domain.com" \
-d "from_name=Company Name" \
-d "reply_to=hello@domain.com"

5.3 WordPress Integration

Terminal window
# Add subscription form via Block Assembler
wp block-assembler assemble \
--title="Contact" \
--archetype=detail \
--patterns=page-header,contact-form,newsletter-signup,cta \
--content='{"newsletter":{"list_id":"abc123"}}'

5.4 Launch Campaign from Intake

Terminal window
# After intake completion, auto-create welcome campaign
curl -X POST "https://mail.thedream.rocks/api/campaigns/create.php" \
-d "api_key=BsZRrJFU3uDLhzRrEcXA" \
-d "from_name=${BUSINESS_NAME}" \
-d "from_email=hello@${DOMAIN}" \
-d "reply_to=hello@${DOMAIN}" \
-d "subject=Welcome to ${BUSINESS_NAME}" \
-d "html_text=<h1>Welcome!</h1><p>Thanks for signing up...</p>" \
-d "list_ids=${LIST_ID}" \
-d "brand_id=1"

Phase 6: Commerce Setup (Stripe API)

6.1 Commerce Overview

Complete payment processing integration for selling products and services:

┌─────────────────────────────────────────────────────────────────┐
│ COMMERCE PIPELINE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ PRODUCT │ → │ PRICING │ → │ CHECKOUT │ → │ FULFILL │ │
│ │ SETUP │ │ PLANS │ │ FLOW │ │ ORDER │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Stripe │ │ Stripe │ │ Stripe │ │ Webhooks │ │
│ │ Products │ │ Prices │ │ Checkout │ │ + Email │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

6.2 Stripe API Configuration

Terminal window
# Store API keys securely (wp-config.php or environment)
define('STRIPE_SECRET_KEY', 'sk_live_...');
define('STRIPE_PUBLISHABLE_KEY', 'pk_live_...');
define('STRIPE_WEBHOOK_SECRET', 'whsec_...');
# Test mode keys (for development)
define('STRIPE_TEST_SECRET_KEY', 'sk_test_...');
define('STRIPE_TEST_PUBLISHABLE_KEY', 'pk_test_...');

6.3 Product Creation

Terminal window
# Create product in Stripe
curl https://api.stripe.com/v1/products \
-u $STRIPE_SECRET_KEY: \
-d "name=WP UI AI Pro License" \
-d "description=Full-featured WordPress AI page builder" \
-d "metadata[product_type]=software_license" \
-d "metadata[license_type]=annual"
# Response includes product ID: prod_xxxxx

6.4 Pricing Plans

Terminal window
# One-time payment price
curl https://api.stripe.com/v1/prices \
-u $STRIPE_SECRET_KEY: \
-d "product=prod_xxxxx" \
-d "unit_amount=9900" \
-d "currency=usd" \
-d "metadata[plan]=one_time"
# Recurring subscription price
curl https://api.stripe.com/v1/prices \
-u $STRIPE_SECRET_KEY: \
-d "product=prod_xxxxx" \
-d "unit_amount=1900" \
-d "currency=usd" \
-d "recurring[interval]=month" \
-d "metadata[plan]=monthly"
# Annual subscription (discounted)
curl https://api.stripe.com/v1/prices \
-u $STRIPE_SECRET_KEY: \
-d "product=prod_xxxxx" \
-d "unit_amount=14900" \
-d "currency=usd" \
-d "recurring[interval]=year" \
-d "metadata[plan]=annual"

6.5 Checkout Session Creation

Terminal window
# Create checkout session for purchase
curl https://api.stripe.com/v1/checkout/sessions \
-u $STRIPE_SECRET_KEY: \
-d "mode=payment" \
-d "success_url=https://wpuiai.com/thank-you?session_id={CHECKOUT_SESSION_ID}" \
-d "cancel_url=https://wpuiai.com/pricing" \
-d "line_items[0][price]=price_xxxxx" \
-d "line_items[0][quantity]=1" \
-d "customer_email=customer@example.com" \
-d "metadata[product]=wpuiai_pro" \
-d "metadata[license_sites]=1"
# For subscription
curl https://api.stripe.com/v1/checkout/sessions \
-u $STRIPE_SECRET_KEY: \
-d "mode=subscription" \
-d "success_url=https://wpuiai.com/welcome?session_id={CHECKOUT_SESSION_ID}" \
-d "cancel_url=https://wpuiai.com/pricing" \
-d "line_items[0][price]=price_monthly_xxxxx" \
-d "line_items[0][quantity]=1"

6.6 Pricing Page Pattern

Terminal window
# Create pricing page with Block Assembler
wp block-assembler assemble \
--title="Pricing" \
--archetype=listing \
--patterns=page-header,pricing-table,faq,cta \
--content='{
"page_header": {
"headline": "Simple, Transparent Pricing",
"subheadline": "Choose the plan that works for you"
},
"pricing_table": {
"plans": [
{
"name": "Starter",
"price": "$0",
"period": "forever",
"features": ["1 site", "Basic patterns", "Community support"],
"cta_text": "Get Started Free",
"cta_url": "/download"
},
{
"name": "Pro",
"price": "$99",
"period": "one-time",
"features": ["Unlimited sites", "All patterns", "Priority support", "Mimic Mode"],
"cta_text": "Buy Now",
"cta_url": "/checkout/pro",
"highlighted": true
},
{
"name": "Agency",
"price": "$19",
"period": "/month",
"features": ["Unlimited sites", "White-label", "API access", "Dedicated support"],
"cta_text": "Start Trial",
"cta_url": "/checkout/agency"
}
]
}
}'

6.7 Webhook Handler

/wp-content/plugins/wpuiai/includes/class-stripe-webhooks.php
class WPUIAI_Stripe_Webhooks {
public function handle_webhook() {
$payload = file_get_contents('php://input');
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
try {
$event = \Stripe\Webhook::constructEvent(
$payload, $sig_header, STRIPE_WEBHOOK_SECRET
);
} catch(\Exception $e) {
http_response_code(400);
exit();
}
switch ($event->type) {
case 'checkout.session.completed':
$this->handle_checkout_completed($event->data->object);
break;
case 'customer.subscription.created':
$this->handle_subscription_created($event->data->object);
break;
case 'customer.subscription.deleted':
$this->handle_subscription_cancelled($event->data->object);
break;
case 'invoice.payment_failed':
$this->handle_payment_failed($event->data->object);
break;
}
http_response_code(200);
}
private function handle_checkout_completed($session) {
// 1. Create license key
$license_key = $this->generate_license($session);
// 2. Add to Sendy list
$this->add_to_customer_list($session->customer_email);
// 3. Send welcome email with license
$this->send_license_email($session->customer_email, $license_key);
// 4. Log purchase
$this->log_purchase($session);
}
}

6.8 Stripe CLI Commands (Automation)

Terminal window
# List products
stripe products list --limit=10
# Create product via CLI
stripe products create \
--name="WP UI AI Pro" \
--description="AI-powered WordPress page builder"
# Create price
stripe prices create \
--product=prod_xxxxx \
--unit-amount=9900 \
--currency=usd
# Trigger test webhook
stripe trigger checkout.session.completed
# Listen for webhooks locally (development)
stripe listen --forward-to localhost/wp-json/wpuiai/v1/webhook
# View recent events
stripe events list --limit=10

6.9 WooCommerce Alternative

For WordPress-native commerce, integrate with WooCommerce:

Terminal window
# Install WooCommerce + Stripe gateway
su - $USERNAME -c "cd ~/public_html && \
wp plugin install woocommerce --activate && \
wp plugin install woocommerce-gateway-stripe --activate"
# Configure Stripe gateway
su - $USERNAME -c "cd ~/public_html && \
wp option update woocommerce_stripe_settings '{
\"enabled\": \"yes\",
\"testmode\": \"no\",
\"secret_key\": \"sk_live_xxxxx\",
\"publishable_key\": \"pk_live_xxxxx\"
}' --format=json"

Phase 7: Product Fulfillment & License Management

7.1 Fulfillment Pipeline

┌─────────────────────────────────────────────────────────────────┐
│ FULFILLMENT PIPELINE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ PURCHASE LICENSE DELIVERY ACTIVATION │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Stripe │ → │ Generate │ → │ Email │ → │ Validate │ │
│ │ Webhook │ │ License │ │ Delivery │ │ Plugin │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ payment.success license_key SendyKit site_domain │
│ customer_email site_limit template update_check │
│ product_id expiry_date download_url feature_flags │
│ │
└─────────────────────────────────────────────────────────────────┘

7.2 License Key Generation

// License format: WPUIAI-XXXX-XXXX-XXXX-XXXX
class WPUIAI_License_Manager {
public function generate_license($purchase_data) {
$prefix = 'WPUIAI';
$segments = [];
for ($i = 0; $i < 4; $i++) {
$segments[] = strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 4));
}
$license_key = $prefix . '-' . implode('-', $segments);
// Store in database
global $wpdb;
$wpdb->insert(
$wpdb->prefix . 'wpuiai_licenses',
[
'license_key' => $license_key,
'customer_email' => $purchase_data['email'],
'product_id' => $purchase_data['product'],
'site_limit' => $this->get_site_limit($purchase_data['product']),
'created_at' => current_time('mysql'),
'expires_at' => $this->calculate_expiry($purchase_data),
'status' => 'active'
]
);
return $license_key;
}
public function validate_license($license_key, $site_url) {
global $wpdb;
$license = $wpdb->get_row($wpdb->prepare(
"SELECT * FROM {$wpdb->prefix}wpuiai_licenses WHERE license_key = %s",
$license_key
));
if (!$license) {
return ['valid' => false, 'error' => 'License not found'];
}
if ($license->status !== 'active') {
return ['valid' => false, 'error' => 'License inactive'];
}
if (strtotime($license->expires_at) < time()) {
return ['valid' => false, 'error' => 'License expired'];
}
// Check site limit
$activated_sites = $this->get_activated_sites($license_key);
if (count($activated_sites) >= $license->site_limit &&
!in_array($site_url, $activated_sites)) {
return ['valid' => false, 'error' => 'Site limit reached'];
}
// Activate site
$this->activate_site($license_key, $site_url);
return [
'valid' => true,
'features' => $this->get_license_features($license->product_id),
'expires' => $license->expires_at
];
}
}

7.3 License Database Schema

CREATE TABLE wp_wpuiai_licenses (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
license_key VARCHAR(50) UNIQUE NOT NULL,
customer_email VARCHAR(255) NOT NULL,
customer_name VARCHAR(255),
product_id VARCHAR(100) NOT NULL,
stripe_customer_id VARCHAR(50),
stripe_subscription_id VARCHAR(50),
site_limit INT DEFAULT 1,
status ENUM('active', 'expired', 'revoked', 'suspended') DEFAULT 'active',
created_at DATETIME NOT NULL,
expires_at DATETIME,
updated_at DATETIME,
INDEX idx_email (customer_email),
INDEX idx_status (status)
);
CREATE TABLE wp_wpuiai_license_activations (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
license_id BIGINT UNSIGNED NOT NULL,
site_url VARCHAR(255) NOT NULL,
site_name VARCHAR(255),
activated_at DATETIME NOT NULL,
last_check DATETIME,
deactivated_at DATETIME,
status ENUM('active', 'deactivated') DEFAULT 'active',
FOREIGN KEY (license_id) REFERENCES wp_wpuiai_licenses(id),
UNIQUE KEY unique_license_site (license_id, site_url)
);

7.4 License API Endpoints

// REST API for license validation (called from plugin instances)
add_action('rest_api_init', function() {
// Validate license
register_rest_route('wpuiai/v1', '/license/validate', [
'methods' => 'POST',
'callback' => 'wpuiai_validate_license',
'permission_callback' => '__return_true',
'args' => [
'license_key' => ['required' => true],
'site_url' => ['required' => true],
'site_name' => ['required' => false]
]
]);
// Deactivate site
register_rest_route('wpuiai/v1', '/license/deactivate', [
'methods' => 'POST',
'callback' => 'wpuiai_deactivate_license',
'permission_callback' => '__return_true',
'args' => [
'license_key' => ['required' => true],
'site_url' => ['required' => true]
]
]);
// Check for updates
register_rest_route('wpuiai/v1', '/update/check', [
'methods' => 'POST',
'callback' => 'wpuiai_check_update',
'permission_callback' => '__return_true',
'args' => [
'license_key' => ['required' => true],
'current_version' => ['required' => true]
]
]);
});

7.5 Email Delivery Templates (Sendy)

Terminal window
# Purchase confirmation email
curl -X POST "https://mail.thedream.rocks/api/campaigns/create.php" \
-d "api_key=BsZRrJFU3uDLhzRrEcXA" \
-d "from_name=WP UI AI" \
-d "from_email=hello@wpuiai.com" \
-d "subject=Your WP UI AI License" \
-d "html_text=<h1>Thank you for your purchase!</h1>
<p>Your license key: <strong>{{license_key}}</strong></p>
<p><a href='https://wpuiai.com/docs/getting-started'>Getting Started Guide</a></p>
<p><a href='{{download_url}}'>Download WP UI AI</a></p>" \
-d "list_ids=${CUSTOMER_LIST_ID}"
# Templates to create:
# - purchase_confirmation.html
# - license_expiring.html (7 days before)
# - license_expired.html
# - subscription_renewed.html
# - subscription_cancelled.html
# - payment_failed.html

7.6 Product Tiers

TierPriceSitesFeatures
Free$01Basic patterns, community support
Pro$99 (one-time)UnlimitedAll patterns, Mimic Mode, priority support
Agency$19/moUnlimitedWhite-label, API access, dedicated support
EnterpriseCustomUnlimitedCustom development, SLA, training

7.7 CLI Commands for License Management

Terminal window
# List all licenses
wp wpuiai license list
# Check specific license
wp wpuiai license check WPUIAI-XXXX-XXXX-XXXX-XXXX
# Revoke license
wp wpuiai license revoke WPUIAI-XXXX-XXXX-XXXX-XXXX --reason="Refund requested"
# Extend license
wp wpuiai license extend WPUIAI-XXXX-XXXX-XXXX-XXXX --days=30
# Generate manual license
wp wpuiai license create --email=customer@example.com --product=pro --sites=5
# Export licenses
wp wpuiai license export --format=csv > licenses.csv

Unified Launch Script v2.0

/root/scripts/launch-product-site.sh
#!/bin/bash
# Complete site launch with commerce capability
DOMAIN="$1"
GDRIVE_FOLDER="$2"
PRODUCT_TYPE="${3:-landing}" # landing, ecommerce, saas
BRAND_ID="${4:-1}"
VPS_IP="199.167.200.52"
USERNAME=$(echo "$DOMAIN" | tr -dc 'a-z0-9' | head -c8)
echo "=== LAUNCHING: $DOMAIN (${PRODUCT_TYPE}) ==="
# Phase 1: DNS
cf dns create --zone "$DOMAIN" --type A --name @ --content "$VPS_IP" --proxy=true
cf dns create --zone "$DOMAIN" --type A --name www --content "$VPS_IP" --proxy=true
# Phase 2: cPanel Account
whmapi1 createacct domain="$DOMAIN" username="$USERNAME" plan=Edge
# Phase 3: WordPress + Block Assembler
ADMIN_PASS=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9' | head -c20)
su - $USERNAME -c "cd ~/public_html && wp core download && wp core install \
--url=https://$DOMAIN --title='$DOMAIN' \
--admin_user=Philoveracity_Design --admin_password='$ADMIN_PASS'"
# Install Block Assembler
su - $USERNAME -c "cd ~/public_html && wp plugin install block-assembler --activate"
# Phase 4: Content Build
if [ -n "$GDRIVE_FOLDER" ]; then
su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-gdrive=$GDRIVE_FOLDER"
fi
# Phase 5: MainWP Connection
su - $USERNAME -c "cd ~/public_html && wp plugin install mainwp-child --activate"
UNIQUE_ID=$(openssl rand -hex 12)
# [MainWP connection commands...]
# Phase 6: AutoSSL
whmapiwrapper autossl "$USERNAME"
# Phase 7: Commerce Setup (if ecommerce or saas)
if [[ "$PRODUCT_TYPE" == "ecommerce" || "$PRODUCT_TYPE" == "saas" ]]; then
su - $USERNAME -c "cd ~/public_html && wp plugin install woocommerce --activate"
su - $USERNAME -c "cd ~/public_html && wp plugin install woocommerce-gateway-stripe --activate"
echo "Commerce plugins installed - configure Stripe keys in admin"
fi
# Phase 8: Sendy List
curl -X POST "https://mail.thedream.rocks/api/lists/create-list.php" \
-d "api_key=BsZRrJFU3uDLhzRrEcXA" \
-d "brand_id=$BRAND_ID" \
-d "list_name=$DOMAIN Newsletter"
echo "=== COMPLETE: https://$DOMAIN ==="
echo "Admin Password: $ADMIN_PASS"
echo "Product Type: $PRODUCT_TYPE"

Tweakable Parameters

ParameterDefaultOptions
VPS_IP199.167.200.52Any VPS IP
PACKAGEEdgeEdge, PVD_Parked, Dev
BRAND_ID11-4 (Sendy brands)
PHP_VERSIONea-php80ea-php74, ea-php80, ea-php81
ARCHETYPEhomehome, listing, detail, about
PRODUCT_TYPElandinglanding, ecommerce, saas
STRIPE_MODEtesttest, live

Workflow Extension Points

DOMAIN_ACQUIRED → Registrar API integration
DNS_CONFIGURED → DKIM, DMARC records
ACCOUNT_CREATED → Custom .htaccess, configs
WP_INSTALLED → Theme, custom plugins
INTAKE_COMPLETED → MD Map generation
BLOCK_ASSEMBLER → Custom patterns, archetypes
MAINWP_CONNECTED → Bulk plugin installs
STRIPE_CONFIGURED → Products, prices created
CHECKOUT_COMPLETED → License generation, email delivery
SENDY_LIST_CREATED → Welcome campaign, segments
LAUNCH_COMPLETE → Notifications, monitoring

API Quick Reference

Cloudflare

Terminal window
cf zone list # List zones
cf dns create --zone ... --type A --name @ --content IP

cPanel

Terminal window
whmapiwrapper list # List accounts
whmapiwrapper create domain.com # Create account
whmapiwrapper autossl user # Run AutoSSL

MainWP

Terminal window
mwp sites # List sites
mwp sync --all # Sync all
mwp plugin --upgrade-all # Update plugins

Block Assembler / WP UI AI

Terminal window
wp block-assembler intake-create --business="Name" --email="email@example.com"
wp block-assembler intake-run <id> --headless --answers='{}' --complete
wp block-assembler autopilot --from-intake=<id>
wp block-assembler autopilot --from-wizard
wp block-assembler assemble --archetype=home
wp block-assembler critique https://...
wp block-assembler workflow status

Sendy

Terminal window
curl -X POST https://mail.thedream.rocks/subscribe \
-d "api_key=KEY" -d "list=LIST_ID" -d "email=EMAIL"

Stripe

Terminal window
stripe products list
stripe prices create --product=prod_xxx --unit-amount=9900 --currency=usd
stripe checkout sessions create
stripe listen --forward-to localhost/webhook

File Locations

ComponentPath
Block Assembler (current)/home/matco/public_html/wp-content/plugins/block-assembler/
MainWP Dashboard/home/nucleus/field.wpnucle.us/
Sendy/home/thedream/mail.thedream.rocks/
SendyKit Specs/home/thedream/sendykit-docs/
wpuiai.com (future)/home/wpuiai/public_html/

This document is a living specification. Updates tracked via git. Version 2.0.0 - Added Intake Q&A, Rebranding, Commerce, and Fulfillment phases


Product Launch Archetypes

Overview

Predefined site templates for rapid deployment. Each archetype includes required pages, patterns, integrations, and intake question priorities. This forms the foundation of an App Factory approach - standardized blueprints that can be instantiated with minimal configuration.

┌─────────────────────────────────────────────────────────────────────────────┐
│ APP FACTORY ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ARCHETYPE INTAKE BUILD DEPLOY │
│ SELECTION FILTER PIPELINE PIPELINE │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Choose │ → │ Reduce │ → │ Generate │ → │ Launch │ │
│ │ Type │ │ Questions│ │ Site │ │ + Ship │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ saas_landing 7-12 questions MD Map → DNS → │
│ digital_product vs full 25 Patterns → cPanel → │
│ service_business Pages → SSL → │
│ ecommerce_store Theme MainWP → │
│ membership_site Sendy │
│ portfolio_agency │
│ event_launch │
│ docs_site │
│ newsletter_media │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

Archetype Reference

1. SaaS Landing Page (saas_landing)

Purpose: Single product promotion with signup/trial conversion

AttributeValue
PagesHome, Features, Pricing, FAQ, Contact, Login
Hero StyleProduct screenshot + headline + CTA
Primary CTAStart Free Trial / Get Started
CommerceStripe Checkout (subscription)
EmailTrial welcome sequence, upgrade nudges

Required Patterns:

home: hero-product, features-grid, social-proof, pricing-table, faq-accordion, cta
features: page-header, feature-detail (x3-6), comparison-table, cta
pricing: page-header, pricing-table, faq-accordion, cta

Key Intake Questions:

- product_name (text)
- product_tagline (text)
- product_screenshot (file)
- pricing_tiers (structured: name, price, features[])
- trial_length (select: 7, 14, 30 days)
- primary_benefit (text)
- target_user (text)

Integrations:

  • Stripe: Subscription mode, trial periods
  • Sendy: Trial started, trial ending, converted, churned sequences
  • Analytics: Conversion funnel tracking

2. Digital Product (digital_product)

Purpose: Sell downloadable products (ebooks, courses, templates, plugins)

AttributeValue
PagesHome/Sales, About Author, FAQ, Checkout, Thank You, Download
Hero StyleProduct mockup + benefits + Buy Now
Primary CTABuy Now / Get Instant Access
CommerceStripe Checkout (one-time), License delivery
EmailPurchase confirmation, download link, upsell sequence

Required Patterns:

home: hero-product, benefits-list, testimonials, author-bio, pricing-single, guarantee, faq-accordion, cta
about: hero-about, story, credentials, cta
thank-you: confirmation-message, download-button, next-steps

Key Intake Questions:

- product_name (text)
- product_type (select: ebook, course, template, plugin, other)
- product_price (number)
- product_file (file) or delivery_method (select: download, email, license)
- author_name (text)
- author_bio (textarea)
- key_benefits (textarea, 3-5 bullets)
- guarantee (select: 30-day, 60-day, lifetime, none)

Integrations:

  • Stripe: One-time payment
  • License Manager: Key generation + delivery (for plugins)
  • Sendy: Purchase confirmation, onboarding sequence

3. Service Business (service_business)

Purpose: Professional services, consulting, agencies

AttributeValue
PagesHome, Services, About, Case Studies, Contact, Blog
Hero StyleValue prop + credibility + Contact CTA
Primary CTAGet a Quote / Schedule Call / Contact Us
CommerceOptional (invoicing typically external)
EmailLead magnet, nurture sequence, newsletter

Required Patterns:

home: hero-service, services-preview, stats, testimonials, clients-logos, cta
services: page-header, services-grid, process-steps, cta
about: hero-about, story, team-grid, values, cta
case-studies: page-header, case-study-cards
contact: page-header, contact-form, map, office-hours

Key Intake Questions:

- business_name (text)
- services_offered (chips, multi-select)
- target_clients (text)
- unique_approach (textarea)
- years_experience (number)
- team_size (select: solo, 2-5, 6-20, 20+)
- case_studies (structured: title, client, result)
- scheduling_tool (select: calendly, acuity, none)

Integrations:

  • Calendly/Acuity: Embedded booking
  • Sendy: Lead magnet delivery, newsletter
  • CRM: Lead capture to HubSpot (optional)

4. E-commerce Store (ecommerce_store)

Purpose: Physical or digital product catalog with cart

AttributeValue
PagesHome, Shop, Product (template), Cart, Checkout, About, Contact
Hero StyleFeatured products / Collection banner
Primary CTAShop Now / Add to Cart
CommerceWooCommerce + Stripe
EmailOrder confirmation, shipping, abandoned cart, review request

Required Patterns:

home: hero-shop, featured-products, categories-grid, testimonials, cta
shop: product-grid, filters-sidebar, pagination
product: product-gallery, product-info, add-to-cart, related-products
about: hero-about, story, values, cta

Key Intake Questions:

- store_name (text)
- product_types (chips: physical, digital, both)
- product_count (select: 1-10, 11-50, 51-200, 200+)
- shipping_zones (chips: domestic, international, local-only)
- payment_methods (chips: card, paypal, apple-pay)
- return_policy (textarea)
- product_csv (file) - optional bulk import

Integrations:

  • WooCommerce: Full cart/checkout
  • Stripe: Payment gateway
  • ShipStation/Shippo: Shipping labels (optional)
  • Sendy: Order sequences, abandoned cart recovery

5. Membership Site (membership_site)

Purpose: Gated content with recurring subscription

AttributeValue
PagesHome, Features, Pricing, Login, Member Dashboard, Content Library
Hero StyleCommunity/content preview + Join CTA
Primary CTAJoin Now / Become a Member
CommerceStripe (subscription) + MemberPress/Restrict Content
EmailWelcome sequence, content digest, renewal reminders

Required Patterns:

home: hero-membership, benefits-grid, content-preview, testimonials, pricing-table, faq, cta
features: page-header, feature-cards, comparison-table
member-dashboard: welcome-banner, content-grid, progress-tracker

Key Intake Questions:

- community_name (text)
- membership_tiers (structured: name, price, access_level)
- content_types (chips: articles, videos, courses, downloads, live-calls)
- posting_frequency (select: daily, weekly, monthly)
- community_platform (select: circle, discord, slack, none)
- founding_member_offer (text, optional)

Integrations:

  • MemberPress or Restrict Content Pro: Access control
  • Stripe: Subscription billing
  • Sendy: Member onboarding, content digest
  • Community: Circle/Discord integration

6. Portfolio / Agency (portfolio_agency)

Purpose: Showcase creative work, attract clients

AttributeValue
PagesHome, Work/Portfolio, About, Services, Contact
Hero StyleSignature project visual + tagline
Primary CTAView Work / Let’s Talk
CommerceNone (lead generation)
EmailContact follow-up, newsletter

Required Patterns:

home: hero-creative, work-showcase (3-6 featured), clients-logos, services-brief, cta
work: portfolio-grid, case-study-template
about: hero-about, story, awards, team-grid
services: page-header, services-detail, process
contact: contact-form, availability-note

Key Intake Questions:

- creative_name (text) - person or agency
- creative_type (chips: design, development, photography, video, writing, multi)
- portfolio_pieces (structured: title, image, description, link)
- notable_clients (text)
- awards (textarea, optional)
- availability (select: available, limited, booked)

Integrations:

  • Sendy: Newsletter for creative updates
  • Calendly: Discovery call booking
  • Dribbble/Behance: Portfolio sync (optional)

7. Event / Launch (event_launch)

Purpose: Time-sensitive product launch, webinar, or event registration

AttributeValue
PagesLanding (single page), Thank You, Replay (post-event)
Hero StyleCountdown timer + event details + Register CTA
Primary CTARegister Now / Save My Spot / Join Waitlist
CommerceOptional (free or paid event)
EmailRegistration confirmation, reminders, replay access

Required Patterns:

landing: hero-countdown, event-details, speaker-bio, agenda, testimonials, register-form, faq
thank-you: confirmation, calendar-add, share-buttons
replay: video-embed, offer-section, cta

Key Intake Questions:

- event_name (text)
- event_type (select: webinar, workshop, launch, summit, other)
- event_date (datetime)
- event_duration (select: 30min, 1hr, 2hr, multi-day)
- is_paid (boolean)
- ticket_price (number, if paid)
- speaker_name (text)
- speaker_bio (textarea)
- webinar_platform (select: zoom, youtube, custom)

Integrations:

  • Zoom/YouTube: Webinar hosting
  • Stripe: Paid registrations
  • Sendy: Reminder sequence (24hr, 1hr, starting now, replay)
  • Calendar: .ics file generation

8. Documentation Site (docs_site)

Purpose: API docs, knowledge base, help center

AttributeValue
PagesHome, Docs (hierarchical), API Reference, Changelog, Support
Hero StyleSearch bar + quick links
Primary CTASearch / Get Started
CommerceNone
EmailChangelog notifications (optional)

Required Patterns:

home: hero-search, quick-links, popular-articles, getting-started
docs: sidebar-nav, article-content, prev-next-nav, feedback-widget
api: endpoint-list, code-examples, try-it-console
changelog: version-timeline, release-notes

Key Intake Questions:

- product_name (text)
- docs_structure (structured: category, subcategories[])
- code_languages (chips: curl, javascript, python, php, ruby, go)
- api_base_url (text)
- openapi_spec (file, optional)
- support_channel (select: email, chat, forum, github)

Integrations:

  • GitHub: Docs sync from repo
  • Algolia: Search indexing
  • Sendy: Changelog newsletter

9. Newsletter / Media (newsletter_media)

Purpose: Content publication, subscriber growth, sponsorships

AttributeValue
PagesHome, Archive, About, Subscribe, Sponsor
Hero StyleLatest issue preview + Subscribe CTA
Primary CTASubscribe Free / Read Latest
CommerceOptional (paid newsletter via Stripe)
EmailWelcome, regular issues, re-engagement

Required Patterns:

home: hero-newsletter, latest-issue, popular-posts, subscribe-form, testimonials
archive: issue-grid, category-filter, search
about: author-bio, mission, subscribe-cta
sponsor: audience-stats, ad-formats, pricing, contact-form

Key Intake Questions:

- newsletter_name (text)
- newsletter_tagline (text)
- publishing_frequency (select: daily, weekly, biweekly, monthly)
- topics (chips)
- is_paid (boolean)
- subscription_price (number, if paid)
- current_subscribers (number)
- open_rate (percentage)

Integrations:

  • Sendy: Primary delivery + subscriber management
  • Stripe: Paid subscriptions
  • Sponsorship: Ad slot management

Quick Launch Matrix

ArchetypePagesPatternsIntake QsCommerceComplexity
saas_landing6128Stripe SubMedium
digital_product6109Stripe One-timeLow
service_business61410NoneMedium
ecommerce_store7118WooCommerceHigh
membership_site6107Stripe + PluginHigh
portfolio_agency5127NoneLow
event_launch3810OptionalLow
docs_site597NoneMedium
newsletter_media599OptionalLow

Archetype CLI Commands

Terminal window
# List available archetypes
wp block-assembler archetypes --type=launch
# Get archetype details
wp block-assembler archetype-info saas_landing
# Create intake from archetype (reduced questions)
wp block-assembler intake-create --archetype=saas_landing --business="Acme SaaS" --email="founder@acme.com"
# Build site from archetype + answers
wp block-assembler autopilot --archetype=digital_product --intake-id=15
# Preview archetype structure
wp block-assembler archetype-preview saas_landing --format=json

Archetype JSON Schema

{
"id": "saas_landing",
"name": "SaaS Landing Page",
"description": "Single product promotion with signup/trial conversion",
"version": "1.0.0",
"pages": [
{
"slug": "home",
"title": "Home",
"archetype": "home",
"patterns": ["hero-product", "features-grid", "social-proof", "pricing-table", "faq-accordion", "cta"],
"is_front_page": true
},
{
"slug": "features",
"title": "Features",
"archetype": "listing",
"patterns": ["page-header", "feature-detail", "comparison-table", "cta"]
}
],
"intake_questions": [
{"id": "product_name", "required": true},
{"id": "product_tagline", "required": true},
{"id": "pricing_tiers", "required": true}
],
"integrations": {
"stripe": {"mode": "subscription", "trial": true},
"sendy": {"sequences": ["trial_welcome", "trial_ending", "converted"]}
},
"theme": {
"style": "modern",
"colors": "extract_from_logo"
}
}

Future Platform Expansion

The App Factory architecture is designed to extend beyond WordPress:

PlatformStatusUse Cases
WordPressActiveFull site builds, WooCommerce, membership
Next.jsPlannedHigh-performance SaaS, docs sites
AstroPlannedStatic sites, blogs, portfolios
FramerPlannedDesign-heavy landing pages
WebflowPlannedNo-code agency sites
ShopifyPlannedE-commerce focused
Mobile (React Native)FutureCompanion apps

Architecture for Multi-Platform:

┌─────────────────┐
│ ARCHETYPE │ (platform-agnostic definition)
│ DEFINITION │
└────────┬────────┘
┌─────────────────┐
│ PLATFORM │ (WordPress, Next.js, Astro, etc.)
│ ADAPTER │
└────────┬────────┘
┌─────────────────┐
│ BUILD │ (patterns → components → pages)
│ PIPELINE │
└────────┬────────┘
┌─────────────────┐
│ DEPLOY │ (cPanel, Vercel, Netlify, etc.)
│ PIPELINE │
└─────────────────┘