Skip to content

Samarth-T17/murfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Murphy - AI-Powered Podcast Generator

Next.js React TypeScript MongoDB TailwindCSS

Generate professional podcasts from ideas using AI-powered content creation and multi-language voice synthesis


🌟 Features

πŸ€– AI-Powered Content Generation

  • Smart Content Creation: Transform simple ideas into comprehensive podcast scripts using Google's Gemini AI
  • Multiple Themes: Choose from 8 different podcast styles (Casual, Professional, Educational, Entertaining, etc.)
  • Intelligent Script Structure: Automatically generates titles, descriptions, and structured content with speaker assignments

🎧 Multi-Language Audio Generation

  • 7 Supported Languages: English, Hindi, Bengali, French, German, Italian, Tamil
  • Multiple Voice Options: Choose from a variety of high-quality voices for each language
  • Multi-Speaker Support: Add up to 5 different speakers per language for dynamic conversations
  • Audio Playback & Download: Built-in audio player with download functionality

πŸ“š Podcast Management

  • Personal Library: Browse and manage all your generated podcasts
  • User Authentication: Secure login/signup with NextAuth
  • All Podcasts vs My Podcasts: Toggle between viewing all podcasts and your personal creations
  • Search & Filter: Find podcasts by title, description, or content

🎨 Modern UI/UX

  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Beautiful Components: Built with Radix UI and TailwindCSS
  • Dark/Light Mode: Automatic theme switching support
  • Real-time Feedback: Toast notifications and loading states

πŸš€ Getting Started

Prerequisites

Before running this application, make sure you have:

  • Node.js (version 18 or higher)
  • npm or yarn package manager
  • MongoDB database (local or MongoDB Atlas)
  • Google Gemini API key
  • Azure Blob Storage account (for audio file storage)

Environment Variables

Create a .env.local file in the root directory with the following variables:

# Database
MONGODB_URI=mongodb://localhost:27017/murphy
# or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/murphy

# NextAuth Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret-key

# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key

# Azure Blob Storage (for audio files)
AZURE_STORAGE_CONNECTION_STRING=your-azure-storage-connection-string
AZURE_STORAGE_CONTAINER_NAME=your-container-name

Installation

  1. Clone the repository

    git clone https://github.com/Samarth-T17/murfy.git
    cd murfy/murphy
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Set up environment variables

    cp .env.example .env.local
    # Edit .env.local with your actual values
  4. Run the development server

    npm run dev
    # or
    yarn dev
  5. Open your browser Navigate to http://localhost:3000


πŸ“ Project Structure

murphy/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js 13+ App Router
β”‚   β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/          # NextAuth endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ generate-audio/ # Audio generation API
β”‚   β”‚   β”‚   └── podcasts/      # Podcast CRUD operations
β”‚   β”‚   β”œβ”€β”€ auth/              # Authentication pages
β”‚   β”‚   β”‚   β”œβ”€β”€ signin/        # Sign in page
β”‚   β”‚   β”‚   └── signup/        # Sign up page
β”‚   β”‚   β”œβ”€β”€ generate-podcast/  # Podcast creation interface
β”‚   β”‚   β”œβ”€β”€ podcasts/          # Podcast browsing & details
β”‚   β”‚   β”‚   └── [id]/          # Individual podcast page
β”‚   β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”‚   β”œβ”€β”€ layout.tsx         # Root layout component
β”‚   β”‚   └── page.tsx           # Homepage
β”‚   β”œβ”€β”€ components/            # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ ui/               # Shadcn/ui components
β”‚   β”‚   └── Navigation.tsx     # Main navigation component
β”‚   β”œβ”€β”€ lib/                   # Utility libraries
β”‚   β”‚   β”œβ”€β”€ auth.ts           # NextAuth configuration
β”‚   β”‚   β”œβ”€β”€ firebase.ts       # MongoDB connection & operations
β”‚   β”‚   β”œβ”€β”€ voices.ts         # Voice options for TTS
β”‚   β”‚   β”œβ”€β”€ langVoiceType.ts  # Language-voice mapping types
β”‚   β”‚   └── utils.ts          # General utilities
β”‚   β”œβ”€β”€ gemini/               # Google Gemini AI integration
β”‚   β”‚   └── content.ts        # Content generation logic
β”‚   └── murphy/               # Additional modules
β”‚       └── contents.ts       # Content management
β”œβ”€β”€ public/                   # Static assets
β”œβ”€β”€ package.json             # Dependencies and scripts
β”œβ”€β”€ next.config.ts          # Next.js configuration
β”œβ”€β”€ tailwind.config.js      # TailwindCSS configuration
└── tsconfig.json          # TypeScript configuration

