Skip to content

vagxrth/rhetro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Name

Rhetro: AI Podcast Application

Introduction

A cutting-edge AI podcast application that simplifies content creation. It converts text into high-quality speech and generates eye-catching thumbnails using advanced AI models. Perfect for both seasoned podcasters and beginners, Rhetro streamlines the production process, letting you focus on delivering engaging content.

Tech Stack

  • Next.js 14 (App Router)
  • TailwindCSS
  • Shadcn UI
  • Google TTS
  • Gemini
  • Clerk
  • Convex
  • Sentry
  • Databuddy (analytics)

Features

  • Convert your written content into high-quality, natural-sounding speech, making podcast production faster and more efficient.
  • Generate visually appealing and professional-looking thumbnails for your podcast with the help of advanced AI models, ensuring your podcast stands out.

Video

rhetro.mp4

Architecture

Rhetro is split between a Next.js frontend and a Convex backend-as-a-service. There is no custom server β€” all server-side logic runs as Convex functions (queries, mutations, actions, HTTP routes).

Browser ──► Next.js (App Router)                   ──► Convex (DB + Storage + Actions) ──► Google APIs (TTS / Gemini)
                  β”‚                                          β–²
                  β”‚                                          β”‚
                  └── Clerk (auth + hosted UI) ──► svix webhook ──► Convex /clerk

Frontend β€” app/

  • Route groups: (auth) for /signin, /signup; (root) for the authenticated shell (create, discover, podcasts, profile).
  • middleware.ts protects every non-public route via Clerk.
  • Root layout wires up ConvexClerkProvider (Convex client authenticated with Clerk JWTs), AudioProvider, and Databuddy analytics.

Backend β€” convex/

  • schema.ts β€” podcasts (with search indexes on author, title, description) and users tables.
  • podcasts.ts, users.ts β€” CRUD, search, view counting, top-creator queries.
  • files.ts β€” issues pre-signed upload URLs for Convex Storage (audio + thumbnail blobs).
  • googleTTS.ts β€” Convex action calling Google Cloud TTS for MP3 synthesis.
  • gemini.ts β€” Convex action calling Gemini gemini-3-pro-image-preview for thumbnails.
  • http.ts β€” POST /clerk HTTP route that verifies svix signatures and mirrors Clerk user.created/updated/deleted events into the users table.
  • auth.config.ts β€” trusts the Clerk JWT issuer so ctx.auth.getUserIdentity() works inside queries/mutations.

Observability β€” Sentry is wired through next.config.mjs (withSentryConfig) plus sentry.{client,server,edge}.config.ts and instrumentation.ts.

Deployment

Component Hosted on
Next.js app Vercel
Convex backend Convex Cloud
Auth Clerk (hosted)
File storage Convex Storage
AI inference Google Generative Language API
Error tracking Sentry
Analytics Databuddy

Pushing to main deploys the Next.js app to Vercel. The Convex backend is deployed separately with npx convex deploy (typically wired into the same CI step).

Local Development

Two processes need to run side-by-side: the Next.js dev server and the Convex dev server.

npm install
npx convex dev   # in one terminal β€” pushes convex/ to your dev deployment, regenerates _generated/
npm run dev      # in another terminal β€” starts Next.js on http://localhost:3000

Environment Variables

Copy .env.example to .env.local and fill in:

Variable Source
CONVEX_DEPLOYMENT Set automatically by npx convex dev (CLI-only, used to push code)
NEXT_PUBLIC_CONVEX_URL Convex deployment URL β€” used by the browser to open the WebSocket
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Clerk dashboard
CLERK_SECRET_KEY Clerk dashboard
CLERK_WEBHOOK_SECRET Clerk webhook endpoint pointing at <convex-url>/clerk
NEXT_PUBLIC_CLERK_SIGN_IN_URL /signin
NEXT_PUBLIC_CLERK_SIGN_UP_URL /signup

Convex actions also need GOOGLE_GENERATIVE_AI_API_KEY β€” set this in the Convex dashboard (Environment Variables), not in .env.local, since the actions execute on the Convex backend, not in Next.js.

About

π˜Ύπ™π™€π˜Όπ™π™€ π™Šπ™ π™‡π™„π™Žπ™π™€π™‰.

Topics

Resources

Stars

Watchers

Forks

Contributors