An AI-powered rap application that lets you chat, battle, and collaborate with AI rappers in different styles and personalities.
- 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
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key (optional, for enhanced AI responses)
- Clone the repository:
git clone <repository-url>
cd gptrapper- Install dependencies:
npm install- Set up environment variables:
cp env.example .env.localEdit .env.local and add your OpenAI API key:
VITE_OPENAI_API_KEY=your_openai_api_key_here
- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:3000
- 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
- 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
- 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
- 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
- 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
- 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
- Navigate to the Chat page
- Select an AI rapper from the lineup
- Start a conversation
- The AI will respond in the rapper's unique style and personality
- Go to the Battle page
- Select two rappers to battle
- Watch them exchange verses with AI-generated battle lyrics
- Up to 3 rounds per battle with scoring
- Automatic winner determination
- Visit the Studio page
- Choose a rapper to collaborate with
- Provide prompts for lyrics
- Generate and edit your rap with AI assistance
VITE_OPENAI_API_KEY: Your OpenAI API key for enhanced AI responsesVITE_APP_NAME: Application nameVITE_APP_VERSION: Application version
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
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
npm run build- Install Vercel CLI:
npm i -g vercel- Deploy:
vercel- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
- SpurHacks for giving us the opportunity
- OpenAI for providing the GPT-4 API
- The hip-hop community for inspiration
- 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
- 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