Skip to main content

Digital Product & Funnel Template Builder

Status: ✅ Implementation Complete
Version: 1.0.0
Module: FunnelGeneratorModule
Bundle: contentdata.yaml, digital-products-pro.yaml


🎯 Overview

The Digital Product & Funnel Template Builder is an AI-powered content generation system that creates production-ready digital product funnels following the high-conversion patterns of Stack, Ambitious Labs, Plaiground, and other top-performing founder-led brands.

What It Generates

  1. Complete PRD (Product Requirements Document)

    • Problem/pain point analysis
    • Promise/transformation statement
    • Offer structure (modules, bonuses, timeline)
    • Funnel stage definitions
  2. Landing Page (HTML + JSON config)

    • Hero section with headline/CTA
    • Social proof (testimonials, logos)
    • Feature cards with icons
    • Founder story section
    • Comparison/positioning
    • Final CTA section
  3. Ad Campaign Pack

    • TikTok (15s video script)
    • Instagram Reel (30s)
    • LinkedIn (45s)
    • Hashtags, visual direction, hooks
  4. Email Sequence

    • Welcome/hook email
    • Proof/demo email
    • Conversion/urgency email
    • Optional retarget emails
    • Scheduled send delays

🏗️ Architecture

Core Components

1. OpenAPI Schemas (contentdata.yaml)

All content is schema-driven following ValkyrAI's codegen philosophy:

  • ContentData — Master content entity (PRDs, funnels, landing pages)
  • FunnelStage — Funnel stage config (awareness → conversion → upsell)
  • LandingPageSection — Landing page section (hero, features, CTA, etc.)
  • AdVariant — Short-form ad creative (platform, duration, hook, value, CTA)
  • EmailTemplate — Email sequence entry (subject, body, send delay)
  • FunnelTemplate — Reusable funnel templates
  • GeneratedFunnelJob — Async job tracking

2. ExecModule (FunnelGeneratorModule.java)

AI-powered workflow module that:

  • Accepts structured inputs (brand, offer, audience, price, etc.)
  • Constructs AI prompts from Valor IDE system specification
  • Calls LLM (OpenAI GPT-4o by default)
  • Parses JSON response into ContentData schema
  • Outputs structured content to workflow state

Key Features:

  • Temperature: 0.7 (balanced creativity + consistency)
  • Deterministic schema-based prompts
  • Error handling with structured output
  • Integration with LlmAdapterFactory

3. Workflow Template (digital-product-funnel-generator.json)

End-to-end automation:

  1. Generate Content — AI creates PRD + landing pages + ads + emails
  2. Persist ContentData — Save to database
  3. Generate HTML — Convert sections to production landing page
  4. Create ProductLandingPage — Link to Product entity
  5. Setup Email Automation — Create email templates
  6. Generate Report — Markdown summary

Integration Points

┌─────────────────────────────────────────────────────┐
│ Frontend (React + RTK Query) │
│ - Funnel Generator UI │
│ - Template Library │
│ - Content Editor │
└────────────────┬────────────────────────────────────┘


┌─────────────────────────────────────────────────────┐
│ ValkyrAI Workflow Engine │
│ - FunnelGeneratorModule (AI content gen) │
│ - RestApiModule (persist data) │
│ - TemplateMergeModule (HTML generation) │
│ - LooperModule (email sequence) │
└────────────────┬────────────────────────────────────┘


┌─────────────────────────────────────────────────────┐
│ Generated Services (ThorAPI) │
│ - ContentDataService │
│ - ProductLandingPageService │
│ - FunnelTemplateService │
│ - GeneratedFunnelJobService │
└─────────────────────────────────────────────────────┘

🚀 Usage

1. Via Workflow API

POST /api/v1/vaiworkflow/execute

{
"workflowName": "generate_product_funnel",
"initialState": {
"brand": "Valkyr Labs",
"offer": "Reverse SaaS Launch System",
"targetAudience": "founders + CTOs",
"priceTier": "core",
"priceAmount": 499.00,
"deliveryMode": "mentorship",
"heroBenefit": "Ship your first AI workflow in 7 days",
"productId": "uuid-here"
}
}

Response:

{
"workflowId": "uuid",
"status": "running",
"tasks": [
{
"name": "Generate Funnel Content",
"status": "completed",
"output": {
"prd": { ... },
"landingPageSections": [ ... ],
"adVariants": [ ... ],
"emailSequence": [ ... ]
}
}
]
}

2. Via FunnelGeneratorModule (Direct)

@Autowired
private FunnelGeneratorModule funnelGenerator;

