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
| System | Plane | API/Tool | Resources |
|---|---|---|---|
| Cloudflare | Edge | flarectl, wrangler, Tunnels | 49 zones |
| cPanel/WHM | Marketing | whmapi1, whmapiwrapper | 47 accounts |
| LiteSpeed | Marketing | .htaccess, cache | Web server |
| WordPress | Marketing | WP-CLI, Block Assembler | CMS |
| MainWP | Marketing | mwp CLI | 40+ sites |
| pvdifyd | App Factory | REST API (:9443) | PaaS orchestrator |
| Podman | App Factory | rootless containers | Runtime |
| Sendy | External | REST API, SendyKit | 4 brands |
| Stripe | External | REST API | Payments |
| Beads | Orchestration | bd CLI | Task tracking |
| PostHog | Analytics | REST API, data.philoveracity.com | Multi-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)
| Constraint | Implication |
|---|---|
| Single Virtuozzo VPS | All planes share one host |
| WHM/cPanel permanent | Never replaced, always authoritative for marketing |
| Podman (rootless) | Container runtime, no Docker daemon |
| No swap memory | Hard memory limits, strict resource discipline |
| Cloudflare controls DNS/TLS | No origin TLS management |
| External CI only | No builds on VPS, image-based deploys |
Plane Definitions
1. Edge Plane — Cloudflare (Authoritative Ingress)
Role: Single point of entry for all traffic
| Responsibility | Implementation |
|---|---|
| DNS | All domains managed via cf CLI |
| TLS termination | Full (strict) mode |
| WAF / Rate limiting | Cloudflare rules |
| App ingress | Cloudflare Tunnel to pvdifyd |
| Traffic steering | Routes 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
| Attribute | Value |
|---|---|
| Web Server | LiteSpeed |
| Runtime | PHP 8.0+ / EA4 |
| CMS | WordPress + Block Assembler (WP UI AI) |
| Ports | 80, 443 (via Cloudflare) |
| Account Model | cPanel sub-account per product/brand |
Domain Patterns:
product.com— Main marketing sitewww.product.com— WWW redirectlaunch.product.com— Pre-launch / waitlistdocs.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
| Attribute | Value |
|---|---|
| Orchestrator | pvdifyd (Go daemon, REST API on :9443) |
| Runtime | Podman (rootless containers) |
| Ports | 3000–3999 (internal only) |
| Deploy Model | Pre-built OCI images via REST API |
| Resource Model | Hard memory/CPU limits per container |
Domain Patterns:
api.product.com— Product APIapp.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-apiimage: ghcr.io/pvdify/billing-api:2.0.1port: 3002domain: api.product.commemory: 512MBcpu: 0.5health: /healthenv: DATABASE_URL: ${DATABASE_URL} STRIPE_SECRET: ${STRIPE_SECRET}workers: - name: invoice-worker command: node workers/invoice.js memory: 256MB4. Orchestration Plane — Claude Code + Beads
Role: Infrastructure automation, source of truth
| Responsibility | Implementation |
|---|---|
| App provisioning | bd create, pvdifyd API calls |
| Deploy automation | REST API → pvdifyd → Podman |
| Cloudflare control | cf CLI for DNS, tunnels |
| Secrets management | pvdifyd config + SOPS encryption |
| Task memory | Beads audit trail |
Authority Model:
- Claude + Beads decides → issues commands
- pvdifyd executes → runs containers via Podman + systemd
- Cloudflare routes → manages edge
- WHM hosts → serves marketing
# Orchestration commandsbd create "Deploy billing-api v2.0.1" -p 0curl -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.combd 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:
# From orchestration planecurl -X POST https://pvdify.win/api/v1/apps/billing-api/releases \ -d '{"image":"ghcr.io/pvdify/billing-api:2.0.1"}'
# Health checkcurl -f http://localhost:3002/health || curl -X POST https://pvdify.win/api/v1/apps/billing-api/rollback
# Rollback on failurecurl -X POST https://pvdify.win/api/v1/apps/billing-api/rollbackResource Discipline (No-Swap Reality)
Hard memory limits prevent OOM cascade failures.
| Workload Type | Memory Cap | CPU Cap |
|---|---|---|
| Web app (API) | 256–512MB | 0.5–1.0 |
| Worker | 128–256MB | 0.25–0.5 |
| Redis | 64–128MB | 0.25 |
| PostgreSQL | 512MB–1GB | 1.0 |
| WHM baseline | ~2GB reserved | — |
Guarantee: WHM and pvdifyd resource usage never overlap at runtime.
Security Model
| Layer | Control |
|---|---|
| SSH | Key-only access |
| Users | Separate service accounts |
| Admin | Cloudflare Access protection |
| Ports | No public Podman ports |
| Secrets | Runtime injection via pvdifyd config + SOPS encryption |
| Planes | Strict separation, no cross-contamination |
Failure Isolation Guarantees
| Failure | Impact |
|---|---|
| Marketing site down | Apps unaffected |
| App OOM | WHM unaffected |
| Single app crash | Other apps unaffected |
| Rollback needed | Fast, deterministic |
Integration: Launch Archetypes + App Factory
Product Launch Archetypes span both planes:
| Archetype | Marketing Plane (WHM) | App Factory Plane (pvdifyd) |
|---|---|---|
saas_landing | Landing page, pricing, docs | API backend, dashboard app |
digital_product | Sales page, checkout | License API, download service |
service_business | Marketing site | Booking API (optional) |
ecommerce_store | Product catalog (WooCommerce) | Inventory API, fulfillment workers |
membership_site | Public pages | Auth API, content API, billing |
portfolio_agency | Full site | None (static) |
event_launch | Landing, registration | Webinar backend (optional) |
docs_site | Documentation | API reference (optional) |
newsletter_media | Archive, subscribe | Delivery workers (Sendy) |
Example: SaaS Product Launch
product: acme-saasbrand: 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
# === pvdifyd API App Management ===
# Create new app slotcurl -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 variablescurl -X PUT https://pvdify.win/api/v1/apps/billing-api/config \ -d '{"vars":{"DATABASE_URL":"postgres://...","STRIPE_SECRET":"sk_..."}}'
# Scale processescurl -X POST https://pvdify.win/api/v1/apps/billing-api/ps/scale \ -d '{"web":2,"worker":1}'
# Set domaincurl -X POST https://pvdify.win/api/v1/apps/billing-api/domains \ -d '{"name":"api.product.com"}'
# Check statuscurl https://pvdify.win/api/v1/apps/billing-api
# View logs (SSE stream)curl https://pvdify.win/api/v1/apps/billing-api/logs?follow=true
# Rollbackcurl -X POST https://pvdify.win/api/v1/apps/billing-api/rollback
# Destroy appcurl -X DELETE https://pvdify.win/api/v1/apps/billing-api
# === Cloudflare Tunnel ===
# Create tunnelcloudflared tunnel create pvdify-apps
# Route trafficcloudflared tunnel route dns pvdify-apps api.product.com
# Run tunnel (systemd service)cloudflared tunnel run pvdify-apps
# === Orchestration (Beads) ===
# Track deploymentbd create "Deploy billing-api v2.0.1" -p 0 -t deploybd update <id> --status in_progress# ... deploy commands ...bd close <id> --reason "Deployed, health check passed"What This Architecture Enables
- Rapid product launches — Marketing first, apps later
- SEO-optimized launch sites — WordPress + LiteSpeed
- Safe SaaS iteration — Isolated app containers
- Clean WordPress ↔ App integration — API boundaries
- Foundation for:
- App templates (pre-configured pvdifyd app slots)
- Usage-based billing
- Analytics dashboards
- Multi-product scaling
- White-label deployments
Explicit Non-Goals
| Not Doing | Reason |
|---|---|
| Kubernetes | Overkill for single VPS |
| Local CI | VPS resource constraints |
| Host-level Node | Conflicts with cPanel |
| pvdifyd ingress ownership | Cloudflare handles edge via tunnels |
| Replace WHM | Permanent marketing plane |
Phase Integration: MAP Workflow + App Factory
The 7-phase MAP workflow maps to the dual-plane model:
| Phase | Plane | Actions |
|---|---|---|
| 1. DNS | Edge | Cloudflare zone/record creation |
| 2. Hosting | Marketing | cPanel account provisioning |
| 3. Website Build | Marketing | Block Assembler / WP UI AI |
| 4. Fleet Mgmt | Marketing | MainWP connection |
| 5. Email | External | Sendy list/campaign creation |
| 6. Commerce | Marketing + App | Stripe (checkout on WHM, webhooks to App) |
| 7. Fulfillment | App | License API, delivery workers |
Extended for App Factory:
| Phase | Plane | Actions |
|---|---|---|
| 8. App Provisioning | App Factory | pvdifyd app creation via API, resource limits |
| 9. App Deploy | App Factory | Image deploy, health check |
| 10. Tunnel Setup | Edge | Cloudflare Tunnel for app domains |
| 11. Integration | Cross-Plane | WordPress ↔ API connection |
Product Rebranding: Block Assembler → WP UI AI
Brand Transition
| Current | Future |
|---|---|
| Block Assembler | WP 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
# DNS Configuration for wpuiai.comcf dns create --zone wpuiai.com --type A --name @ --content 199.167.200.52 --proxy=truecf dns create --zone wpuiai.com --type A --name www --content 199.167.200.52 --proxy=truecf dns create --zone wpuiai.com --type CNAME --name docs --content wpuiai.com --proxy=truecf 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-assemblertowpuiai - 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:
# Add domain to Cloudflare (if not already there)# Manual step: Add zone via Cloudflare dashboard first
# Verify zone existscf zone list | grep "newdomain.com"
# Configure DNS records for VPS hostingcf dns create --zone newdomain.com --type A --name @ --content 199.167.200.52 --proxy=truecf dns create --zone newdomain.com --type A --name www --content 199.167.200.52 --proxy=truecf dns create --zone newdomain.com --type CNAME --name mail --content mail.newdomain.comcf dns create --zone newdomain.com --type MX --name @ --content mail.newdomain.com --priority=10
# Configure SSL modecf zone settings --zone newdomain.com --setting ssl=full1.3 DNS Automation Script
#!/bin/bashDOMAIN="$1"VPS_IP="${2:-199.167.200.52}"
if [ -z "$DOMAIN" ]; then echo "Usage: setup-domain-dns.sh <domain> [ip]" exit 1fi
echo "=== Configuring DNS for $DOMAIN ==="
# Root A recordcf dns create --zone "$DOMAIN" --type A --name @ --content "$VPS_IP" --proxy=true
# WWW recordcf 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=10cf dns create --zone "$DOMAIN" --type A --name mail --content "$VPS_IP"
# SPF record for emailcf dns create --zone "$DOMAIN" --type TXT --name @ --content "v=spf1 +a +mx +ip4:$VPS_IP ~all"
# SSL modecf zone settings --zone "$DOMAIN" --setting ssl=full
echo "DNS configured for $DOMAIN"Phase 2: Hosting Account Setup (cPanel)
2.1 Create cPanel Account
# Using whmapiwrapperwhmapiwrapper create newdomain.com
# Or direct WHM APIwhmapi1 createacct \ domain=newdomain.com \ username=newdomainuser \ plan=Edge \ contactemail=admin@philoveracity.com2.2 Available Hosting Packages
| Package | Purpose |
|---|---|
| Edge | Standard production sites |
| PVD_Parked | Placeholder/parked domains |
| Dev | Development sites |
2.3 Configure PHP Version
# Set PHP 8.0 for the accountwhmapiwrapper php-set newdomainuser ea-php80
# Verifywhmapiwrapper php | grep newdomainuser2.4 SSL Certificate
# Run AutoSSL for the domainwhmapiwrapper autossl newdomainuser
# Check SSL statuswhmapiwrapper ssl newdomain.comPhase 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)
| Category | Purpose | Example Questions |
|---|---|---|
| Business Basics | Core identity | Business name, tagline, phone, address |
| Goals & Features | Website objectives | What should visitors do? Purchase, contact, subscribe? |
| Pages | Site structure | Which pages needed? Home, About, Services, Shop? |
| Inspiration | Design direction | Reference URLs, style preferences |
| Branding | Visual identity | Logo upload, color preferences, font style |
| Target Audience | User personas | Who are your customers? What problems do you solve? |
| Social & Marketing | External presence | Social 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
# Create intake questionnaire for a clientwp 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 statuswp block-assembler intake-status 15
# Generate MD Map from intake answerswp block-assembler intake-to-mdmap 15 --output=/tmp/site-plan.md3.2.4 Token-Gated Client Intake Form
# Deploy intake form on any WordPress site# Shortcode: [ba_intake_form]
# Generate unique client tokenwp 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 critiqueExample: Inferring Hero Content
# 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
| Archetype | Required Patterns | Common Patterns |
|---|---|---|
| home | hero | features, about-preview, stats, testimonials, cta |
| listing | page-header | services-grid, team-grid, cta |
| detail | hero-detail | content, gallery, testimonials, cta |
| about | hero-about | story, 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 AudienceSmall 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
# From intake questionnaire (after client completes)su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-intake=15"
# From Google Drive contentsu - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-gdrive=FOLDER_ID"
# From wizard configurationsu - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-wizard"
# Manual page assemblysu - $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)
# Run AI design critiquesu - $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
| # | Step | Description |
|---|---|---|
| 1 | capture_reference_screenshots | Screenshot inspiration sites |
| 2 | pull_drive_content | Pull content from Google Drive |
| 3 | import_drive_images | Import images to Media Library |
| 4 | import_logo | Import and set logo |
| 5 | create_md_map | Create planning document |
| 6 | define_page_structure | Define pages and hierarchy |
| 7 | extract_color_palette | Extract colors from logo |
| 8 | assign_archetypes | Assign page archetypes |
| 9 | map_content_to_pages | Map Drive content to pages |
| 10 | assign_patterns | Assign patterns to pages |
| 11 | delete_old_pages | Clean up existing pages |
| 12 | set_homepage | Configure static homepage |
| 13 | build_navigation | Create navigation menu |
| 14 | apply_branding | Apply color palette to theme |
| 15-22 | build_pages | Build each page to 7.0+ score |
| 23 | final_review | Full site review |
Phase 4: MainWP Fleet Integration
4.1 Connect to MainWP Dashboard
PHP_CLI="/opt/cpanel/ea-php80/root/usr/bin/php"MAINWP_PATH="/home/nucleus/field.wpnucle.us"
# Install MainWP Child pluginsu - $USERNAME -c "cd ~/public_html && wp plugin install mainwp-child --activate"
# Generate unique ID and connectUNIQUE_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-rootPhase 5: Email Campaign Setup (Sendy/SendyKit)
5.1 Sendy Brands
| ID | Brand |
|---|---|
| 1 | Philoveracity |
| 2 | James L. Smith Realtor |
| 3 | Startempire Wire |
| 4 | ASAP Digest |
5.2 Create Email List
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
# Add subscription form via Block Assemblerwp 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
# After intake completion, auto-create welcome campaigncurl -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
# 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
# Create product in Stripecurl 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_xxxxx6.4 Pricing Plans
# One-time payment pricecurl 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 pricecurl 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
# Create checkout session for purchasecurl 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 subscriptioncurl 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
# Create pricing page with Block Assemblerwp 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
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)
# List productsstripe products list --limit=10
# Create product via CLIstripe products create \ --name="WP UI AI Pro" \ --description="AI-powered WordPress page builder"
# Create pricestripe prices create \ --product=prod_xxxxx \ --unit-amount=9900 \ --currency=usd
# Trigger test webhookstripe trigger checkout.session.completed
# Listen for webhooks locally (development)stripe listen --forward-to localhost/wp-json/wpuiai/v1/webhook
# View recent eventsstripe events list --limit=106.9 WooCommerce Alternative
For WordPress-native commerce, integrate with WooCommerce:
# Install WooCommerce + Stripe gatewaysu - $USERNAME -c "cd ~/public_html && \ wp plugin install woocommerce --activate && \ wp plugin install woocommerce-gateway-stripe --activate"
# Configure Stripe gatewaysu - $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)
# Purchase confirmation emailcurl -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.html7.6 Product Tiers
| Tier | Price | Sites | Features |
|---|---|---|---|
| Free | $0 | 1 | Basic patterns, community support |
| Pro | $99 (one-time) | Unlimited | All patterns, Mimic Mode, priority support |
| Agency | $19/mo | Unlimited | White-label, API access, dedicated support |
| Enterprise | Custom | Unlimited | Custom development, SLA, training |
7.7 CLI Commands for License Management
# List all licenseswp wpuiai license list
# Check specific licensewp wpuiai license check WPUIAI-XXXX-XXXX-XXXX-XXXX
# Revoke licensewp wpuiai license revoke WPUIAI-XXXX-XXXX-XXXX-XXXX --reason="Refund requested"
# Extend licensewp wpuiai license extend WPUIAI-XXXX-XXXX-XXXX-XXXX --days=30
# Generate manual licensewp wpuiai license create --email=customer@example.com --product=pro --sites=5
# Export licenseswp wpuiai license export --format=csv > licenses.csvUnified Launch Script v2.0
#!/bin/bash# Complete site launch with commerce capability
DOMAIN="$1"GDRIVE_FOLDER="$2"PRODUCT_TYPE="${3:-landing}" # landing, ecommerce, saasBRAND_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: DNScf dns create --zone "$DOMAIN" --type A --name @ --content "$VPS_IP" --proxy=truecf dns create --zone "$DOMAIN" --type A --name www --content "$VPS_IP" --proxy=true
# Phase 2: cPanel Accountwhmapi1 createacct domain="$DOMAIN" username="$USERNAME" plan=Edge
# Phase 3: WordPress + Block AssemblerADMIN_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 Assemblersu - $USERNAME -c "cd ~/public_html && wp plugin install block-assembler --activate"
# Phase 4: Content Buildif [ -n "$GDRIVE_FOLDER" ]; then su - $USERNAME -c "cd ~/public_html && wp block-assembler autopilot --from-gdrive=$GDRIVE_FOLDER"fi
# Phase 5: MainWP Connectionsu - $USERNAME -c "cd ~/public_html && wp plugin install mainwp-child --activate"UNIQUE_ID=$(openssl rand -hex 12)# [MainWP connection commands...]
# Phase 6: AutoSSLwhmapiwrapper 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 Listcurl -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
| Parameter | Default | Options |
|---|---|---|
| VPS_IP | 199.167.200.52 | Any VPS IP |
| PACKAGE | Edge | Edge, PVD_Parked, Dev |
| BRAND_ID | 1 | 1-4 (Sendy brands) |
| PHP_VERSION | ea-php80 | ea-php74, ea-php80, ea-php81 |
| ARCHETYPE | home | home, listing, detail, about |
| PRODUCT_TYPE | landing | landing, ecommerce, saas |
| STRIPE_MODE | test | test, live |
Workflow Extension Points
DOMAIN_ACQUIRED → Registrar API integrationDNS_CONFIGURED → DKIM, DMARC recordsACCOUNT_CREATED → Custom .htaccess, configsWP_INSTALLED → Theme, custom pluginsINTAKE_COMPLETED → MD Map generationBLOCK_ASSEMBLER → Custom patterns, archetypesMAINWP_CONNECTED → Bulk plugin installsSTRIPE_CONFIGURED → Products, prices createdCHECKOUT_COMPLETED → License generation, email deliverySENDY_LIST_CREATED → Welcome campaign, segmentsLAUNCH_COMPLETE → Notifications, monitoringAPI Quick Reference
Cloudflare
cf zone list # List zonescf dns create --zone ... --type A --name @ --content IPcPanel
whmapiwrapper list # List accountswhmapiwrapper create domain.com # Create accountwhmapiwrapper autossl user # Run AutoSSLMainWP
mwp sites # List sitesmwp sync --all # Sync allmwp plugin --upgrade-all # Update pluginsBlock Assembler / WP UI AI
wp block-assembler intake-create --business="Name" --email="email@example.com"wp block-assembler intake-run <id> --headless --answers='{}' --completewp block-assembler autopilot --from-intake=<id>wp block-assembler autopilot --from-wizardwp block-assembler assemble --archetype=homewp block-assembler critique https://...wp block-assembler workflow statusSendy
curl -X POST https://mail.thedream.rocks/subscribe \ -d "api_key=KEY" -d "list=LIST_ID" -d "email=EMAIL"Stripe
stripe products liststripe prices create --product=prod_xxx --unit-amount=9900 --currency=usdstripe checkout sessions createstripe listen --forward-to localhost/webhookFile Locations
| Component | Path |
|---|---|
| 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
| Attribute | Value |
|---|---|
| Pages | Home, Features, Pricing, FAQ, Contact, Login |
| Hero Style | Product screenshot + headline + CTA |
| Primary CTA | Start Free Trial / Get Started |
| Commerce | Stripe Checkout (subscription) |
| Trial welcome sequence, upgrade nudges |
Required Patterns:
home: hero-product, features-grid, social-proof, pricing-table, faq-accordion, ctafeatures: page-header, feature-detail (x3-6), comparison-table, ctapricing: page-header, pricing-table, faq-accordion, ctaKey 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)
| Attribute | Value |
|---|---|
| Pages | Home/Sales, About Author, FAQ, Checkout, Thank You, Download |
| Hero Style | Product mockup + benefits + Buy Now |
| Primary CTA | Buy Now / Get Instant Access |
| Commerce | Stripe Checkout (one-time), License delivery |
| Purchase confirmation, download link, upsell sequence |
Required Patterns:
home: hero-product, benefits-list, testimonials, author-bio, pricing-single, guarantee, faq-accordion, ctaabout: hero-about, story, credentials, ctathank-you: confirmation-message, download-button, next-stepsKey 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
| Attribute | Value |
|---|---|
| Pages | Home, Services, About, Case Studies, Contact, Blog |
| Hero Style | Value prop + credibility + Contact CTA |
| Primary CTA | Get a Quote / Schedule Call / Contact Us |
| Commerce | Optional (invoicing typically external) |
| Lead magnet, nurture sequence, newsletter |
Required Patterns:
home: hero-service, services-preview, stats, testimonials, clients-logos, ctaservices: page-header, services-grid, process-steps, ctaabout: hero-about, story, team-grid, values, ctacase-studies: page-header, case-study-cardscontact: page-header, contact-form, map, office-hoursKey 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
| Attribute | Value |
|---|---|
| Pages | Home, Shop, Product (template), Cart, Checkout, About, Contact |
| Hero Style | Featured products / Collection banner |
| Primary CTA | Shop Now / Add to Cart |
| Commerce | WooCommerce + Stripe |
| Order confirmation, shipping, abandoned cart, review request |
Required Patterns:
home: hero-shop, featured-products, categories-grid, testimonials, ctashop: product-grid, filters-sidebar, paginationproduct: product-gallery, product-info, add-to-cart, related-productsabout: hero-about, story, values, ctaKey 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 importIntegrations:
- 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
| Attribute | Value |
|---|---|
| Pages | Home, Features, Pricing, Login, Member Dashboard, Content Library |
| Hero Style | Community/content preview + Join CTA |
| Primary CTA | Join Now / Become a Member |
| Commerce | Stripe (subscription) + MemberPress/Restrict Content |
| Welcome sequence, content digest, renewal reminders |
Required Patterns:
home: hero-membership, benefits-grid, content-preview, testimonials, pricing-table, faq, ctafeatures: page-header, feature-cards, comparison-tablemember-dashboard: welcome-banner, content-grid, progress-trackerKey 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
| Attribute | Value |
|---|---|
| Pages | Home, Work/Portfolio, About, Services, Contact |
| Hero Style | Signature project visual + tagline |
| Primary CTA | View Work / Let’s Talk |
| Commerce | None (lead generation) |
| Contact follow-up, newsletter |
Required Patterns:
home: hero-creative, work-showcase (3-6 featured), clients-logos, services-brief, ctawork: portfolio-grid, case-study-templateabout: hero-about, story, awards, team-gridservices: page-header, services-detail, processcontact: contact-form, availability-noteKey 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
| Attribute | Value |
|---|---|
| Pages | Landing (single page), Thank You, Replay (post-event) |
| Hero Style | Countdown timer + event details + Register CTA |
| Primary CTA | Register Now / Save My Spot / Join Waitlist |
| Commerce | Optional (free or paid event) |
| Registration confirmation, reminders, replay access |
Required Patterns:
landing: hero-countdown, event-details, speaker-bio, agenda, testimonials, register-form, faqthank-you: confirmation, calendar-add, share-buttonsreplay: video-embed, offer-section, ctaKey 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
| Attribute | Value |
|---|---|
| Pages | Home, Docs (hierarchical), API Reference, Changelog, Support |
| Hero Style | Search bar + quick links |
| Primary CTA | Search / Get Started |
| Commerce | None |
| Changelog notifications (optional) |
Required Patterns:
home: hero-search, quick-links, popular-articles, getting-starteddocs: sidebar-nav, article-content, prev-next-nav, feedback-widgetapi: endpoint-list, code-examples, try-it-consolechangelog: version-timeline, release-notesKey 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
| Attribute | Value |
|---|---|
| Pages | Home, Archive, About, Subscribe, Sponsor |
| Hero Style | Latest issue preview + Subscribe CTA |
| Primary CTA | Subscribe Free / Read Latest |
| Commerce | Optional (paid newsletter via Stripe) |
| Welcome, regular issues, re-engagement |
Required Patterns:
home: hero-newsletter, latest-issue, popular-posts, subscribe-form, testimonialsarchive: issue-grid, category-filter, searchabout: author-bio, mission, subscribe-ctasponsor: audience-stats, ad-formats, pricing, contact-formKey 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
| Archetype | Pages | Patterns | Intake Qs | Commerce | Complexity |
|---|---|---|---|---|---|
saas_landing | 6 | 12 | 8 | Stripe Sub | Medium |
digital_product | 6 | 10 | 9 | Stripe One-time | Low |
service_business | 6 | 14 | 10 | None | Medium |
ecommerce_store | 7 | 11 | 8 | WooCommerce | High |
membership_site | 6 | 10 | 7 | Stripe + Plugin | High |
portfolio_agency | 5 | 12 | 7 | None | Low |
event_launch | 3 | 8 | 10 | Optional | Low |
docs_site | 5 | 9 | 7 | None | Medium |
newsletter_media | 5 | 9 | 9 | Optional | Low |
Archetype CLI Commands
# List available archetypeswp block-assembler archetypes --type=launch
# Get archetype detailswp 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 + answerswp block-assembler autopilot --archetype=digital_product --intake-id=15
# Preview archetype structurewp block-assembler archetype-preview saas_landing --format=jsonArchetype 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:
| Platform | Status | Use Cases |
|---|---|---|
| WordPress | Active | Full site builds, WooCommerce, membership |
| Next.js | Planned | High-performance SaaS, docs sites |
| Astro | Planned | Static sites, blogs, portfolios |
| Framer | Planned | Design-heavy landing pages |
| Webflow | Planned | No-code agency sites |
| Shopify | Planned | E-commerce focused |
| Mobile (React Native) | Future | Companion 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 │└─────────────────┘