A cutting-edge AI-powered debate platform that helps users improve their argumentation skills through realistic debates with AI opponents. Built for HackRU 2025.
- Intelligent Opponents: Debate against AI characters with distinct personalities (politicians, scientists, activists, philosophers, journalists, lawyers)
- Google Gemini Integration: Advanced AI responses powered by Google's Gemini API
- Real-time Analysis: Instant feedback on logical fallacies, argument strength, and debate performance
- ElevenLabs Integration: High-quality AI voice synthesis with optimized performance
- Smart Caching: Client-side audio caching for instant replay
- Fallback System: Browser TTS fallback for reliability
- Voice Customization: Different voice characteristics based on opponent type
- Performance Tracking: Detailed scoring system for clarity, evidence, logic, and persuasiveness
- Fallacy Detection: AI-powered identification of logical fallacies in arguments
- Progress Monitoring: Track improvement over time with Snowflake database integration
- Detailed Feedback: Personalized suggestions for improvement
- Responsive Design: Built with TailwindCSS and Radix UI components
- Dark/Light Mode: Theme switching with next-themes
- Real-time Updates: Live debate interface with message streaming
- Accessibility: Full keyboard navigation and screen reader support
- Node.js 18+ and pnpm
- Snowflake account for database
- Google Gemini API key
- ElevenLabs API key (optional, for premium TTS)
-
Clone the repository
git clone https://github.com/BrantisIsHacking/hackru-2025.git cd hackru-2025 -
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env.local
Fill in your API keys and database credentials:
# Snowflake Configuration SNOWFLAKE_ACCOUNT=your_account_id SNOWFLAKE_USERNAME=your_username SNOWFLAKE_PASSWORD=your_password SNOWFLAKE_WAREHOUSE=your_warehouse SNOWFLAKE_DATABASE=your_database SNOWFLAKE_SCHEMA=your_schema # Google Gemini Configuration GEMINI_API_KEY=your_gemini_api_key # ElevenLabs Configuration (Optional) ELEVENLABS_API_KEY=your_elevenlabs_api_key ELEVENLABS_VOICE_ID=your_voice_id
-
Run the development server
pnpm dev
-
Open http://localhost:3000 in your browser
- Next.js 15.2.4 - React framework with App Router
- TypeScript - Type-safe development
- TailwindCSS 4.1.9 - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- Google Gemini API - Advanced language model for AI opponents
- ElevenLabs API - Premium text-to-speech synthesis
- Snowflake - Cloud data warehouse for analytics
- Vercel Analytics - Performance monitoring
- Audio Caching - Client-side audio caching with automatic cleanup
- Smart Fallbacks - Browser TTS fallback for reliability
- Timeout Protection - 5-second timeout for TTS requests
- Optimized Models - ElevenLabs Turbo v2.5 for faster generation
- Real-time debate interface with AI opponents
- Message history with scoring and fallacy detection
- Voice synthesis for AI responses
- Performance analytics
- Debate history and statistics
- Performance trends and improvement tracking
- Quick access to new debates
- Secure user registration and login
- Session management
- User profile and preferences
- Detailed post-debate analysis
- Logical fallacy identification
- Personalized improvement suggestions
- Performance scoring across multiple dimensions
POST /api/auth/login- User loginPOST /api/auth/signup- User registration
POST /api/debates/create- Create new debateGET /api/debates/get/[debateId]- Get debate detailsPOST /api/debates/message- Send debate messagePOST /api/debates/end/[debateId]- End debate sessionGET /api/debates/[userId]- Get user's debates
GET /api/analytics/[userId]- Get user analytics
POST /api/speech/synthesize- Generate TTS audio
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
# Build the project
pnpm build
# Start production server
pnpm start| Variable | Description | Required |
|---|---|---|
SNOWFLAKE_ACCOUNT |
Snowflake account identifier | Yes |
SNOWFLAKE_USERNAME |
Database username | Yes |
SNOWFLAKE_PASSWORD |
Database password | Yes |
SNOWFLAKE_WAREHOUSE |
Data warehouse name | Yes |
SNOWFLAKE_DATABASE |
Database name | Yes |
SNOWFLAKE_SCHEMA |
Schema name | Yes |
GEMINI_API_KEY |
Google Gemini API key | Yes |
ELEVENLABS_API_KEY |
ElevenLabs API key | No* |
ELEVENLABS_VOICE_ID |
ElevenLabs voice ID | No* |
*ElevenLabs is optional - the app will use browser TTS as fallback
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Built with β€οΈ for HackRU 2025 - Empowering the next generation of debaters with AI technology.