From Scraping Tweets to 2.1 Billion Unique Voices — Building an AI Writing Room

Voice Combinations 2.1B
Platforms 4
Commits 784
Stack 5 Services

The Pivot

ThreadMuse started with an intuitive idea: scrape a creator's Twitter timeline, extract their voice patterns with AI, and generate content that sounds like them. The prototype worked. Chrome TLS fingerprint simulation, GraphQL queries against X's internal API, paginated tweet fetching with quoted tweet extraction.

Three problems killed it:

TLS fingerprinting was fragile.

X's anti-bot detection evolved faster than the scraper. Every platform update risked breaking the pipeline. Building on someone else's closed API is the opposite of antifragile.

It required X credentials from users.

High onboarding friction. Users had to trust a new product with their social media login before seeing any value. The conversion funnel had a wall at step one.

Scraping wasn't the value.

The actual value was generating good content in a consistent voice. The voice didn't need to come from tweets — it needed to come from the creator's own description of how they write.

The pivot: replace scraping with deterministic voice seeds and a writing room brief.

The Voice Seed System

A 6-character alphanumeric seed (e.g., E47DEC) is SHA-256 hashed to deterministically produce 4 voice dimensions, each on a 0-100 scale:

36^6 = 2.17 billion possible voice fingerprints. Every seed is deterministic and shareable — the same seed always produces the same voice. The same hash also derives a visual style: primary color, accent color, and background pattern.

The UX is a slot machine. Users spin for a voice they like, preview how it sounds, and lock it in. 5 spins per day free, unlimited on Pro.

Layer 2 — The Writing Room Brief: Five fields the creator fills in their own words: who they are, their audience, topics and off-limits, signature phrases and quirks, content goals. This becomes direct prompt context alongside the voice seed parameters.

The assembled prompt sends both layers to Claude: the mathematical voice fingerprint from the seed, and the human-written creative brief. No scraping. No third-party credentials. No fragile dependencies.

The Pipeline Evolution

v1: Pipedream (Cloud Workflows)

The first pipeline used Pipedream for async content generation. Webhook triggers from Next.js, JavaScript processors in the cloud. It worked, but had two fatal flaws: no version control (deploy = manual copy-paste in the Pipedream UI) and object serialization edge cases that required stringifying complex objects for template literal compatibility.

v2: Self-Hosted BullMQ Worker

Replaced Pipedream with a self-hosted Fastify + BullMQ worker. Redis queue, configurable concurrency, exponential backoff retries, dead letter queue. Deploy is rsync + systemd restart — version-controlled, observable, debuggable. The processor logic was a direct port of the Pipedream JavaScript. The runtime changed, the business logic didn't. The migration was subtraction: remove the cloud dependency, keep the proven logic.

The content generation flow:

1. User submits batch request (platforms, content types, hook formulas, 1-30 days). 2. Vercel API creates batch record, enqueues to worker. 3. Worker iterates: for each day x platform x content type, builds prompt from voice seed + brief + content pillar + hook formula. 4. Claude Sonnet generates content text. 5. Worker enqueues image generation jobs. 6. Capper AI (Gemini-backed) generates branded images matching the voice's visual style. 7. Images upload to Cloudflare R2. 8. Completion email via Mailgun.

6 hook formulas: FOMO, Curiosity Gap, Speed/Efficiency, Transformation, Social Proof, Contrarian.

The Stack

Layer Technology Role
Frontend Next.js 16, React 19, Vercel App shell, API routes, auth
Database Neon PostgreSQL, Drizzle ORM Users, batches, content, subscriptions
Worker Fastify + BullMQ + Redis Async content and image generation
AI Content Claude Sonnet (Anthropic API) Voice-matched text generation
AI Images Capper AI (Gemini-backed) Branded image generation
Storage Cloudflare R2 Generated image hosting
Payments LemonSqueezy Subscription billing, reverse trial
Email Mailgun Magic link auth, batch completion
Auth NextAuth v5 Credential-based authentication

Monetization

Reverse trial model: the first 3 batches generate clean, unbranded content. After that, output is watermarked unless the user subscribes to Pro ($19/month via LemonSqueezy).

The webhook handler covers the full subscription lifecycle: created, updated, cancelled, resumed, payment_failed (grace period as past_due), expired. HMAC-SHA256 signature verification on every webhook. Atomic SQL prevents race conditions on trial batch consumption.

This is the opposite of "free forever with ads." The product demonstrates full value upfront, then the watermark creates natural conversion pressure.

The Numbers

2.1B
Voice Fingerprints
784
Commits over 10 Months
4
Platforms
6
Hook Formulas
30 days
Max Content per Batch
5
Services in the Stack
$19/mo
Pro Subscription
3
Free Batches (Reverse Trial)

Key Takeaways

Frequently Asked Questions

How does ThreadMuse generate content in a specific voice?

ThreadMuse uses a two-layer system. A 6-character alphanumeric seed is SHA-256 hashed to produce 4 voice dimensions (formal/casual, serious/funny, respectful/irreverent, enthusiastic/matter-of-fact). The creator then writes a 5-field brief describing their style, audience, and goals. Both layers feed into Claude's prompt to generate voice-matched content.

What platforms does ThreadMuse support?

ThreadMuse generates content for Twitter/X, TikTok, Instagram, and Instagram Reels. Each platform gets format-appropriate content: thread hooks for Twitter, short-form scripts for TikTok, captions for Instagram, and reel concepts for Reels.

How much does ThreadMuse cost?

ThreadMuse uses a reverse trial model. The first 3 batches are free and fully functional. After that, content is watermarked unless you subscribe to Pro at $19/month. No credit card required to start.

What AI models does ThreadMuse use?

Claude Sonnet by Anthropic generates all text content. Capper AI (backed by Google Gemini) generates branded images that match each voice seed's visual style. Both models are called via API from a background worker.

How many voice combinations are possible?

2.17 billion. The 6-character alphanumeric seed has 36^6 possible values, each producing a unique combination of 4 voice dimensions. Seeds are deterministic — the same seed always produces the same voice parameters.

Can I generate content in bulk?

Yes. Each batch can generate up to 30 days of content across multiple platforms and content types simultaneously. The background worker processes each combination asynchronously with retry logic and delivers a completion email when done.