DEV Community

ZM GT
ZM GT

Posted on

I built an AI Reading List Chrome extension with Claude API, Cloudflare Workers & Stripe

The Problem

I kept saving articles to "read later" and never actually reading them. Sound familiar?

What I Built

SaveSmart - AI Reading List — A Chrome extension that:

  • Saves any webpage with one click
  • Claude AI automatically summarizes it in 3 sentences
  • Auto-categorizes into Tech/Business/News/Learning

Tech Stack

  • Chrome Extension (Manifest V3)
  • Cloudflare Workers (backend, free tier = $0 server cost)
  • Claude API (Haiku model for fast, cheap summarization)
  • Stripe (monthly subscription)
  • Cloudflare Workers KV (premium user storage)

Why This Stack?

Cloudflare Workers — Free tier handles 100k requests/month. For an indie developer, this means $0 server cost until significant scale.

Claude API (Haiku) — Fast and accurate. Cost is roughly $0.50/month during development. Way cheaper than GPT-4 for this use case.

Stripe — Webhook integration with Cloudflare Workers was straightforward. The tricky part: use request.text() instead of request.json() for webhook signature verification.

The Hardest Parts

1. Manifest V3 Service Worker

Chrome's Service Worker is non-persistent. You can't store state between activations. Solution: use chrome.storage.local for everything.

2. CORS in Cloudflare Workers

Chrome extensions need explicit CORS headers. Add OPTIONS handler to every endpoint:

if (request.method === 'OPTIONS') {
  return new Response(null, { headers: corsHeaders });
}
Enter fullscreen mode Exit fullscreen mode

3. Stripe Webhook Signature Verification

This one cost me an hour. Use request.text() NOT request.json():

const body = await request.text(); // ✅
// const body = await request.json(); // ❌ breaks signature
Enter fullscreen mode Exit fullscreen mode

The Business Model

  • Free: Save up to 5 pages
  • Premium: Unlimited saves + AI summary ($4.50/month)

Total Cost to Run

Item Cost
Cloudflare Workers Free
Claude API ~$0.50/month
Stripe 3.6% per transaction
Domain Free (workers.dev)
Total ~$0/month

Try It

🔗 Chrome Web Store

Would love your feedback!

Top comments (0)