Skip to content

ericshi03/gptrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽค GPT Rapper

An AI-powered rap application that lets you chat, battle, and collaborate with AI rappers in different styles and personalities.

โœจ Features

  • Chat with AI Rappers: Have conversations with AI rappers in their unique style and personality
  • Rap Battles: Watch AI rappers battle each other or challenge them yourself
  • Studio Sessions: Collaborate with AI rappers to create original lyrics and tracks
  • Multiple Rapper Personalities: Choose from different styles including East Coast, Technical, Conscious, West Coast, and Melodic
  • Real-time AI Generation: Get instant responses and lyrics from AI rappers
  • Custom Rapper Icons: Each rapper has their own unique visual identity

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • OpenAI API key (optional, for enhanced AI responses)

Installation

  1. Clone the repository:
git clone <repository-url>
cd gptrapper
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp env.example .env.local

Edit .env.local and add your OpenAI API key:

VITE_OPENAI_API_KEY=your_openai_api_key_here
  1. Start the development server:
npm run dev
  1. Open your browser and navigate to http://localhost:3000

๐ŸŽต Available Rappers

Notorious GPT (East Coast)

  • Style: Smooth flow, storytelling, street wisdom
  • Era: 1990s
  • Themes: Street life, success, loyalty, Brooklyn, hustle
  • Personality: Confident and street-wise, with smooth, laid-back flow and deep, resonant voice

Elelem (Technical)

  • Style: Lightning-fast delivery, complex rhyme schemes
  • Era: 2000s-2020s
  • Themes: Controversy, skill, struggle, redemption, technical mastery
  • Personality: Aggressive and controversial, with incredible technical skill and rapid-fire delivery

Geminiah Cole (Conscious)

  • Style: Deep lyrics, social commentary, smooth delivery
  • Era: 2010s-2020s
  • Themes: Consciousness, social issues, wisdom, introspection, growth
  • Personality: Thoughtful and introspective, with deep lyrics and social commentary

Kendrick Llama (West Coast)

  • Style: Powerful storytelling, social activism, innovative flows
  • Era: 2010s-2020s
  • Themes: Social justice, revolution, power, storytelling, West Coast
  • Personality: Revolutionary and powerful, with innovative flows and deep social consciousness

Drok (Melodic)

  • Style: Melodic flows, emotional vulnerability, catchy hooks
  • Era: 2010s-2020s
  • Themes: Relationships, success, vulnerability, Toronto, melody
  • Personality: Emotional and vulnerable, with melodic flows and catchy hooks

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 18 + TypeScript
  • Styling: Tailwind CSS
  • State Management: Zustand
  • Routing: React Router DOM
  • Build Tool: Vite
  • AI Integration: OpenAI GPT-4 API
  • Icons: Lucide React
  • Custom Assets: Custom rapper icons and branding

๐ŸŽฏ Usage

Chat Mode

  1. Navigate to the Chat page
  2. Select an AI rapper from the lineup
  3. Start a conversation
  4. The AI will respond in the rapper's unique style and personality

Battle Mode

  1. Go to the Battle page
  2. Select two rappers to battle
  3. Watch them exchange verses with AI-generated battle lyrics
  4. Up to 3 rounds per battle with scoring
  5. Automatic winner determination

Studio Mode

  1. Visit the Studio page
  2. Choose a rapper to collaborate with
  3. Provide prompts for lyrics
  4. Generate and edit your rap with AI assistance

๐Ÿ”ง Configuration

Environment Variables

  • VITE_OPENAI_API_KEY: Your OpenAI API key for enhanced AI responses
  • VITE_APP_NAME: Application name
  • VITE_APP_VERSION: Application version

Customizing Rappers

Edit src/data/rappers.ts to add new rapper personalities or modify existing ones. Each rapper includes:

  • Custom icon path
  • Personality traits
  • Flow characteristics
  • Theme preferences
  • Era-specific references

Token Management

The app includes built-in token tracking to monitor API usage:

  • Real-time token counting
  • Cost estimation
  • Usage display in UI
  • Console logging for debugging

๐Ÿš€ Deployment

Build for Production

npm run build

Deploy to Vercel

  1. Install Vercel CLI:
npm i -g vercel
  1. Deploy:
vercel

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“ License

This project is licensed under the MIT License.

๐Ÿ™ Acknowledgments

  • SpurHacks for giving us the opportunity
  • OpenAI for providing the GPT-4 API
  • The hip-hop community for inspiration

๐Ÿ› Known Issues

  • AI responses use mock data when no API key is provided
  • Token tracking resets on page refresh
  • Voice synthesis features are planned for future releases

๐Ÿ”ฎ Future Features

  • Voice synthesis for rapper voices
  • Beat generation and music integration
  • Multi-player battle mode
  • Rap history and analytics
  • Custom rapper creation
  • Mobile app version
  • Social features and sharing
  • More rapper personalities
  • Advanced battle scoring algorithms

Made with โค๏ธ for the hip-hop community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors