Revenue Integration TODO — PhotoSwipe Pro with AI SEO
Current Status
✅ License validation infrastructure: 70% complete ❌ Purchase/checkout flow: 0% complete
Bottom line: You can validate license keys but have no way to sell them yet.
Phase 1: LemonSqueezy Store Setup (Required First)
1.1 Create LemonSqueezy Account
- Sign up at https://lemonsqueezy.com
- Complete business/tax info
- Connect payout method (bank/PayPal)
1.2 Create Products
- Product 1: PhotoSwipe Pro Site License
- Pricing: $49–99/year (research competitors)
- License scope: 1 production domain
- Includes: AI SEO features, 1 year updates, email support
- Product 2: PhotoSwipe Pro Agency License
- Pricing: $199–299/year
- License scope: Up to 10 domains
- Includes: Same as Site + priority support
- Product 3: PhotoSwipe Pro Enterprise (optional for MVP)
- Custom pricing
- Unlimited domains
- SLA, custom terms
1.3 Configure License Keys in LS
- Enable "License Keys" feature for each product
- Set key format:
pswp_paid_XXXXXXXX(or similar) - Configure activation limits:
- Site: 1 activation
- Agency: 10 activations
- Enterprise: Unlimited or high limit
- Set expiration: 1 year from purchase (annual renewal)
1.4 Get API Credentials
- Generate API key in LS dashboard
- Note Store ID, Product IDs, Variant IDs
- Save these to environment variables:
LEMON_SQUEEZY_API_KEY=your_key_here
LEMON_SQUEEZY_STORE_ID=12345
LEMON_SQUEEZY_PRODUCT_ID_SITE=67890
LEMON_SQUEEZY_PRODUCT_ID_AGENCY=67891
Phase 2: Purchase Flow (Frontend)
2.1 Create Checkout Page
File: demo-docs-website/src/pages/checkout.mdx
Add:
- Pricing comparison table (Site vs Agency vs Enterprise)
- Actual dollar amounts (replace
$Xand$Y) - "Buy Now" buttons that link to LemonSqueezy checkout URLs
- FAQ section (refunds, support, license transfer)
2.2 Embed LemonSqueezy Checkout
Two options:
Option A: Redirect to LS checkout (simplest)
<a href="https://yourstore.lemonsqueezy.com/checkout/buy/PRODUCT_UUID"
className="button button--primary button--lg">
Buy Site License — $99/year
</a>
Option B: Embed LS overlay (smoother UX)
<script src="https://assets.lemonsqueezy.com/lemon.js" defer></script>
<a href="https://yourstore.lemonsqueezy.com/checkout/buy/PRODUCT_UUID"
className="lemonsqueezy-button">
Buy Site License — $99/year
</a>
2.3 Update Pro Page CTAs
File: demo-docs-website/src/pages/pro.mdx
Change:
- <a href="/how-to-use-pro">Get License Key →</a>
+ <a href="/checkout">Buy Now — Starting at $99/year →</a>
2.4 Update Pricing Docs
File: docs/pricing.md
Replace placeholders with:
## Pricing
| Tier | Price | Domains | Support | Purchase |
|------|-------|---------|---------|----------|
| **Site** | $99/year | 1 production | Email | [Buy Now](/checkout#site) |
| **Agency** | $299/year | Up to 10 | Priority email | [Buy Now](/checkout#agency) |
| **Enterprise** | Custom | Unlimited | SLA, custom terms | [Contact Sales](mailto:sales@example.com) |
All licenses include:
- ✓ AI-powered alt text & captions
- ✓ ImageObject schema generation
- ✓ 1 year of updates
- ✓ 14-day money-back guarantee
Phase 3: Post-Purchase Delivery
3.1 Configure LemonSqueezy Email Templates
In LS dashboard:
- Purchase confirmation email
- Include license key prominently
- Link to
/how-to-use-prodocumentation - Link to customer portal for ZIP download
- License key reminder email (optional)
- Renewal reminder email (30 days before expiration)
3.2 Customer Portal / Download Delivery
Two options:
Option A: Use LS Customer Portal (simplest)
- LemonSqueezy provides built-in customer portal
- Customers can view purchases, download files, manage licenses
- Upload Pro ZIP to LS as a product file
Option B: Build Custom Portal (more control)
- Create
demo-docs-website/src/pages/customer-portal.mdx - Use LS API to verify purchase + fetch license key
- Provide ZIP download link (hosted on your CDN/S3)
3.3 Automate Pro ZIP Generation
File: build/package-pro-zip.cjs (already exists ✓)
Add to release workflow:
# .github/workflows/release.yml
- name: Package Pro ZIP
run: npm run package:pro-zip
- name: Upload to LemonSqueezy
run: |
# Use LS API or manually upload via dashboard
Or:
- Tag release:
git tag v5.4.5-pro - Manually upload ZIP to LS as product file
- LS auto-delivers to customers
Phase 4: Backend Deployment
4.1 Deploy License Proxy
File: server/lemonsqueezy/router.js (already built ✓)
Deploy to:
- Option A: Vercel Serverless (recommended)
- Create
api/license/[action].jswrappers - Set env vars in Vercel dashboard
- Create
- Option B: Express server
- Mount router at
/api/license - Deploy to Railway, Fly.io, or your VPS
- Mount router at
- Option C: Cloudflare Workers
- Adapt Express router to Workers syntax
4.2 Set Environment Variables
LEMON_SQUEEZY_API_KEY=your_api_key
LEMON_SQUEEZY_STORE_ID=12345
LEMON_SQUEEZY_PRODUCT_ID=67890
LEMON_SQUEEZY_VARIANT_ID=optional
4.3 Test Endpoints
# Health check
curl https://yoursite.com/api/license/health
# Activate (with real key from LS)
curl -X POST https://yoursite.com/api/license/activate \
-H "Content-Type: application/json" \
-d '{"licenseKey":"pswp_paid_XXXX","instanceName":"mysite.com"}'
# Validate
curl -X POST https://yoursite.com/api/license/validate \
-H "Content-Type: application/json" \
-d '{"licenseKey":"pswp_paid_XXXX"}'
Phase 5: Integration Testing
5.1 End-to-End Test Purchase
- Use LS test mode to make a test purchase
- Verify license key is generated and emailed
- Download Pro ZIP from customer portal
- Install ZIP in a test project
- Activate license via demo or your own site
- Verify Pro features unlock (AI SEO demo works)
5.2 Test Edge Cases
- Expired license (set short expiration in test mode)
- Deactivated license (manually disable in LS dashboard)
- Invalid key format
- Activation limit exceeded (try activating on 2+ sites for Site license)
- Offline grace period (disconnect backend, verify 14-day grace works)
5.3 Test Refund Flow
- Issue test refund in LS dashboard
- Verify license is automatically revoked
- Confirm user loses access to Pro features
Phase 6: Marketing & Launch
6.1 Set Real Pricing
Research competitors:
- Lightbox/gallery plugins: $20–200/year
- SaaS tools with AI features: $50–500/year
- Developer tools (Site vs Agency): Common pattern
Recommended starting prices:
- Site: $79/year or $99/year
- Agency: $249/year or $299/year
6.2 Create Launch Assets
- Demo video showing AI SEO in action (Loom/screen recording)
- Testimonials or case studies (if available)
- ROI calculator ("Save X hours of manual alt text writing")
- Comparison table vs. competitors
6.3 Distribution Channels
- Post on ProductHunt (coordinate launch date)
- Share on Reddit (r/webdev, r/javascript, r/webdesign)
- Tweet launch announcement
- Email existing PhotoSwipe community (if you have list)
- Submit to tool directories (AlternativeTo, Slant, etc.)
6.4 SEO & Content
- Publish 3 long-tail guides (already drafted ✓):
/ai-alt-text-product-images/imageobject-schema-nextjs/improve-lcp-inp-gallery
- Add internal links from homepage/docs to Pro page
- Submit sitemap to Google Search Console
- Set up Google Analytics / Plausible to track conversions
Quick Start: Minimum to Launch
If you want to ship today with the simplest possible flow:
MVP Revenue Flow (4 hours of work)
Set up LemonSqueezy store (1 hour)
- Create 1 product: "PhotoSwipe Pro" at $99/year
- Enable license keys with format
pswp_paid_XXXX - Configure email template with key + docs link
Create checkout page (30 min)
- Add
/checkout.mdxwith pricing table - Link to LS checkout URL
- Use redirect (not embed) for simplicity
- Add
Deploy backend proxy (1 hour)
- Deploy
server/lemonsqueezy/router.jsto Vercel - Set env vars
- Test
/activateand/validateendpoints
- Deploy
Update CTAs (30 min)
- Change "Get License Key" → "Buy Now" on Pro page
- Add actual pricing ($99/year)
- Link to checkout page
Test purchase (1 hour)
- Make test purchase in LS test mode
- Verify key delivery via email
- Test activation on demo site
- Confirm AI SEO features work
Done! You're now generating revenue.
Revenue Projections (Conservative)
Assumptions:
- 100 Pro page visitors/month
- 2% conversion rate (industry avg for dev tools)
- $99 Site license
Monthly revenue: 100 × 0.02 × $99 = $198/month Annual revenue: $2,376/year
With growth:
- 500 visitors/month → $990/month ($11,880/year)
- 1,000 visitors/month → $1,980/month ($23,760/year)
Add Agency licenses (30% of customers upgrade):
- Site: 70% × $99 = $69.30 avg
- Agency: 30% × $299 = $89.70 avg
- Blended average: $159/customer
Revised annual revenue (1,000 visitors/month):
- 1,000 × 0.02 × $159 × 12 = $38,160/year
Next Steps
Priority 1 (Critical):
- Set up LemonSqueezy store + products
- Create
/checkout.mdxpage with real pricing - Deploy backend proxy with LS credentials
Priority 2 (Important): 4. Configure post-purchase email templates 5. Upload Pro ZIP to LS for auto-delivery 6. End-to-end test purchase
Priority 3 (Nice to have): 7. Create demo video 8. Launch on ProductHunt 9. SEO optimization (long-tail content)
Start here: Create LemonSqueezy account and set up your first product. That's the blocker for everything else.