Inspiration
Every content creator — regardless of niche — burns hours on the same unglamorous loop before they ever pick up a camera: figuring out what's actually trending, coming up with an angle, writing a script, and then, after publishing, digging back through comments and stats to figure out what worked. That loop is repetitive, it's the same shape for a health creator as it is for a gaming creator, and it eats time that should go into the part only a human can do — actually making the content.
We wanted to automate that entire loop, not just one slice of it. Most "AI content tools" stop at the script. We were specifically inspired to push further into actually rendering a watchable video — an idea in the same spirit as open-source tools like MoneyPrinterTurbo (topic → script → narrated short video), but built independently, on our own stack, with our own architecture, and extended with a feature we felt was missing everywhere: a real feedback loop back from the published video's actual performance, not just a one-way content firehose.
What it does
Viralize takes a creator from "what should I make next" to a scheduled, trackable video, end to end:
- Pick a niche — Education, Health & Wellness, Finance & Business, Technology, Gaming, Beauty & Fashion, Food & Cooking, or Travel
- Discover trends — live data pulled from the YouTube Data API and Google Trends, ranked by an LLM (Groq) with a plain-language reason for each pick
- Generate content — a full script, title, description, hashtags, and visual search keywords from the topic you chose, editable before you commit to anything
- Render a real video — AI narration (TTS), matching stock footage, and burned-in subtitles composed by ffmpeg into an actual 1080×1920 MP4 you can preview and download
- Schedule it — date, time, and a Publishing Method: Manual Upload (fully functional) or Auto-post via OAuth (an honestly-labeled UI demo of the connect-account pattern — see Challenges below for why we drew that line)
- Track real performance — once you upload the video yourself and link it back by URL, the app pulls real views/likes/comments over time and the actual top comments straight from YouTube
Every stage above calls a real external API and produces real output. There's no seeded "demo dataset" standing in for a feature anywhere in this flow.
How we built it
Single stack, no separate backend: Next.js 16 (App Router) with TypeScript, Tailwind CSS v4, and SQLite via Prisma 7. AI generation runs on Groq (openai/gpt-oss-120b) with strict JSON-schema structured outputs, used twice in the pipeline — once to rank trending topics with reasoning, once to generate the full script and metadata.
The video pipeline is the part we're most proud of technically: msedge-tts for free narration, the Pexels API for stock footage matched against AI-extracted visual keywords, and ffmpeg-static/ffprobe-static invoked directly through child_process (not a wrapper library) to composite footage, narration, and burned-in subtitles into the final MP4. Subtitle timing is derived proportionally from the script's known text and the rendered narration's duration — no speech-to-text step required, since we already generated the exact words being spoken.
Real analytics run on a simple pull model: the user clicks "Refresh," and we hit the YouTube Data API's videos.list and commentThreads.list endpoints, store a timestamped snapshot, and chart the history with Recharts.
Challenges we ran into
- Google's Gemini API key format was silently broken. The new
AQ.-prefixed key format threw a 401 against the Developer API's REST endpoint — a confirmed, unresolved bug on Google's side, not our code. We switched the entire generation layer to Groq mid-build. - Reddit stopped being viable as a trend source. It closed self-service API app creation in November 2025 and killed the old unauthenticated endpoints in May 2026. Rather than build against an access model we couldn't rely on, we dropped it and doubled down on YouTube + Google Trends as real, stable sources.
fluent-ffmpegturned out to be deprecated. We rewrote the composition layer to invoke theffmpeg-static/ffprobe-staticbinaries directly, which also meant handling Windows path-escaping quirks in filter strings by hand.- Turbopack silently broke native binary resolution. Packages that resolve paths via
__dirname(ffmpeg-static,ffprobe-static,msedge-tts) failed withENOENTuntil we foundserverExternalPackagesinnext.config.ts. - Deciding what to fake, and refusing to fake it quietly. Real per-platform auto-posting needs an app review process that takes weeks per platform — not realistic for this build. Instead of skipping the feature or silently mocking it, we built "Auto-post via OAuth" as a UI demo that is explicitly labeled as one everywhere it appears, so it's never mistaken for a working integration.
Accomplishments that we're proud of
Getting through the entire pipeline — niche → live trend data → AI script → a real rendered, watchable MP4 → schedule → real YouTube analytics — with zero simulated steps except the one we chose to label honestly rather than hide. Watching a topic that was trending on YouTube minutes earlier turn into an actual video file with synced subtitles, composed entirely by our own ffmpeg pipeline, was the moment this stopped feeling like a demo and started feeling like a tool. We're also proud of keeping the design itself to a genuinely deliberate, non-generic system (cyan-teal "Trust & Calm" palette, Calistoga/Inter/JetBrains Mono type system) rather than shipping the default look most AI-tool templates fall into.
What we learned
That "real" is almost always more work than "mocked," but it's also where the actual interesting engineering lives — proportional subtitle timing instead of reaching for Whisper, direct binary invocation instead of a deprecated wrapper, driver adapters for Prisma 7. We also learned how fast the external API landscape shifts underneath a build (Gemini, Reddit, both moved mid-project) and that designing the aggregation layer to degrade gracefully when one source fails, instead of assuming every API call succeeds, paid off directly.
What's next for Viralize
- Making Auto-post via OAuth genuinely functional for one platform, going through the real app-review process
- Automatic thumbnail generation from an extracted frame or an AI-generated cover
- Batch generation — multiple script/video variants per topic to choose from
- LLM-summarized comment themes ("what people are actually saying," aggregated) as an extra layer on top of the top-comments list
- Multi-user support for small teams sharing a content calendar
Log in or sign up for Devpost to join the conversation.