How akramj13/ai-voice works
Main Components
• Frontend Interface:
• Next.js pages (e.g., app/page.js, app/layout.js) and the overall app structure including authentication pages under "app/(auth)".
• Dashboard and project creation pages found in "app/dashboard" and "app/dashboard/create-new".
• Shared UI components (under "components/ui" and "components/theme-provider.jsx") that provide the themes, alerts, buttons, and toggles, as well as global styling with Tailwind CSS.
• API Endpoints:
• Located under "app/api", these endpoints include:
▪ /generate-audio (voice synthesis using ElevenLabs)
▪ /generate-caption (auto-captioning using AssemblyAI)
▪ /get-video-script (content generation via Google Gemini AI)
• Backend & Database:
• A Neon PostgreSQL database configured via Drizzle ORM (see "configs/db.js", "configs/schema.js").
• The Drizzle configuration in "drizzle.config.js" ties the database operations together.
• External Services:
• ElevenLabs (for voice synthesis), AssemblyAI (for captions), Google Gemini AI (for content generation), AWS S3 for file storage, and Clerk for user authentication.
Analyzing Relationships & Interactions
• Users access the frontend application, navigating to the authentication pages and the dashboard.
• Upon initiating a voice synthesis project, the frontend communicates with API endpoints:
• The API layer manages calls and responses from the corresponding third-party services.
• For example, when generating audio, the frontend sends a request to "app/api/generate-audio/route.js" which in turn interacts with ElevenLabs.
• The API layer also handles database operations (using Drizzle ORM) to store user data, project configurations, and possibly metadata about generated content.
• The application integrates external services for content processes (like captioning and text generation), so the data flows from the frontend → API endpoints → External Services, and back with the processed results.