// Configure module
ExecModule module = new ExecModule();
module.setModuleName("funnelGeneratorModule");
module.setModuleData(objectMapper.writeValueAsString(Map.of(
"brand", "Valkyr Labs",
"offer", "AI Blueprint",
"targetAudience", "solopreneurs",
"priceTier", "tripwire",
"priceAmount", 49.0,
"deliveryMode", "course",
"heroBenefit", "Build your first AI app in 30 days"
)));

// Execute
funnelGenerator.execute();

// Get results
Map<String, Object> result = funnelGenerator.getGeneratedContent();

3. Via Frontend UI (React)

import { useCreateGeneratedFunnelJobMutation } from "./api/GeneratedFunnelJobService";

const FunnelGeneratorForm = () => {
const [createJob] = useCreateGeneratedFunnelJobMutation();

const handleSubmit = async (formData) => {
const job = await createJob({
inputParams: {
brand: formData.brand,
offer: formData.offer,
targetAudience: formData.targetAudience,
priceTier: formData.priceTier,
priceAmount: formData.priceAmount,
deliveryMode: formData.deliveryMode,
heroBenefit: formData.heroBenefit,
},
}).unwrap();

// Poll job status
pollJobStatus(job.id);
};
};

📋 Input Schema

FieldTypeRequiredOptionsExample
brandString"Valkyr Labs"
offerString"Reverse SaaS Accelerator"
targetAudienceString"founders, devs, solopreneurs"
priceTierStringfree, tripwire, core, high_ticket"core"
priceAmountDouble499.00
deliveryModeStringcourse, challenge, mentorship, consulting, saas, template, blueprint"mentorship"
heroBenefitString"Ship your first AI workflow in 7 days"
templateIdUUID(Use FunnelTemplate)

📤 Output Schema

ContentData Structure

{
"contentType": "funnel",
"title": "Reverse SaaS Launch System",
"slug": "valkyr-labs-reverse-saas-launch-system",
"brand": "Valkyr Labs",
"targetAudience": "founders + CTOs",
"priceTier": "core",
"priceAmount": 499.0,
"deliveryMode": "mentorship",
"heroBenefit": "Ship your first AI workflow in 7 days",
"problemStatement": "...",
"promiseStatement": "...",
"offerStructure": {
"modules": [
{ "title": "Week 1: Foundation", "description": "..." },
{ "title": "Week 2: Integration", "description": "..." }
],
"bonuses": ["Private Discord", "1-on-1 kickoff"],
"timeline": "30 days"
},
"funnelStages": [
{
"stageName": "awareness",
"order": 1,
"config": {
"hook": "This is why you can't build an app with AI...",
"value": "Because AI writes code — but doesn't ship workflows.",
"cta": "Click the link, I'll show you how ValkyrAI does both."
}
},
{ "stageName": "lead_magnet", "order": 2, ... },
{ "stageName": "nurture", "order": 3 },
{ "stageName": "conversion", "order": 4 },
{ "stageName": "upsell", "order": 5 }
],
"landingPageSections": [
{
"sectionType": "hero",
"order": 1,
"config": {
"headline": "Ship your first AI workflow in 7 days",
"subheadline": "Without hiring a team or learning to code",
"ctaText": "Get Started Now",
"ctaUrl": "/checkout"
}
},
{ "sectionType": "social_proof", ... },
{ "sectionType": "features", ... },
{ "sectionType": "founder_story", ... },
{ "sectionType": "comparison", ... },
{ "sectionType": "cta", ... }
],
"adVariants": [
{
"platform": "tiktok",
"duration": 15,
"hook": "This is why you can't build an app with AI...",
"value": "Because AI writes code — but doesn't ship workflows.",
"cta": "Click the link, I'll show you how ValkyrAI does both.",
"hashtags": ["#ai", "#startup", "#nocode"],
"visualNotes": "Dark mode, SF Pro font, quick cuts"
},
{ "platform": "instagram", "duration": 30, ... },
{ "platform": "linkedin", "duration": 45, ... }
],
"emailSequence": [
{
"sequenceOrder": 1,
"subject": "Welcome to the Reverse SaaS System",
"preheader": "Let's ship your first AI workflow",
"bodyHtml": "<html>...</html>",
"bodyPlainText": "...",
"sendDelay": 0,
"tags": ["welcome"]
},
{ "sequenceOrder": 2, "sendDelay": 24, ... },
{ "sequenceOrder": 3, "sendDelay": 48, ... }
]
}

🎨 Design Philosophy

