# How to Vibe Code Your Own Castmagic (and Stop Paying for It)

> AI-powered content operating system for audio and video

- Site: https://castmagic.io
- Category: AI Content Repurposing SaaS
- Verdict: **Solid side project** (62/100 vibecodeable)
- Estimated effort: 3-4 weeks of focused development

## Verdict

Build a solid subset of this product for personal workflow automation, but expect serious friction with long-running audio transcription and background job pipelines.

While a solo developer can string together Next.js, an AI API, and SQLite to create an MVP that accepts audio and drafts blog posts, building a reliable clone requires wrestling with asynchronous audio chunking, OpenAI/Deepgram timeout handling, vector database embeddings for semantic search, and large file storage limits. If your goal is just repurposing your own podcasts, a custom script or a lean weekend tool is more rational than building a full SaaS clone.

### What you can't replicate

- The massive active user base and proven scaling infrastructure processing millions of minutes
- Official integrations and community prompt marketplaces
- Established brand trust and enterprise case studies

## What it does

Transforms long-form audio and video recordings into structured, multi-channel marketing assets, transcripts, and semantic search libraries.

### Core features

- Multi-source media import (YouTube, URLs, file upload up to 10GB)
- Asynchronous transcription and speaker diarization queue
- AI content generation engine with custom prompt templates
- Brand voice training and vocabulary tuning
- Semantic search and vector indexing over historical media libraries
- Multi-brand workspace management and team role permissions
- Media clipping studio and export pipelines

## The business

### Pricing

- Hobby: $19/mo — For individual creators starting out with AI content workflows
- Starter: $48/mo — For growing content creators and single-person operations
- Team: $139/mo — For agencies and content teams running multi-brand workflows

Founded 2023.
Team size: Small lean team.

## The hard parts

- Managing robust asynchronous transcription and AI generation worker queues without timeouts
- Implementing performant semantic search and vector chunking across multi-hour transcripts
- Handling large media file uploads (up to 10GB) and reliable storage pipelines
- Building a synchronized timeline media clipping and export interface

## How to vibe code Castmagic

### Prerequisites

- Node.js (free): Runtime environment for Next.js full-stack development
- GitHub (free): Version control and deployment pipeline source repository
- OpenAI / Anthropic API Keys (Pay-as-you-go): Required for Whisper transcription and Claude/GPT content generation

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding complex multi-file Next.js architectures and debugging async queues
- Cursor: Ideal for fine-tuning UI components, Tailwind styles, and interactive media player states

### Stack

- Frontend: Next.js (React) with Tailwind CSS and shadcn/ui
- Backend: Next.js Server Actions / API Routes with background worker queues
- Database: Turso (SQLite at the edge) with vector storage support
- Auth: better-auth
- Payments: Stripe
- Other: OpenAI Whisper API for transcription, Anthropic API for AI prompt processing, Cloudflare R2 for media file storage

### Hosting

- Cloudflare (Hosting frontend, API routes, and S3-compatible R2 storage for large media files): $0-5/mo
- Turso (Serverless SQLite database storage with vector capabilities): $0/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize a Next.js project with Tailwind CSS, configure better-auth for local user authentication, and set up Turso SQLite tables for workspaces, recordings, transcripts, and AI-generated assets.

```
Create a new Next.js 16 project configured with TypeScript, Tailwind CSS v4, and App Router. Set up better-auth for email/password authentication backed by a SQLite database via Drizzle ORM or Turso client. Define database schemas for 'workspaces', 'recordings' (storing title, file_url, duration, status, speaker_count), 'transcripts' (storing speaker, timestamp, text chunks), and 'assets' (storing asset_type, content, recording_id). Ensure clean directory structure following standard Next.js best practices.
```

2. **Media Upload & Cloudflare R2 Integration** — Build an interface for file uploads (MP3, WAV, MP4) and connect secure multipart uploads directly to Cloudflare R2 storage buckets.

```
Implement a drag-and-drop media upload component in React supporting files up to 10GB (.mp3, .wav, .m4a, .mp4). Create a Next.js API route that generates pre-signed upload URLs for Cloudflare R2 storage to prevent passing large binaries through server memory. Add upload progress tracking UI with active import status indicators mimicking the Castmagic import list.
```

3. **Transcription Pipeline & Speaker Diarization** — Integrate OpenAI Whisper API or an equivalent STT service to process audio files asynchronously, storing timestamped chunks and speaker labels.

```
Build a backend transcription job handler that triggers upon successful media upload. Use the OpenAI Whisper API to transcribe audio files with timestamps enabled. Parse the resulting JSON response into structured transcript blocks with speaker labeling and timestamps. Handle long audio files by chunking audio streams if needed, and update the recording status in Turso from 'transcribing' to 'transcribed'.
```

4. **AI Content Generation & Prompt Templates** — Create an AI generation engine that uses transcript context to produce summaries, show notes, blog posts, and social media copy based on customizable prompt templates.

```
Develop an AI content generation dashboard where users can select a transcribed recording and choose from preset prompt templates (Show notes, LinkedIn post, Newsletter, Blog post). Implement a server action that pulls the recording's transcript, constructs a prompt context window, calls the Anthropic Claude API (Sonnet), and streams or saves the generated output into the 'assets' table. Include options for custom prompt creation and brand-voice tuning parameters.
```

5. **Semantic Search & Workspace Management** — Implement vector search across historical transcripts and multi-brand workspace folder organization with team role permissions.

```
Add semantic search functionality across all historical transcripts using vector embeddings stored in Turso/SQLite. Create a search interface that queries meaning rather than exact keywords and highlights matching transcript timestamps. Additionally, build a workspace switcher component allowing users to organize recordings into folders and assign team access roles (Admin, Editor, Viewer).
```

### Cost vs paying

**Starting costs (one-time):**

- Domain name registration: $12
- Initial AI API credits (OpenAI/Anthropic): $25
- Total: ~$37 one-time

**Ongoing costs (monthly):**

- Cloudflare Workers & R2 Storage: $5/mo
- AI API usage based on volume: ~$10/mo
- Total: ~$15/mo

- Paying for the SaaS instead: $48/mo (Starter Plan)
- Build time: 45-60 hours
- AI tool credits: $20
- Break-even: 1 month vs Starter plan

## Sources

- [Castmagic Official Website](https://castmagic.io)
- [Starter Story - How Castmagic Turned an AI App into a $120,000 Monthly Revenue Stream](https://www.starterstory.com)
- [Refresh Miami - Meet the Miami startup turning conversations into content](https://www.refreshmiami.com)