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 config
data/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 builder
lib/affiliates/tracking.ts — Click tracking
lib/lemon-squeezy.ts — Checkout creation, webhook verification
Components
components/deploy/DeployButtonGroup.tsx — Deploy buttons with affiliate tracking
components/affiliates/AffiliateLink.tsx — Generic tracked affiliate link
Pages
app/blueprint/[slug]/page.tsx — Blueprint detail with deploy buttons
app/ai-architecture/templates/page.tsx — Template marketplace with checkout
Strategy Docs (Private)
docs/strategy/AFFILIATE_MONETIZATION_STRATEGY.md — Full affiliate research + Oracle analysis
docs/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
lemonSqueezyVariantId in template data
- Change
status from 'coming-soon' to 'active'
- Push to production
Add New Affiliate Platform
- Add entry to
lib/affiliates/affiliate-manager.ts in 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.tsx platformMeta
Track Revenue
GA4 events:
deploy_click — {platform, blueprint} — deploy button clicked
template_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: true on 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" with noopener 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
1---2name: template-monetization3description: Blueprint-to-template monetization system for deployment, affiliate, and revenue workflows.4---56# Template Monetization Skill v1.078## Identity9System for managing the Blueprint → Template → Deploy → Revenue pipeline.10Part of ACOS v11 intelligence layer.1112## Trigger Keywords13template, monetization, deploy, affiliate, railway, vercel, n8n, lemon squeezy, polar, revenue, blueprint monetize1415## Architecture1617### Revenue Stack (Oracle-Safe)18| Layer | Platform | Commission | Type |19|-------|----------|-----------|------|20| Deploy | Railway | 15% + 25% kickback | Recurring |21| Deploy | Vercel | $5/lead + 30% | Recurring |22| Deploy | n8n | 30% for 12 months | Recurring |23| Monitor | Better Stack | 25% for 12 months | Recurring |24| Sales | Lemon Squeezy | Keep 95% | Direct |25| Sales | Polar.sh | Keep 96% | Direct |2627### AVOID (Oracle Non-Compete)28AWS, GCP, Azure, DigitalOcean, Vultr, Linode, Hetzner — NEVER add to affiliate-manager.ts2930## Key Files3132### Data Layer33- `data/deploy-targets.json` — Blueprint-to-platform mapping + template product config34- `data/ai-architecture/prototypes.json` — Blueprint definitions (5 published)3536### Type System37- `types/affiliates.ts` — Affiliate, DeployTarget, BlueprintDeployConfig, TemplateProduct3839### Business Logic40- `lib/affiliates/affiliate-manager.ts` — Registry (17 affiliates, all Oracle-compatible)41- `lib/affiliates/link-builder.ts` — UTM link builder42- `lib/affiliates/tracking.ts` — Click tracking43- `lib/lemon-squeezy.ts` — Checkout creation, webhook verification4445### Components46- `components/deploy/DeployButtonGroup.tsx` — Deploy buttons with affiliate tracking47- `components/affiliates/AffiliateLink.tsx` — Generic tracked affiliate link4849### Pages50- `app/blueprint/[slug]/page.tsx` — Blueprint detail with deploy buttons51- `app/ai-architecture/templates/page.tsx` — Template marketplace with checkout5253### Strategy Docs (Private)54- `docs/strategy/AFFILIATE_MONETIZATION_STRATEGY.md` — Full affiliate research + Oracle analysis55- `docs/strategy/PRODUCT_DEVELOPMENT_LIFECYCLE.md` — Pipeline documentation5657## Commands5859### Add New Blueprint with Deploy Targets601. Add blueprint to `data/ai-architecture/prototypes.json`612. Add deploy config to `data/deploy-targets.json`623. Deploy buttons render automatically on the blueprint page6364### Activate Template for Sale651. Create product on Lemon Squeezy662. Get variant ID from Lemon Squeezy dashboard673. Set `lemonSqueezyVariantId` in template data684. Change `status` from `'coming-soon'` to `'active'`695. Push to production7071### Add New Affiliate Platform721. Add entry to `lib/affiliates/affiliate-manager.ts` in appropriate category732. Ensure `oracleCompatible: true` (or DO NOT ADD)743. Add env var for referral code to `.env.local`754. If deploy platform: add to `components/deploy/DeployButtonGroup.tsx` platformMeta7677### Track Revenue78GA4 events:79- `deploy_click` — {platform, blueprint} — deploy button clicked80- `template_purchase` — {template_id, price} — checkout completed (via Lemon Squeezy webhook)81- `affiliate_click` — {affiliate_id, page} — content affiliate link clicked8283## Environment Variables Required84```85NEXT_PUBLIC_RAILWAY_REFERRAL_CODE86NEXT_PUBLIC_N8N_AFFILIATE_ID87NEXT_PUBLIC_VERCEL_AFFILIATE_ID88BETTERSTACK_AFFILIATE_ID89LEMON_SQUEEZY_API_KEY90LEMON_SQUEEZY_STORE_ID91LEMON_SQUEEZY_WEBHOOK_SECRET92```9394## Quality Rules951. NEVER add IaaS platforms to affiliate registry (Oracle compliance)962. ALWAYS include `oracleCompatible: true` on new entries973. ALWAYS test deploy URLs before pushing to production984. ALWAYS include affiliate disclosure on pages with tracked links995. Template prices must be validated against competitive market rates1006. Deploy buttons must use `target="_blank"` with `noopener noreferrer`101102## ICP Alignment103- AI Engineers → Railway templates (backend compute)104- Startup CTOs → Pro templates ($99-199)105- Enterprise Architects → Better Stack monitoring106- Solo Developers → Free GitHub templates → paid upgrades107- Students → Newsletter capture → future customers