Template Monetization Skill v1.0
Identity
System for managing the Blueprint → Template → Deploy → Revenue pipeline. Part of ACOS v11 intelligence layer.
Trigger Keywords
template, monetization, deploy, affiliate, railway, vercel, n8n, lemon squeezy, polar, revenue, blueprint monetize
Architecture
Revenue Stack (Oracle-Safe)
| Layer | Platform | Commission | Type | |-------|----------|-----------|------| | Deploy | Railway | 15% + 25% kickback | Recurring | | Deploy | Vercel | $5/lead + 30% | Recurring | | Deploy | n8n | 30% for 12 months | Recurring | | Monitor | Better Stack | 25% for 12 months | Recurring | | Sales | Lemon Squeezy | Keep 95% | Direct | | Sales | Polar.sh | Keep 96% | Direct |
AVOID (Oracle Non-Compete)
AWS, GCP, Azure, DigitalOcean, Vultr, Linode, Hetzner — NEVER add to affiliate-manager.ts
Key Files
Data Layer
data/deploy-targets.json— Blueprint-to-platform mapping + template product configdata/ai-architecture/prototypes.json— Blueprint definitions (5 published)
Type System
types/affiliates.ts— Affiliate, DeployTarget, BlueprintDeployConfig, TemplateProduct
Business Logic
lib/affiliates/affiliate-manager.ts— Registry (17 affiliates, all Oracle-compatible)lib/affiliates/link-builder.ts— UTM link builderlib/affiliates/tracking.ts— Click trackinglib/lemon-squeezy.ts— Checkout creation, webhook verification
Components
components/deploy/DeployButtonGroup.tsx— Deploy buttons with affiliate trackingcomponents/affiliates/AffiliateLink.tsx— Generic tracked affiliate link
Pages
app/blueprint/[slug]/page.tsx— Blueprint detail with deploy buttonsapp/ai-architecture/templates/page.tsx— Template marketplace with checkout
Strategy Docs (Private)
docs/strategy/AFFILIATE_MONETIZATION_STRATEGY.md— Full affiliate research + Oracle analysisdocs/strategy/PRODUCT_DEVELOPMENT_LIFECYCLE.md— Pipeline documentation
Commands
Add New Blueprint with Deploy Targets
- Add blueprint to
data/ai-architecture/prototypes.json - Add deploy config to
data/deploy-targets.json - Deploy buttons render automatically on the blueprint page
Activate Template for Sale
- Create product on Lemon Squeezy
- Get variant ID from Lemon Squeezy dashboard
- Set
lemonSqueezyVariantIdin template data - Change
statusfrom'coming-soon'to'active' - Push to production
Add New Affiliate Platform
- Add entry to
lib/affiliates/affiliate-manager.tsin appropriate category - Ensure
oracleCompatible: true(or DO NOT ADD) - Add env var for referral code to
.env.local - If deploy platform: add to
components/deploy/DeployButtonGroup.tsxplatformMeta
Track Revenue
GA4 events:
deploy_click— {platform, blueprint} — deploy button clickedtemplate_purchase— {template_id, price} — checkout completed (via Lemon Squeezy webhook)affiliate_click— {affiliate_id, page} — content affiliate link clicked
Environment Variables Required
NEXT_PUBLIC_RAILWAY_REFERRAL_CODE
NEXT_PUBLIC_N8N_AFFILIATE_ID
NEXT_PUBLIC_VERCEL_AFFILIATE_ID
BETTERSTACK_AFFILIATE_ID
LEMON_SQUEEZY_API_KEY
LEMON_SQUEEZY_STORE_ID
LEMON_SQUEEZY_WEBHOOK_SECRET
Quality Rules
- NEVER add IaaS platforms to affiliate registry (Oracle compliance)
- ALWAYS include
oracleCompatible: trueon new entries - ALWAYS test deploy URLs before pushing to production
- ALWAYS include affiliate disclosure on pages with tracked links
- Template prices must be validated against competitive market rates
- Deploy buttons must use
target="_blank"withnoopener noreferrer
ICP Alignment
- AI Engineers → Railway templates (backend compute)
- Startup CTOs → Pro templates ($99-199)
- Enterprise Architects → Better Stack monitoring
- Solo Developers → Free GitHub templates → paid upgrades
- Students → Newsletter capture → future customers