Overview
An AI podcast studio built with Next.js 14, Convex and Clerk. A creator describes a topic, GPT-3.5 writes the script, OpenAI's text-to-speech voices it in one of six voices, and DALL-E 3 designs the cover art. Episodes are searchable and play in a player that persists across pages.
Technical Challenges
Keeping Model Calls on the Server
Every model call runs inside a Convex action, so the OpenAI key never reaches the browser. The client uploads the returned audio and artwork straight to Convex file storage, and each podcast record keeps only storage IDs and served URLs. Trending, search (full-text indexes on author, title and description) and profile pages are reactive Convex queries, so new episodes appear without polling.
One Identity Across Two Services
Clerk handles sign-in with GitHub, Google or email. A Svix-verified webhook mirrors user sign-ups, profile updates and deletions into Convex, and Convex validates Clerk-issued JWTs, so every mutation knows who is calling without a separate auth server.
Making Media Load Fast
AI covers arrived as ~3 MB PNGs and took about 3 s each to appear. Covers are now re-encoded to 1024px WebP in the browser before upload (3.1 MB → 139 KB), and a one-off migration converted the existing covers through internal-only Convex mutations. Layout-matched skeletons replace full-page spinners, and the page preconnects to Clerk and Convex while the bundle downloads, which cut the time until the sign-in form appears from 2.0 s to 1.2 s.
Rebrand and Design System
The project was renamed from Gen_shorts to Castreel and moved to a light theme built on semantic CSS-variable tokens shared with the shadcn/Radix primitives. The sign-in page is a CSS-only, auto-scrolling feed of sample shorts and podcasts, which stops moving for visitors who prefer reduced motion.
What's Next
Gemini-generated short-form video, free and paid tiers with server-enforced generation credits, and publishing to YouTube, TikTok and Spotify.
System architecture
Next.js talks to Convex over a reactive WebSocket authenticated with Clerk-issued JWTs, and a Svix-verified webhook mirrors Clerk users into Convex. Convex actions call GPT-3.5, OpenAI TTS and DALL-E 3 so the API key stays server-side; the browser uploads the generated audio and WebP-compressed covers to Convex file storage.


