AI-DEBATE-CHAMBER

βš–οΈ AI Debate Chamber

Next.js Tailwind CSS React TypeScript Groq License

Where AI Arguments Clash & Insights Emerge πŸš€ A premium real-time arena where frontier AI minds collide. πŸ€–βš”οΈ


🎯 Overview

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.


✨ Core Features

πŸ€– Multi-Agent AI Orchestration

Experience debates powered by cutting-edge LLMs working in harmony:

🎨 Premium Glassmorphic Design

⚑ Intelligent Caching & Performance

πŸ’¬ Interactive Debate Chatbot


πŸ› οΈ Tech Stack

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

πŸ“‹ Prerequisites

Before you begin, ensure you have:


πŸš€ Quick Start Guide

1. Clone the Repository

git clone https://github.com/VisionStack-404/AI-DEBATE-CHAMBER.git
cd AI-DEBATE-CHAMBER

2. Install Dependencies

npm install
# or if you prefer yarn
yarn install

3. Configure Environment Variables

Create a .env.local file in the project root:

touch .env.local

Add 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

⚠️ Security Notes:

4. Start the Development Server

npm run dev

Open http://localhost:3000 in your browser to see the application running.

5. Build for Production

# Build the application
npm run build

# Start the production server
npm start

πŸ’» How to Use

  1. Enter a Topic: Type any subject you’d like the AI models to debate
  2. Watch the Debate Unfold: Three AI personalities present their arguments in real-time
  3. View Synthesized Insights: See the moderator’s balanced analysis and common ground
  4. Ask Follow-up Questions: Use the interactive chatbot to explore deeper
  5. Challenge Perspectives: Dive into nuance and explore different viewpoints

πŸ“ Project Structure

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

πŸ”Œ API Integration Details

Supported LLM Providers

Model Provider Gateway Purpose
Llama 3.3 70B Meta OpenRouter PRO Arguments
Claude 3 Haiku Anthropic Groq CON Arguments
Gemini 2.5 Flash Google OpenRouter Moderation & Synthesis

API Endpoints

Generate Debate

POST /api/debate
Content-Type: application/json

{
  "topic": "Should AI be regulated?",
  "language": "en"
}

Chat Follow-up

POST /api/chat
Content-Type: application/json

{
  "debateId": "debate_123",
  "question": "Can you elaborate on...",
  "conversationHistory": []
}

πŸ“Š Available npm Scripts

# 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 checking

🌐 Deployment Guide

Vercel is optimized for Next.js applications:

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Or connect your GitHub repository to Vercel for automatic deployments.

Deploy to Other Platforms

Netlify

AWS Amplify

Self-Hosted (Docker)

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

πŸ” Security & Best Practices

βœ… Environment Variables

βœ… API Security

βœ… Performance

βœ… Monitoring


🀝 Contributing

We welcome contributions from the community! Here’s how to get involved:

  1. Fork the Repository
    git clone https://github.com/YOUR_USERNAME/AI-DEBATE-CHAMBER.git
    
  2. Create a Feature Branch
    git checkout -b feature/amazing-feature
    
  3. Make Your Changes
    • Write clean, readable code
    • Follow the existing code style
    • Add comments where necessary
  4. Commit Your Changes
    git commit -m 'Add amazing feature'
    
  5. Push to Your Branch
    git push origin feature/amazing-feature
    
  6. Open a Pull Request
    • Describe your changes in detail
    • Reference any related issues

πŸ†˜ Troubleshooting

Issue: β€œAPI Key Not Found” Error

Solution:

Issue: Slow Debate Generation

Solution:

Issue: Tailwind Styles Not Applying

Solution:

Issue: TypeScript Compilation Errors

Solution:

Issue: CORS Errors

Solution:


πŸ“ˆ Performance Tips


🎯 Roadmap


πŸ“ž Support & Community


πŸ“„ License

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


πŸ™ Acknowledgments


### πŸš€ Building the Future of AI-Powered Intelligent Discourse **[⭐ Star this repo](https://github.com/VisionStack-404/AI-DEBATE-CHAMBER)** if you find it useful! Made with ❀️ by [VisionStack-404](https://github.com/VisionStack-404)