πŸ› οΈ Technologies Used

Frontend

  • Next.js 15.5.0 - React framework with App Router
  • React 19.1.0 - UI library
  • TypeScript 5.0 - Type-safe JavaScript
  • TailwindCSS 4.0 - Utility-first CSS framework
  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful icons

Backend & Database

  • MongoDB - NoSQL database for podcast storage
  • NextAuth.js - Authentication solution
  • Azure Blob Storage - Cloud storage for audio files

AI & Voice

  • Google Gemini AI - Content generation
  • MURF API's - Multi-language voice synthesis
  • FFmpeg - Audio processing

Development Tools

  • ESLint - Code linting
  • Prettier - Code formatting
  • Turbopack - Fast bundler for development

🎯 Usage Guide

Creating Your First Podcast

  1. Sign Up/Login

    • Navigate to the authentication page
    • Create an account or sign in with existing credentials
  2. Generate Content

    • Go to "Generate Podcast" page
    • Enter your podcast idea
    • Select a theme (Casual, Professional, Educational, etc.)
    • Click "Generate Content" to create your script
  3. Configure Audio

    • Choose target languages for audio generation
    • Select voice options for each language
    • Add multiple speakers if desired (up to 5 per language)
  4. Generate Audio

    • Review and edit the generated content if needed
    • Click "Generate Audio" to create voice files
    • Preview audio with built-in player
    • Download generated audio files
  5. Manage Podcasts

    • View all your podcasts in the "My Podcasts" section
    • Browse community podcasts in "All Podcasts"
    • Search and filter podcasts by content

Advanced Features

Content Editing

  • Switch between "Generated" and "Edited" tabs
  • Make custom modifications to AI-generated content
  • Real-time word count tracking
  • Copy content to clipboard

Multi-Language Support

  • Generate podcasts in multiple languages simultaneously
  • Language-specific voice selection
  • Automatic script translation (when supported)

Voice Customization

  • Choose from various voice personas
  • Add/remove speakers dynamically
  • Preview voice options before generation

πŸ”§ API Reference

Authentication Endpoints

POST /api/auth/signin          # User sign in
POST /api/auth/signup          # User registration
GET  /api/auth/session         # Get current session

Podcast Management

GET    /api/podcasts           # Get all podcasts or user's podcasts
GET    /api/podcasts/[id]      # Get specific podcast
POST   /api/podcasts           # Create new podcast
PUT    /api/podcasts/[id]      # Update podcast
DELETE /api/podcasts/[id]      # Delete podcast

Audio Generation

POST /api/generate-audio       # Generate audio from content

πŸ” Security Features

  • Secure Authentication - NextAuth.js with secure session handling
  • Password Hashing - bcryptjs for secure password storage
  • Environment Variables - Sensitive data protection
  • API Route Protection - Server-side authentication checks
  • Input Validation - Client and server-side validation

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Use meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Follow the existing code style

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • MURF AI - For providing TTS and translation api
  • Google Gemini AI - For intelligent content generation
  • Radix UI - For accessible component primitives
  • MongoDB - For reliable database services
  • Azure - For media storage and deployment

πŸ“ž Support


Made with ❀️ by Samarth and Pavan :)

⭐ Star this repository β€’ πŸ› Report Bug β€’ ✨ Request Feature

About

Murf Coding Challenge 4 solution : Murphy - An an AI Powered Podcast Generator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •