A premium, SaaS-level web application for comparing AI language models through interactive battles. Compare responses from multiple AI models side-by-side, vote on your preferences, and contribute to community-driven leaderboards.
- Node.js 14+ installed
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Supabase account (credentials configured in config.js)
- Optional: Backend API server
# Install dependencies
npm install
# Start the development server
npm run devOpen http://localhost:8000 in your browser.
Compare two AI models side-by-side with anonymous testing, real-time streaming responses, and community voting.
Choose specific models to compare and analyze their responses directly.
Chat with a single AI model with full conversation history maintained.
Live model rankings based on community votes, win rates, and performance statistics.
Secure Supabase-powered authentication with email/password login and session management.
Fully responsive interface optimized for desktop, tablet, and mobile devices.
DualMind_UI/
βββ index.html # Main app entry
βββ config.js # Global configuration
βββ components/ # UI components
β βββ Header.js # Top navigation
β βββ Sidebar.js # Side navigation
β βββ chat/ # Chat components
βββ css/ # Stylesheets
β βββ styles.css # Main styles
β βββ auth-styles.css # Auth page styles
βββ js/ # JavaScript modules
β βββ app.js # Main app logic
β βββ apiClient.js # API client
β βββ supabase-auth.js # Auth service
β βββ supabase-init.js # Auth initialization
β βββ leaderboardModal.js # Leaderboard component
βββ login/ # Login/signup page
β βββ index.html
βββ package.json # Dependencies
Edit config.js to configure your backend API:
// Automatically detects localhost vs production
const BACKEND_URL = isLocalhost
? 'http://localhost:5079'
: 'https://api.dualmindlab.tech';Configure your Supabase project in config.js:
window.DUALMIND_CONFIG.supabase = {
url: 'YOUR_SUPABASE_URL',
anonKey: 'YOUR_SUPABASE_ANON_KEY'
};The app uses a modern design system with CSS custom properties. Edit css/styles.css to customize:
:root {
/* Brand Colors */
--color-primary: #6366f1;
--color-accent: #22d3ee;
/* Background Colors */
--bg-0: #000000;
--bg-1: #0a0a0a;
/* Typography */
--font-family-base: 'Inter', sans-serif;
--text-base: 15px;
/* Border Radius */
--radius-md: 16px;
}Replace ./assets/background.png with your custom background image for a personalized look.
The app works with an optional backend API or can run in offline mode with mock responses.
POST /api/arena/chat- Single model chatPOST /api/arena/dualchat- Battle mode (two models)POST /api/arena/model-vote- Submit voteGET /api/arena/model-stats- Leaderboard dataGET /api/health- Backend health check
All authenticated endpoints require Authorization: Bearer <JWT_TOKEN> header.
- Navigate to login page
- Create account or login
- Verify redirect to main app
- Check user info in header/sidebar
- Enter a prompt
- Wait for 2 model responses
- Vote for preferred response
- Check leaderboard updates
- Switch to Direct Chat mode
- Send messages
- Verify conversation flow
The app automatically falls back to offline mode with mock responses if the backend is unavailable. To resolve:
- Verify backend is running on the correct port
- Check CORS settings on your backend server
- Ensure API URL is correctly configured in
config.js
- Clear browser cache and localStorage
- Verify Supabase credentials in
config.js - Check browser console for detailed error messages
- Ensure email confirmation is properly configured in Supabase
- Blank screen: Check browser console for JavaScript errors
- Slow loading: Enable caching in
config.js - Mobile issues: Clear mobile browser cache and reload
Fully responsive interface with optimized layouts:
- Desktop (1024px+): Full sidebar with all features
- Tablet (768px-1024px): Collapsible sidebar
- Mobile (<768px): Drawer sidebar with touch-optimized controls
- JWT-based authentication with Supabase
- Secure session storage and token management
- HTTPS recommended for production deployments
- CORS protection and XSS prevention
- Input sanitization and validation
- Configure production backend URL in
config.js - Enable HTTPS for secure connections
- Set up CDN for static assets (optional)
- Configure Supabase production environment
- Test all features thoroughly
- Enable performance monitoring
- Optimized CSS with modern design tokens
- Efficient event handling with delegation
- Lazy loading for optimal bundle size
- GPU-accelerated animations
- Request caching for API calls
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Ctrl/Cmd + K- Focus chat inputCtrl/Cmd + B- Toggle sidebarEscape- Close modals and menus
For issues, questions, or feature requests:
- GitHub Issues: github.com/dualmindlabs/DualMind_UI
- Email: support@dualmindlab.tech
MIT License - see LICENSE file for details
Built with modern web standards and inspired by leading AI platforms including ChatGPT, Claude, and Vercel.