Where AI Arguments Clash & Insights Emerge π A premium real-time arena where frontier AI minds collide. π€βοΈ
AI Debate Chamber is a revolutionary platform that brings the power of multiple frontier Large Language Models together in structured, dynamic debates. Experience how different AI personalities engage in real-time arguments, present compelling counter-points, and synthesize balanced conclusions on any topic imaginable.
This is more than a chatbotβit's a cognitive arena where artificial intelligence meets persuasive reasoning, designed for users seeking diverse perspectives on complex topics.
Experience debates powered by cutting-edge LLMs working in harmony:
-
PRO Argument: Llama 3.3 70B
Highly logical, articulate reasoning model that constructs compelling supportive arguments -
CON Argument: Claude 3 Haiku
Fast, analytical model providing critical, well-reasoned counter-arguments -
Moderator Synthesis: Gemini 2.5 Flash
Impartial, balanced model that synthesizes insights and identifies common ground
- Dark-mode interface with harmonious color gradients
- Modern typography with Geist font family
- Sleek card borders and elegant micro-animations
- Fully responsive layout (mobile, tablet, desktop)
- Accessible, user-friendly UI components
- In-memory caching layer for instant debate retrieval
- Optimized API calls to reduce latency
- Lightning-fast, responsive user interactions
- Seamless real-time debate generation
- Engage with a dedicated moderator chatbot
- Ask follow-up questions and dive deeper into topics
- Critique arguments and explore nuance
- Continue conversations seamlessly with context awareness
| Category | Technology |
|---|---|
| Frontend Framework | Next.js 16.1, React 19.2 |
| Language | TypeScript 5.0 |
| Styling | Tailwind CSS v4.0 |
| API SDKs | Groq SDK, OpenRouter |
| LLM Models | Llama 3.3, Claude 3, Gemini 2.5 |
| Dev Tools | ESLint, PostCSS, Webpack |
Before you begin, ensure you have:
- Node.js v18.0 or higher
- npm or yarn package manager
- API keys from:
- Groq Console β For Claude 3 Haiku access
- OpenRouter β For Llama 3.3 and Gemini 2.5 access
- A modern web browser (Chrome, Firefox, Safari, Edge)
git clone https://github.com/VisionStack-404/AI-DEBATE-CHAMBER.git
cd AI-DEBATE-CHAMBERnpm install
# or if you prefer yarn
yarn installCreate a .env.local file in the project root:
touch .env.localAdd your API keys to .env.local:
# OpenRouter API Key (for Llama 3.3 and Gemini 2.5)
OPENROUTER_API_KEY=your_openrouter_api_key_here
# Groq API Key (for Claude 3 Haiku - client-side usage)
NEXT_PUBLIC_GROQ_API_KEY=your_groq_api_key_here
# Optional: Development Environment Flag
NEXT_PUBLIC_API_ENV=development- Never commit
.env.localto version control (already protected by.gitignore) - Always restart the dev server after changing environment variables
- Use
NEXT_PUBLIC_prefix only for client-side accessible variables - Keep API keys secure and never share them publicly
npm run devOpen http://localhost:3000 in your browser to see the application running.
# Build the application
npm run build
# Start the production server
npm start- Enter a Topic: Type any subject you'd like the AI models to debate
- Watch the Debate Unfold: Three AI personalities present their arguments in real-time
- View Synthesized Insights: See the moderator's balanced analysis and common ground
- Ask Follow-up Questions: Use the interactive chatbot to explore deeper
- Challenge Perspectives: Dive into nuance and explore different viewpoints
AI-DEBATE-CHAMBER/
βββ app/ # Next.js App Router Directory
β βββ api/ # API routes for LLM integration
β β βββ debate/ # Main debate generation endpoint
β β βββ chat/ # Chatbot interaction endpoint
β βββ layout.tsx # Root layout wrapper
β βββ page.tsx # Home/main debate page
β βββ globals.css # Global styles
βββ components/ # Reusable React Components
β βββ DebateArena/ # Debate display and management
β βββ ChatBot/ # Interactive chatbot interface
β βββ ArgumentCard/ # Individual argument component
β βββ UI/ # Shared UI elements
βββ lib/ # Utility Functions & Helpers
β βββ api/ # API client functions
β βββ types/ # TypeScript interfaces
β βββ utils/ # Helper utilities
βββ styles/ # Global CSS & Tailwind Config
βββ public/ # Static assets (images, fonts)
βββ .env.local # Environment variables (local only)
βββ .env.example # Example environment template
βββ .gitignore # Git ignore rules
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies and scripts
βββ README.md # This file
| Model | Provider | Gateway | Purpose |
|---|---|---|---|
| Llama 3.3 70B | Meta | OpenRouter | PRO Arguments |
| Claude 3 Haiku | Anthropic | Groq | CON Arguments |
| Gemini 2.5 Flash | OpenRouter | Moderation & Synthesis |
POST /api/debate
Content-Type: application/json
{
"topic": "Should AI be regulated?",
"language": "en"
}POST /api/chat
Content-Type: application/json
{
"debateId": "debate_123",
"question": "Can you elaborate on...",
"conversationHistory": []
}# Development
npm run dev # Start dev server with hot module reloading
# Production
npm run build # Build optimized production bundle
npm start # Start production server
# Code Quality
npm run lint # Run ESLint for code style checkingVercel is optimized for Next.js applications:
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prodOr connect your GitHub repository to Vercel for automatic deployments.
- Connect GitHub repo to Netlify
- Set build command:
npm run build - Set publish directory:
.next
- Push to GitHub/GitLab
- Create Amplify app
- Configure build settings for Next.js
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]β Environment Variables
- Store all secrets in
.env.local(never in code) - Use
.gitignoreto prevent accidental commits - Rotate API keys regularly
β API Security
- Implement rate limiting on API endpoints
- Validate all user inputs server-side
- Use HTTPS in production
β Performance
- Enable caching headers
- Minify CSS and JavaScript
- Optimize images and assets
β Monitoring
- Log API errors and failures
- Monitor API rate limits
- Track application performance
We welcome contributions from the community! Here's how to get involved:
-
Fork the Repository
git clone https://github.com/YOUR_USERNAME/AI-DEBATE-CHAMBER.git
-
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Your Changes
- Write clean, readable code
- Follow the existing code style
- Add comments where necessary
-
Commit Your Changes
git commit -m 'Add amazing feature' -
Push to Your Branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Describe your changes in detail
- Reference any related issues
Solution:
- Verify
.env.localexists in project root - Check that API keys are valid and not expired
- Restart the dev server:
npm run dev
Solution:
- Check API rate limits on OpenRouter and Groq
- Use cached results for repeated topics
- Ensure stable internet connection
Solution:
- Clear Next.js cache:
rm -rf .next - Reinstall dependencies:
rm -rf node_modules && npm install - Rebuild the project:
npm run build
Solution:
- Update TypeScript:
npm update typescript - Check
tsconfig.jsonconfiguration - Ensure all types are properly imported
Solution:
- Verify API endpoints are accessible
- Check Groq and OpenRouter CORS settings
- Use server-side API routes for sensitive calls
- Use Caching: Enable browser caching for static assets
- Optimize Images: Compress and optimize images before deployment
- Code Splitting: Next.js automatically optimizes route-based code splitting
- API Optimization: Batch API calls and reuse cached results
- Monitor Metrics: Use Web Vitals to track performance
- Support for additional LLM models (Llama 4, GPT-4, etc.)
- Debate history and saved conversations
- User authentication and accounts
- Debate analytics and insights dashboard
- Multi-language support (Spanish, French, Chinese, etc.)
- Export debates as PDF/Markdown
- Mobile app (React Native)
- API for third-party integrations
- Advanced argument analysis and metrics
- Live streaming of AI debates
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: Contact via GitHub profile
This project is licensed under the MIT License. See the LICENSE file for details.
- Llama 3.3 by Meta AI
- Claude 3 by Anthropic
- Gemini 2.5 by Google DeepMind
- Next.js by Vercel
- Tailwind CSS by Tailwind Labs
- All contributors and users
β Star this repo if you find it useful!
Made with β€οΈ by VisionStack-404