Visual Style (Apple/Gumroad/Cursor Aesthetic)

  • Minimal, text-dominant layouts
  • Large, bold headlines (48px+)
  • Generous whitespace (60px+ section padding)
  • Monochrome palette (black text, white bg)
  • Sans-serif typography (SF Pro, Inter, System UI)
  • Simple CTAs (solid black buttons, rounded corners)

Copy Tone

  • Founder-led, authority-driven
  • Concise, emotional, benefit-focused
  • Avoid AI clichés — focus on tangible wins
  • Use real emotional triggers: FOMO, belonging, curiosity

Conversion Psychology

  1. Awareness Stage — Hook with relatable pain point
  2. Lead Magnet — Offer immediate value (blueprint, ebook, call)
  3. Nurture — Build trust with proof/demo/story
  4. Conversion — Create urgency with scarcity/limited time
  5. Upsell — Offer premium tier (mastermind, 1-on-1)

🧪 Testing

Unit Tests

@SpringBootTest
class FunnelGeneratorModuleTests {

@Autowired
private FunnelGeneratorModule module;

@Test
void testGenerateFunnel() {
// Arrange
Map<String, Object> inputs = Map.of(
"brand", "Test Brand",
"offer", "Test Offer",
"targetAudience", "test users",
"priceTier", "core",
"deliveryMode", "course",
"heroBenefit", "Test benefit"
);

// Act
module.execute();
Map<String, Object> result = module.getGeneratedContent();

// Assert
assertThat(result).containsKey("prd");
assertThat(result).containsKey("landingPageSections");
assertThat(result).containsKey("adVariants");
assertThat(result).containsKey("emailSequence");
}
}

Integration Tests

# Build project
mvn clean install -DskipTests

# Run tests
mvn test -Dtest=FunnelGeneratorModuleTests

# Start dev harness
make harness-up

# Test via API
curl -X POST http://localhost:8080/api/v1/vaiworkflow/execute \
-H "Content-Type: application/json" \
-d '{
"workflowName": "generate_product_funnel",
"initialState": {
"brand": "Valkyr Labs",
"offer": "AI Blueprint",
"targetAudience": "founders",
"priceTier": "tripwire",
"priceAmount": 49.0,
"deliveryMode": "course",
"heroBenefit": "Build your first AI app in 30 days"
}
}'

🔧 Configuration

Environment Variables

# Required
OPENAI_API_KEY=sk-...

# Optional (defaults)
LLM_PROVIDER=OPENAI
LLM_MODEL=gpt-4o
LLM_TEMPERATURE=0.7

Spring Configuration

# application.yml
valkyrai:
funnel-generator:
enabled: true
default-provider: OPENAI
default-model: gpt-4o
default-temperature: 0.7
templates:
- id: saas-launch
name: "SaaS Launch Funnel"
category: saas_launch
- id: course-launch
name: "Course Launch Funnel"
category: course_launch

📚 Examples

Example 1: Course Launch Funnel

{
"brand": "Valkyr Labs",
"offer": "ValkyrAI Masterclass",
"targetAudience": "developers, founders",
"priceTier": "core",
"priceAmount": 299.0,
"deliveryMode": "course",
"heroBenefit": "Master AI workflows in 14 days"
}

Example 2: Consulting Offer

{
"brand": "TrustLove",
"offer": "Fractional CTO Package",
"targetAudience": "early-stage startups",
"priceTier": "high_ticket",
"priceAmount": 10000.0,
"deliveryMode": "consulting",
"heroBenefit": "Get a world-class tech leader without full-time cost"
}

Example 3: Lead Magnet

{
"brand": "Valkyr Labs",
"offer": "AI Automation Blueprint",
"targetAudience": "solopreneurs, agencies",
"priceTier": "free",
"priceAmount": 0.0,
"deliveryMode": "blueprint",
"heroBenefit": "Automate 10 hours of work per week with AI"
}

🚦 Next Steps

Phase 1: Core Implementation ✅

  • Create contentdata.yaml OpenAPI spec
  • Build FunnelGeneratorModule
  • Create workflow template
  • Integration with LlmAdapterFactory

Phase 2: Frontend Integration 🚧

  • React UI for funnel generator
  • Template library browser
  • Content editor with preview
  • A/B test variant manager

Phase 3: Advanced Features 🔮

  • Multi-language support
  • Custom brand voice training
  • Automated A/B testing
  • Analytics integration
  • Funnel performance tracking

📖 Resources


🤝 Contributing

Follow ValkyrAI's codegen philosophy:

  1. Never edit generated code — modify OpenAPI specs or templates
  2. Always build thorapi first — other modules depend on it
  3. Write tests for all new features
  4. Update docs in this README and ADRs

📄 License

Copyright © 2025 Valkyr Labs. All rights reserved.