Meld is a sophisticated web application that enables users to interact with multiple AI models simultaneously in a single chat interface. Get responses from different AI providers and compare them side-by-side to find the best answer for your needs.
-
Multi-Model Chat: Interact with multiple AI models at the same time
- GPT (3.5, 3.5 Turbo, 4.1 Mini, 4.1, 5 Nano, 5 Mini, 5)
- Gemini (2.5 Lite, 2.5 Flash, 2.5 Pro)
- DeepSeek (R1, R1 0528)
- Mistral (Medium 2505, Ministral 3B)
- Grok (3 Mini, 3)
- Cohere (Command A, Command R 08-2024)
- Llama (3.3 70B Instruct, 4 Scout 17B 16E Instruct)
-
Side-by-Side Comparison: View responses from all enabled models in parallel
-
Rate Limiting: Built-in token bucket rate limiting with Arcjet
-
User Authentication: Secure login via Clerk
-
Chat History: Save and retrieve previous conversations
-
Usage Tracking: Monitor free message quota (5 messages for free tier)
-
Premium Plans: Upgrade to unlimited messages
-
Dark Mode: Light and dark theme support
-
Responsive Design: Works seamlessly on desktop and mobile
- Next.js 16.1.4 - React framework with App Router
- React 19 - UI library
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality React components
- Sonner - Toast notifications
- Lucide React - Icon library
- React Markdown - Markdown rendering
- Firebase Firestore - Real-time database for chat history
- Clerk - User authentication and management
- Arcjet - Rate limiting and security
- Kravix Studio API - AI model integration
- TypeScript - Type safety (jsconfig.json)
- ESLint - Code linting
- Prettier - Code formatting
- Turbopack - Fast bundler for Next.js
- Node.js 18+
- npm or yarn
- Firebase account
- Clerk account
- Arcjet account
- Kravix Studio API key
git clone <repository-url>
cd webnpm installCreate a .env.local file in the root directory with the following variables:
# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER=your_firebase_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_firebase_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Arcjet Rate Limiting
ARCJET_KEY=your_arcjet_key
# AI Model API
KRAVIX_STUDIO_API_KEY=your_kravix_studio_api_keynpm run devOpen http://localhost:3000 in your browser to see the application.
npm run build
npm run startweb/
โโโ app/
โ โโโ _components/ # Reusable components
โ โ โโโ AiMultiModel.jsx # Multi-model display
โ โ โโโ AppHeader.jsx # Header component
โ โ โโโ AppSidebar.jsx # Sidebar with chat history
โ โ โโโ ChatInputBox.jsx # Chat input interface
โ โ โโโ ToggleTheme.jsx # Theme switcher
โ โ โโโ UsageCreditProgress.jsx # Usage meter
โ โโโ api/
โ โ โโโ ai-multimodel/ # AI model integration API
โ โ โโโ arcjet-test/ # Rate limiting test
โ โ โโโ user-remaining-msg/ # Message quota check
โ โโโ globals.css # Global styles
โ โโโ layout.js # Root layout
โ โโโ page.js # Home page
โ โโโ provider.jsx # Context providers
โ โโโ settings/
โ โโโ page.js # Settings page
โโโ components/
โ โโโ ui/ # shadcn/ui components
โโโ config/
โ โโโ Arcjet.js # Rate limiting config
โ โโโ FirebaseConfig.js # Firebase setup
โโโ context/
โ โโโ AiSelectedModelContext.jsx # Model selection state
โ โโโ UserDetailContext.js # User data state
โ โโโ UserDetailContext.js # User context
โโโ hooks/
โ โโโ use-mobile.js # Mobile detection hook
โโโ lib/
โ โโโ utils.js # Utility functions
โโโ public/ # Static assets
โโโ shared/
โ โโโ AIModelList.jsx # Available AI models
โ โโโ AiModelsShared.jsx # Default model config
โโโ jsconfig.json # Path aliases config
โโโ next.config.mjs # Next.js configuration
โโโ package.json # Dependencies
โโโ postcss.config.mjs # PostCSS config
โโโ README.md # This file
- Users can enable/disable individual AI models
- Each model has its own message thread
- Responses are fetched in parallel for better UX
- Free tier: 5 messages per interval
- Uses Arcjet token bucket algorithm
- Prevents abuse and ensures fair usage
- All conversations saved to Firebase Firestore
- Chat history accessible from sidebar
- Automatic save on every message
- Clerk handles authentication
- User preferences (selected models) saved to database
- Free plan with upgrade option
Sends a message to the selected AI model and returns the response.
Request:
{
"model": "gpt-4.1-mini",
"msg": [{ "role": "user", "content": "Hello" }],
"parentModel": "GPT"
}Response:
{
"aiResponse": "...",
"model": "GPT"
}Checks remaining message quota using Arcjet rate limiting.
Request:
{
"token": 1
}Response:
{
"allowed": true,
"remainingToken": 4
}Test endpoint for Arcjet rate limiting.
The app uses Next Themes for theme management. Customize colors in app/globals.css.
Edit available models in shared/AIModelList.jsx and default selection in shared/AiModelsShared.jsx.
Update the AI model endpoint in app/api/ai-multimodel/route.js.
- Clear
.nextfolder:rm -rf .next - Reinstall dependencies:
rm -rf node_modules && npm install - Rebuild:
npm run build
The app uses relative imports for config files instead of path aliases. Update imports if adding new config files:
// โ
Correct
import { db } from "../../config/FirebaseConfig";
// โ Avoid in config imports
import { db } from "@/config/FirebaseConfig";- Verify all Firebase environment variables are set
- Check Firebase console for Firestore database status
- Ensure proper Firestore security rules
- Verify Clerk keys in environment variables
- Check Clerk dashboard for application configuration
- Ensure redirect URLs are configured in Clerk
Key dependencies:
next- React frameworkfirebase- Database and storage@clerk/nextjs- Authentication@arcjet/node- Rate limitingaxios- HTTP clienttailwindcss- CSS frameworkreact-markdown- Markdown supportsonner- Toast notifications
- Create a feature branch:
git checkout -b feature/new-feature - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature/new-feature - Submit a pull request
- Use functional components with hooks
- Keep components small and focused
- Use TypeScript-compatible JSDoc comments
- Follow Tailwind CSS utility-first approach
- Use proper error handling with try-catch
- Add loading states for async operations
vercel deploy- Build the project:
npm run build - Deploy the
.nextfolder - Set environment variables in deployment platform
- Configure domain and SSL
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check existing GitHub issues
- Create a new issue with detailed description
- Include environment setup and error messages
- Voice input support
- Image upload and analysis
- Custom model configuration
- Advanced analytics dashboard
- Team collaboration features
- API for third-party integration
- Mobile app (React Native)
- Export conversations (PDF, Markdown)
Built with โค๏ธ by Meld Team
Last Updated: February 4, 2026