export function businessScaleReadinessQuiz(form: FormTs) {
form.setTitle(() => '📈 Is Your Business Ready to Scale?');
// ============ SCORING SYSTEM ============
const scores = form.state<Record<string, number>>({});
const updateScore = (category: string, points: number) => {
scores.update(current => ({ ...current, [category]: points }));
};
const getTotalScore = () => {
const s = scores();
return Object.values(s).reduce((sum, val) => sum + (val || 0), 0);
};
const getMaxScore = () => 100;
const getScorePercentage = () => Math.round((getTotalScore() / getMaxScore()) * 100);
const getReadinessLevel = (): 'not-ready' | 'early-stage' | 'getting-ready' | 'ready' | 'primed' => {
const pct = getScorePercentage();
if (pct >= 85) return 'primed';
if (pct >= 70) return 'ready';
if (pct >= 50) return 'getting-ready';
if (pct >= 30) return 'early-stage';
return 'not-ready';
};
const getReadinessLabel = () => {
const level = getReadinessLevel();
const labels = {
'not-ready': '🚧 Not Ready Yet',
'early-stage': '🌱 Early Stage',
'getting-ready': '📈 Getting Ready',
'ready': '✅ Ready to Scale',
'primed': '🚀 Primed for Growth'
};
return labels[level];
};
const getReadinessColor = () => {
const level = getReadinessLevel();
const colors = {
'not-ready': '#dc2626',
'early-stage': '#ea580c',
'getting-ready': '#ca8a04',
'ready': '#16a34a',
'primed': '#7c3aed'
};
return colors[level];
};
// ============ COMPLETION SCREEN ============
form.configureCompletionScreen({
type: 'text',
title: () => `${getReadinessLabel()}`,
message: () => {
const pct = getScorePercentage();
const level = getReadinessLevel();
const messages = {
'not-ready': `Your scale readiness score is ${pct}%. Focus on building stronger foundations before attempting to scale. Premature scaling is a top startup killer.`,
'early-stage': `Your scale readiness score is ${pct}%. You have some elements in place, but several critical areas need attention before scaling.`,
'getting-ready': `Your scale readiness score is ${pct}%. You're making good progress. Address the gaps in your report to prepare for sustainable growth.`,
'ready': `Your scale readiness score is ${pct}%. Your business shows strong fundamentals for scaling. Review your report for optimization opportunities.`,
'primed': `Excellent! Your scale readiness score is ${pct}%. Your business demonstrates exceptional readiness for rapid growth. Execute with confidence!`
};
return messages[level];
}
});
// ============ PAGES SETUP ============
const pages = form.addPages('quiz-pages', {
heightMode: 'current-page'
});
// ============ PAGE 1: Business Fundamentals ============
const page1 = pages.addPage('fundamentals', { mobileBreakpoint: 500 });
page1.addRow(row => {
row.addTextPanel('header1', {
label: 'Step 1 of 7: Business Fundamentals',
computedValue: () => 'Let\'s assess your business foundation',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page1.addSpacer({ height: '24px' });
page1.addRow(row => {
row.addDropdown('businessAge', {
label: 'How long has your business been operating?',
isRequired: true,
options: [
{ id: 'under-1', name: '⏳ Under 1 year' },
{ id: '1-2', name: '📅 1-2 years' },
{ id: '2-5', name: '📆 2-5 years' },
{ id: '5-plus', name: '🏆 5+ years' }
],
placeholder: 'Select age'
}, '1fr');
row.addDropdown('revenue', {
label: 'Current Annual Revenue',
isRequired: true,
options: [
{ id: 'pre-revenue', name: '💡 Pre-revenue' },
{ id: 'under-100k', name: '💰 Under $100K' },
{ id: '100k-500k', name: '💰 $100K - $500K' },
{ id: '500k-1m', name: '💎 $500K - $1M' },
{ id: '1m-5m', name: '💎 $1M - $5M' },
{ id: '5m-plus', name: '🏆 $5M+' }
],
placeholder: 'Select range'
}, '1fr');
});
page1.addRow(row => {
row.addRadioButton('profitability', {
label: 'What is your current profitability status?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'profitable', name: '💚 Consistently profitable (6+ months)' },
{ id: 'breakeven', name: '⚖️ Breaking even' },
{ id: 'burning', name: '🔥 Burning cash but controlled' },
{ id: 'heavy-loss', name: '⚠️ Heavy losses' }
],
onValueChange: (val) => {
const points = { profitable: 10, breakeven: 6, burning: 3, 'heavy-loss': 0 };
updateScore('profitability', points[val as keyof typeof points] || 0);
}
});
});
page1.addRow(row => {
row.addRadioButton('unitEconomics', {
label: 'Do you know your unit economics (CAC, LTV, payback)?',
tooltip: 'CAC = Customer Acquisition Cost, LTV = Lifetime Value',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'optimized', name: '📊 Yes, tracked and optimized (LTV > 3x CAC)' },
{ id: 'known', name: '📈 Yes, we track them' },
{ id: 'rough', name: '🤔 Rough estimates only' },
{ id: 'unknown', name: '❌ Not sure' }
],
onValueChange: (val) => {
const points = { optimized: 10, known: 7, rough: 3, unknown: 0 };
updateScore('unitEconomics', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 2: Product-Market Fit ============
const page2 = pages.addPage('product-market-fit', { mobileBreakpoint: 500 });
page2.addRow(row => {
row.addTextPanel('header2', {
label: 'Step 2 of 7: Product-Market Fit',
computedValue: () => 'Scaling without PMF is like pouring water into a leaky bucket',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page2.addSpacer({ height: '24px' });
page2.addRow(row => {
row.addRatingScale('pmfScore', {
label: 'How disappointed would customers be if they could no longer use your product?',
tooltip: 'The "Sean Ellis test" - 40%+ "very disappointed" indicates PMF',
isRequired: true,
preset: 'custom',
min: 0,
max: 4,
lowLabel: 'Not at all',
highLabel: 'Very disappointed',
variant: 'segmented',
size: 'md',
alignment: 'center',
onValueChange: (val) => {
if (val == null) return;
const points = [0, 2, 5, 8, 10];
updateScore('pmf', points[val] || 0);
}
});
});
page2.addRow(row => {
row.addSlider('nps', {
label: 'What is your Net Promoter Score (NPS)?',
tooltip: 'NPS ranges from -100 to 100. Above 50 is excellent.',
isRequired: true,
min: -100,
max: 100,
step: 10,
defaultValue: 30,
onValueChange: (val) => {
if (val == null) return;
const points = val >= 50 ? 8 : val >= 30 ? 6 : val >= 0 ? 4 : val >= -30 ? 2 : 0;
updateScore('nps', points);
}
});
});
page2.addRow(row => {
row.addRadioButton('retention', {
label: 'What is your customer retention rate (monthly/annual)?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'excellent', name: '🌟 Excellent (90%+ annual / 95%+ monthly)' },
{ id: 'good', name: '✅ Good (80-90% annual / 90-95% monthly)' },
{ id: 'average', name: '📊 Average (70-80% annual / 85-90% monthly)' },
{ id: 'poor', name: '⚠️ Below average / Not tracking' }
],
onValueChange: (val) => {
const points = { excellent: 7, good: 5, average: 3, poor: 0 };
updateScore('retention', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 3: Operations & Systems ============
const page3 = pages.addPage('operations', { mobileBreakpoint: 500 });
page3.addRow(row => {
row.addTextPanel('header3', {
label: 'Step 3 of 7: Operations & Systems',
computedValue: () => 'Can your operations handle 10x growth?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page3.addSpacer({ height: '24px' });
page3.addRow(row => {
row.addMatrixQuestion('systemsMatrix', {
label: 'Rate your current systems and processes:',
isRequired: true,
rows: [
{ id: 'sales', label: 'Sales Process', description: 'Repeatable, documented' },
{ id: 'delivery', label: 'Product/Service Delivery', description: 'Consistent quality at scale' },
{ id: 'support', label: 'Customer Support', description: 'Scalable support systems' },
{ id: 'finance', label: 'Financial Operations', description: 'Billing, reporting, forecasting' }
],
columns: [
{ id: 'adhoc', label: 'Ad-hoc' },
{ id: 'defined', label: 'Defined' },
{ id: 'documented', label: 'Documented' },
{ id: 'optimized', label: 'Optimized' }
],
selectionMode: 'single',
striped: true,
fullWidth: true,
onValueChange: (val) => {
if (!val) return;
const pointsMap: Record<string, number> = { adhoc: 0, defined: 1, documented: 2, optimized: 3 };
let total = 0;
for (const col of Object.values(val)) {
total += pointsMap[col as string] || 0;
}
updateScore('systems', Math.min(total, 10));
}
});
});
page3.addRow(row => {
row.addRadioButton('automation', {
label: 'How automated are your core business processes?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'highly', name: '🤖 Highly automated (minimal manual work)' },
{ id: 'partially', name: '⚙️ Partially automated' },
{ id: 'mostly-manual', name: '👤 Mostly manual with some tools' },
{ id: 'manual', name: '📝 Primarily manual' }
],
onValueChange: (val) => {
const points = { highly: 8, partially: 5, 'mostly-manual': 2, manual: 0 };
updateScore('automation', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 4: Team & Leadership ============
const page4 = pages.addPage('team', { mobileBreakpoint: 500 });
page4.addRow(row => {
row.addTextPanel('header4', {
label: 'Step 4 of 7: Team & Leadership',
computedValue: () => 'Scaling requires the right people in the right roles',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page4.addSpacer({ height: '24px' });
page4.addRow(row => {
row.addSlider('teamSize', {
label: 'How many full-time employees do you have?',
isRequired: true,
min: 1,
max: 100,
step: 1,
unit: 'people',
defaultValue: 10
});
});
page4.addRow(row => {
row.addSuggestionChips('leadershipRoles', {
label: 'Which key leadership roles are filled?',
isRequired: true,
suggestions: [
{ id: 'ceo', name: '👔 CEO/Founder' },
{ id: 'coo', name: '⚙️ COO/Operations' },
{ id: 'cfo', name: '💰 CFO/Finance' },
{ id: 'cto', name: '💻 CTO/Tech' },
{ id: 'cmo', name: '📢 CMO/Marketing' },
{ id: 'sales', name: '🤝 Sales Leader' },
{ id: 'hr', name: '👥 HR/People' }
],
min: 1,
onValueChange: (val) => {
const points = val ? Math.min(val.length * 1.5, 8) : 0;
updateScore('leadership', points);
}
});
});
page4.addRow(row => {
row.addRadioButton('delegation', {
label: 'How dependent is the business on you (the founder)?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'independent', name: '🏃 Can run without me for months' },
{ id: 'mostly', name: '📅 Can run without me for weeks' },
{ id: 'short', name: '⏰ Can run without me for days' },
{ id: 'dependent', name: '🔗 Nothing happens without me' }
],
onValueChange: (val) => {
const points = { independent: 7, mostly: 5, short: 3, dependent: 0 };
updateScore('delegation', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 5: Financial Resources ============
const page5 = pages.addPage('finance', { mobileBreakpoint: 500 });
page5.addRow(row => {
row.addTextPanel('header5', {
label: 'Step 5 of 7: Financial Resources',
computedValue: () => 'Scaling requires capital - do you have enough runway?',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page5.addSpacer({ height: '24px' });
page5.addRow(row => {
row.addRadioButton('runway', {
label: 'How many months of runway do you have?',
tooltip: 'Cash on hand divided by monthly burn rate',
isRequired: true,
orientation: 'vertical',
options: [
{ id: '24-plus', name: '🏦 24+ months' },
{ id: '12-24', name: '💚 12-24 months' },
{ id: '6-12', name: '⚡ 6-12 months' },
{ id: 'under-6', name: '⚠️ Under 6 months' }
],
onValueChange: (val) => {
const points = { '24-plus': 8, '12-24': 6, '6-12': 3, 'under-6': 0 };
updateScore('runway', points[val as keyof typeof points] || 0);
}
});
});
page5.addRow(row => {
row.addRadioButton('fundingAccess', {
label: 'What is your access to growth capital?',
isRequired: true,
orientation: 'vertical',
options: [
{ id: 'raised', name: '💰 Recently raised / have committed funding' },
{ id: 'ongoing', name: '🤝 Active investor conversations' },
{ id: 'bootstrap', name: '📈 Self-funding from profits' },
{ id: 'limited', name: '🤔 Limited access' }
],
onValueChange: (val) => {
const points = { raised: 7, ongoing: 5, bootstrap: 6, limited: 1 };
updateScore('funding', points[val as keyof typeof points] || 0);
}
});
});
// ============ PAGE 6: Results ============
const page6 = pages.addPage('results', { mobileBreakpoint: 500 });
page6.addRow(row => {
row.addTextPanel('header6', {
label: 'Step 6 of 7: Your Results',
computedValue: () => 'Your business scale readiness assessment',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page6.addSpacer({ height: '24px' });
page6.addRow(row => {
row.addTextPanel('finalScoreLabel', {
label: '📈 Scale Readiness Assessment Results',
computedValue: () => '',
customStyles: {
fontSize: '1.2rem',
fontWeight: '700',
textAlign: 'center'
}
});
});
page6.addRow(row => {
row.addTextPanel('finalReadinessLevel', {
computedValue: () => getReadinessLabel(),
customStyles: () => ({
fontSize: '1.5rem',
fontWeight: '800',
textAlign: 'center',
color: getReadinessColor(),
padding: '15px',
background: '#f9fafb',
borderRadius: '12px',
border: `3px solid ${getReadinessColor()}`
})
});
});
page6.addRow(row => {
row.addTextPanel('scoreBreakdown', {
computedValue: () => {
const total = getTotalScore();
const pct = getScorePercentage();
return `Readiness Score: ${total}/${getMaxScore()} (${pct}%)`;
},
customStyles: {
fontSize: '1.1rem',
fontWeight: '600',
textAlign: 'center',
color: '#374151',
marginTop: '10px'
}
});
});
page6.addRow(row => {
row.addTextPanel('recommendation', {
computedValue: () => {
const level = getReadinessLevel();
const recommendations = {
'not-ready': '🚧 Focus on fixing fundamentals: achieve profitability, validate product-market fit, and build core systems before considering scale.',
'early-stage': '🌱 You have early signs of readiness. Prioritize strengthening unit economics and documenting processes.',
'getting-ready': '📈 You\'re on the right track. Fill leadership gaps and ensure your systems can handle 3-5x current volume.',
'ready': '✅ Your business shows solid fundamentals. Consider aggressive growth investments and team expansion.',
'primed': '🚀 You have exceptional readiness. Execute your growth plan with confidence and consider raising growth capital.'
};
return recommendations[level];
},
customStyles: {
fontSize: '0.95rem',
color: '#4b5563',
textAlign: 'center',
padding: '15px',
background: '#f3f4f6',
borderRadius: '8px',
marginTop: '15px',
lineHeight: '1.5'
}
});
});
const detailsSection = page6.addSubform('detailsBreakdown', {
title: '📊 Detailed Score Breakdown (click to expand)',
isCollapsible: true,
customStyles: {
marginTop: '1rem',
background: '#f9fafb',
borderRadius: '8px'
}
});
detailsSection.addRow(row => {
row.addTextPanel('fundamentalsDetail', {
label: '💰 Fundamentals',
computedValue: () => {
const s = scores();
const score = (s['profitability'] || 0) + (s['unitEconomics'] || 0);
return `${score}/20 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('pmfDetail', {
label: '🎯 Product-Market Fit',
computedValue: () => {
const s = scores();
const score = (s['pmf'] || 0) + (s['nps'] || 0) + (s['retention'] || 0);
return `${score}/25 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
});
detailsSection.addRow(row => {
row.addTextPanel('operationsDetail', {
label: '⚙️ Operations',
computedValue: () => {
const s = scores();
const score = (s['systems'] || 0) + (s['automation'] || 0);
return `${score}/18 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addTextPanel('teamDetail', {
label: '👥 Team',
computedValue: () => {
const s = scores();
const score = (s['leadership'] || 0) + (s['delegation'] || 0);
return `${score}/15 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
});
detailsSection.addRow(row => {
row.addTextPanel('financeDetail', {
label: '🏦 Financial',
computedValue: () => {
const s = scores();
const score = (s['runway'] || 0) + (s['funding'] || 0);
return `${score}/15 points`;
},
customStyles: {
fontSize: '0.9rem',
padding: '8px 12px',
background: '#dbeafe',
borderRadius: '6px'
}
}, '1fr');
row.addEmpty('1fr');
});
// ============ PAGE 7: Lead Capture ============
const page7 = pages.addPage('lead-capture', { mobileBreakpoint: 500 });
page7.addRow(row => {
row.addTextPanel('header7', {
label: 'Step 7 of 7: Get Your Growth Plan',
computedValue: () => 'Enter your details to receive your personalized scaling roadmap',
customStyles: {
fontSize: '0.9rem',
color: '#6b7280',
marginBottom: '1rem'
}
});
});
page7.addSpacer({ height: '24px' });
page7.addRow(row => {
row.addTextbox('name', {
label: 'Your Name',
isRequired: true,
placeholder: 'Chris Founder'
}, '1fr');
row.addEmail('email', {
label: 'Work Email',
isRequired: true,
placeholder: 'chris@startup.com'
}, '1fr');
});
page7.addRow(row => {
row.addTextbox('company', {
label: 'Company Name',
placeholder: 'GrowthCo'
}, '1fr');
row.addDropdown('role', {
label: 'Your Role',
options: [
{ id: 'founder', name: 'Founder/CEO' },
{ id: 'cofounder', name: 'Co-founder' },
{ id: 'coo', name: 'COO/Operations' },
{ id: 'executive', name: 'Executive Team' },
{ id: 'other', name: 'Other' }
],
placeholder: 'Select role'
}, '1fr');
});
page7.addRow(row => {
row.addCheckboxList('consent', {
options: [
{ id: 'report', name: '📄 Send me the detailed scaling roadmap', isRequired: true },
{ id: 'tips', name: '💡 Send me weekly growth insights' },
{ id: 'consultation', name: '📞 I\'d like a free growth strategy session' }
],
defaultValue: ['report'],
orientation: 'vertical'
});
});
// ============ PDF REPORT ============
form.configurePdf('scale-readiness-report', pdf => {
pdf.configure({
filename: 'business-scale-readiness-report.pdf',
pageSize: 'A4',
allowUserDownload: true,
downloadButtonLabel: '📄 Download Growth Roadmap',
header: {
title: 'Business Scale Readiness Report',
subtitle: 'Your Personalized Growth Assessment'
},
footer: {
text: 'Generated by FormTs Scale Readiness Assessment',
showPageNumbers: true
}
});
pdf.addSection('Executive Summary', section => {
section.addRow(row => {
row.addField('Readiness Level', getReadinessLabel());
row.addField('Overall Score', `${getScorePercentage()}%`);
});
section.addRow(row => {
row.addField('Assessment Date', new Date().toLocaleDateString());
row.addField('Total Points', `${getTotalScore()} / ${getMaxScore()}`);
});
});
pdf.addSection('Category Breakdown', section => {
const s = scores();
section.addTable(
['Category', 'Score', 'Max', 'Status'],
[
['Fundamentals', `${(s['profitability'] || 0) + (s['unitEconomics'] || 0)}`, '20', (s['profitability'] || 0) >= 7 ? '✅ Strong' : '⚠️ Needs Work'],
['Product-Market Fit', `${(s['pmf'] || 0) + (s['nps'] || 0) + (s['retention'] || 0)}`, '25', (s['pmf'] || 0) >= 7 ? '✅ Strong' : '⚠️ Needs Work'],
['Operations', `${(s['systems'] || 0) + (s['automation'] || 0)}`, '18', (s['systems'] || 0) >= 7 ? '✅ Strong' : '⚠️ Needs Work'],
['Team & Leadership', `${(s['leadership'] || 0) + (s['delegation'] || 0)}`, '15', (s['leadership'] || 0) >= 5 ? '✅ Strong' : '⚠️ Needs Work'],
['Financial', `${(s['runway'] || 0) + (s['funding'] || 0)}`, '15', (s['runway'] || 0) >= 5 ? '✅ Strong' : '⚠️ Needs Work']
]
);
});
pdf.addPageBreak();
pdf.addSection('Priority Actions', section => {
const level = getReadinessLevel();
if (level === 'not-ready' || level === 'early-stage') {
section.addText('🚨 IMMEDIATE PRIORITIES:');
section.addText('1. Achieve unit economics clarity (CAC, LTV, payback period)');
section.addText('2. Validate product-market fit with customer research');
section.addText('3. Document core business processes');
section.addText('4. Build path to profitability or secure bridge funding');
} else if (level === 'getting-ready') {
section.addText('⚡ NEXT 90-DAY PRIORITIES:');
section.addText('1. Hire key leadership roles (or fractional executives)');
section.addText('2. Automate repetitive manual processes');
section.addText('3. Stress-test systems at 3x current volume');
section.addText('4. Develop 18-month financial projections');
} else {
section.addText('🚀 GROWTH ACCELERATORS:');
section.addText('1. Consider raising growth capital');
section.addText('2. Invest aggressively in customer acquisition');
section.addText('3. Expand team across all functions');
section.addText('4. Explore new markets or product lines');
}
});
pdf.addSection('Scaling Benchmarks', section => {
section.addText('🎯 Target Metrics for Scale-Ready Companies:');
section.addSpacer(5);
section.addText('• LTV:CAC ratio > 3:1');
section.addText('• CAC payback < 12 months');
section.addText('• Net Revenue Retention > 100%');
section.addText('• Gross Margin > 50%');
section.addText('• Monthly burn < monthly revenue growth');
});
});
// ============ SUBMIT BUTTON ============
form.configureSubmitButton({
label: () => `📈 Get My Growth Roadmap (Score: ${getScorePercentage()}%)`
});
form.configureSubmitBehavior({
sendToServer: true
});
}