{"id":28996772,"url":"https://github.com/hunkim/solar-podcast-gen","last_synced_at":"2025-06-25T05:11:30.104Z","repository":{"id":296918690,"uuid":"994969289","full_name":"hunkim/solar-podcast-gen","owner":"hunkim","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-03T05:23:15.000Z","size":199,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-03T11:05:13.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://solar-podcast-gen.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hunkim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T19:05:56.000Z","updated_at":"2025-06-03T05:22:58.000Z","dependencies_parsed_at":"2025-06-03T11:05:23.844Z","dependency_job_id":"63a3f131-9c22-4575-9de4-207f635f082f","html_url":"https://github.com/hunkim/solar-podcast-gen","commit_stats":null,"previous_names":["hunkim/solar-podcast-gen"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hunkim/solar-podcast-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-podcast-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-podcast-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-podcast-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-podcast-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunkim","download_url":"https://codeload.github.com/hunkim/solar-podcast-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-podcast-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808072,"owners_count":23212694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-25T05:11:29.407Z","updated_at":"2025-06-25T05:11:30.092Z","avatar_url":"https://github.com/hunkim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Video Podcast Generator\n\nA Next.js application that transforms documents and text into engaging video and podcast content using AI.\n\n## Features\n\n- **Document Upload \u0026 Parse**: Upload various document formats (PDF, DOC, DOCX, TXT, images) and extract text using [Upstage Document Parse API](https://console.upstage.ai/docs/capabilities/document-digitization/document-parsing)\n- **Text Input**: Direct text input for content generation\n- **Drag \u0026 Drop**: Modern file upload with drag and drop functionality\n- **AI-Powered Script Generation**: Generate engaging podcast scripts with Solar Pro2 LLM\n- **Web Research Integration**: Enrich content with real-time web search using Tavily API\n- **Progressive Generation**: Real-time progress tracking with streaming updates\n- **Professional Scripts**: Create tiki-taka style conversational scripts between two hosts\n- **User Authentication**: Secure Google authentication with Firebase\n- **Generation History**: Save and track all your podcast generations with Firestore\n- **Progress Persistence**: Resume interrupted generations and view detailed history\n\n## Setup\n\n### 1. Install Dependencies\n\n```bash\npnpm install\n```\n\n### 2. Environment Variables\n\nCreate a `.env.local` file in the root directory and add your API keys and Firebase configuration:\n\n```env\n# Upstage Document Parse API Key\n# Get your API key from https://console.upstage.ai/\nUPSTAGE_API_KEY=your_upstage_api_key_here\n\n# Tavily Search API Key (for web research)\n# Get your API key from https://tavily.com/\nTAVILY_API_KEY=your_tavily_api_key_here\n\n# Firebase Client Configuration (these can be public)\nNEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyCBqLyjbvPphduOCa_ohwYKXXrfn5nV6rs\nNEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=solar-podcast-flow.firebaseapp.com\nNEXT_PUBLIC_FIREBASE_PROJECT_ID=solar-podcast-flow\nNEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=solar-podcast-flow.firebasestorage.app\nNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=407483710709\nNEXT_PUBLIC_FIREBASE_APP_ID=1:407483710709:web:6a0ff3bddd138e0316d9bc\n\n# Firebase Admin SDK (keep these secret - server-side only)\nFIREBASE_PROJECT_ID=solar-podcast-flow\nFIREBASE_CLIENT_EMAIL=firebase-adminsdk-fbsvc@solar-podcast-flow.iam.gserviceaccount.com\nFIREBASE_PRIVATE_KEY=\"-----BEGIN PRIVATE KEY-----\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCt666WQR979cg5\\nPUEMWZjn0Cywoyt3qsl5zK6pD53E8aLjXsMAHeN2AClr9zE4jxQonqsPPQarSrfO\\nQlwcY5U+Oohwm1JUiRJQPEqpXem4IenVd/EQe6ZqQmWA8CmJCy+CmPxBjUVLe0dT\\niqkkB4pMI34anzJyfUvurgUXKB9DDM0vRyUJ5iE+37cQgy21/pGp/e3tDgETZD2K\\nnZSRgV1boEMxYH6IC7993NB1D/ufiSSQ1i4/kpXI40Ric7ga/iZHRTk1tzB/0LEQ\\nGzbTIkSFJuFJLPh8ARIEC3CyMEb3DUIJKJHlwnLc962DSdGmXYzjTWwF3Va3Bnav\\no3OwN3GrAgMBAAECggEAHCofgruXEqbxvrs5rntP9LJUmmJCJsXkjLHl0wDxZrRO\\n0Y1F/N3aOQC7tH06XlNlS1KulvAmBVU7QM6kRgCmaYZnE/1D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grt\\nAvGtJZL+ophsdMvtwNiDAvcefpqzR+qoExuS7r+nizk67/8TomFXhrmDqjdnDxjJ\\n0+BeO4tbeKgc6xmmSGCu8bf3\\n-----END PRIVATE KEY-----\\n\"\n```\n\nTo get API keys:\n\n**Upstage API Key:**\n1. Visit [Upstage Console](https://console.upstage.ai/)\n2. Sign up or log in\n3. Navigate to API Keys section\n4. Create a new API key\n5. Copy the key to your `.env.local` file\n\n**Tavily API Key:**\n1. Visit [Tavily](https://tavily.com/)\n2. Sign up for an account\n3. Go to your dashboard\n4. Generate an API key\n5. Copy the key to your `.env.local` file\n\n**Firebase Configuration:**\nThe Firebase configuration provided above is already set up for your project. The client configuration (NEXT_PUBLIC_*) is safe to expose publicly, while the admin SDK configuration should be kept secret.\n\n### 3. Run the Development Server\n\n```bash\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Authentication \u0026 Data Persistence\n\nThe application now includes Firebase integration for:\n\n### 🔐 **User Authentication**\n- Google Sign-In with Firebase Auth\n- Secure session management\n- User profile integration\n- Protected routes and features\n\n### 💾 **Data Persistence**\n- **Generation History**: All podcast generations are saved to Firestore\n- **Progress Tracking**: Real-time generation progress stored in database\n- **Resume Capability**: Resume interrupted generations\n- **User Collections**: Each user has their own private data\n\n### 📊 **Firestore Collections**\n- `users/{userId}` - User profile and preferences\n- `generations/{generationId}` - Individual podcast generation records\n- `progress/{generationId}` - Real-time generation progress tracking\n\n## Podcast Generation Features\n\nThe application now includes a complete podcast script generation pipeline:\n\n### 🎯 Structured Generation Process\n\n1. **Content Analysis**: Analyze input content and instructions\n2. **Outline Creation**: Generate structured podcast sections with LLM\n3. **Web Research**: Enrich content with real-time search results via Tavily\n4. **Script Writing**: Create engaging conversational scripts for each section\n5. **Final Polish**: Combine and refine the complete script\n\n### 🤖 AI-Powered Features\n\n- **Solar Pro2 LLM**: High-quality script generation with reasoning\n- **Streaming Generation**: Real-time progress updates\n- **Tavily Search Integration**: Automatically find relevant, up-to-date information\n- **Smart Query Generation**: Context-aware search queries based on content\n- **Conversational Style**: Natural tiki-taka dialogue between two hosts\n\n### 📝 Script Features\n\n- Professional podcast format with two hosts (Alex and Jordan)\n- Natural conversational flow with smooth transitions\n- Integration of search results and current information\n- Customizable tone, style, and target audience\n- Stage directions and timing cues\n- Easy copy/download functionality\n\n## File Upload Feature\n\nThe application supports uploading various document types:\n\n- **PDF files**: Extract text and structure from PDF documents\n- **Word documents**: .doc and .docx files\n- **Text files**: Plain text files\n- **Images**: .png, .jpg, .jpeg files with OCR capabilities\n\n### Supported Features:\n\n1. **Drag \u0026 Drop Upload**: Simply drag files onto the upload area\n2. **Click to Browse**: Traditional file selection\n3. **Real-time Processing**: See upload and processing progress\n4. **Text Preview**: View and edit extracted text before generating content\n5. **Document Metadata**: View page count and element information\n6. **Error Handling**: Clear error messages for unsupported files or API issues\n\n### File Limits:\n\n- Maximum file size: 10MB\n- Supported formats: PDF, DOC, DOCX, TXT, PNG, JPG, JPEG\n\n## Usage\n\n1. **Choose Input Method**: Select between \"Text Input\" or \"Document Upload\" tabs\n2. **Provide Content**: \n   - For text: Paste or type your content directly\n   - For documents: Upload your file using drag \u0026 drop or file browser\n3. **Review Extracted Text**: If using document upload, review and edit the extracted text\n4. **Add Instructions**: Specify how you want your content generated (style, tone, length, etc.)\n5. **Generate Content**: Click the generate button to start the AI-powered script creation\n6. **Watch Progress**: Monitor real-time generation progress with detailed stage tracking\n7. **Review \u0026 Edit**: Review the generated script and make any necessary adjustments\n8. **Export**: Copy to clipboard or download the final script\n\n## API Integration\n\nThe application integrates with multiple powerful APIs:\n\n### Upstage Document Parse API\n- Multiple output formats (HTML, text)\n- OCR for scanned documents and images\n- Coordinate information for precise element positioning\n- Table extraction with base64 encoding\n- Multi-page document processing\n\n### Upstage Solar Pro2 LLM\n- High-quality natural language generation\n- Reasoning capabilities for better outputs\n- Streaming responses for real-time updates\n- Customizable parameters (temperature, max tokens)\n\n### Tavily Search API\n- Real-time web search optimized for AI\n- Advanced search depth options\n- Content filtering and ranking\n- Reliable, up-to-date information retrieval\n\nFor more information:\n- [Upstage Document Parse](https://console.upstage.ai/docs/capabilities/document-digitization/document-parsing)\n- [Tavily Search API](https://tavily.com/)\n\n## Development\n\nThe podcast generation feature is built with:\n\n- **Frontend**: React components with TypeScript\n- **Backend**: Next.js API routes with streaming support\n- **LLM Integration**: Solar Pro2 with structured output\n- **Search Integration**: Tavily API for web research\n- **File Processing**: Upstage Document Parse API\n- **UI Components**: Radix UI with Tailwind CSS\n- **Real-time Updates**: Server-Sent Events (SSE)\n\nKey files:\n- `lib/llm.ts`: LLM service with streaming support\n- `lib/search.ts`: Web search integration with Tavily\n- `lib/podcast-generator.ts`: Main podcast generation logic\n- `components/podcast-generation.tsx`: Real-time generation UI\n- `components/file-upload.tsx`: File upload with progress tracking\n- `app/api/generate-podcast/route.ts`: Streaming API endpoint\n- `app/api/parse-document/route.ts`: Document processing endpoint\n\n## Security Notes\n\n- All API keys are stored securely in environment variables\n- File processing happens on the server side to protect API credentials\n- Client-side validation prevents unauthorized file uploads\n- Files are processed in memory and not stored permanently\n- Streaming responses prevent API key exposure\n- CORS headers properly configured for security ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-podcast-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunkim%2Fsolar-podcast-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-podcast-gen/lists"}