A modern, multi-LLM chat interface built with React, TypeScript, and Material-UI. Chat with different AI models including OpenAI's GPT and Google's Gemini models in real-time.
- 🎯 Multiple LLM Support - Switch between OpenAI GPT-4o, GPT-4o Mini, and Google Gemini models
- ⚡ Real-time Streaming - See responses appear as they're being generated
- 🔐 Secure Authentication - User management powered by Clerk
- 🗄️ Cloud Database - Persistent conversations stored in Convex with real-time sync
- 🎨 Modern Dark UI - Beautiful, responsive design with Material-UI components
- 💬 Multiple Conversations - Create unlimited chat sessions per user with smart organization
- 🔄 Model Switching - Change AI models mid-conversation
- 👤 Personalized Experience - User profiles and personalized welcome messages
- 📱 Responsive Design - Works perfectly on desktop and mobile
- 🔍 Search & Organization - Find conversations easily with search and date grouping
- ⚡ Real-time Sync - Conversations sync instantly across devices and tabs
- Node.js 18+
- npm or yarn
- API keys for OpenAI and/or Google AI
Clone and navigate to the project:
cd t69-chatInstall dependencies:
npm install
Set up environment variables:
cp .env.example .env
Edit
.envand add your API keys:VITE_OPENAI_API_KEY=your_openai_api_key_hereVITE_GOOGLE_API_KEY=your_google_api_key_hereVITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key_here
Set up Convex database:
npx convex dev --configure
This will create your Convex project and add the database URL to
.env.localStart the development servers:
# Terminal 1: Start Convex dev server npx convex dev # Terminal 2: Start Vite dev server npm run dev
Open your browser: Visit
http://localhost:5173(or the port shown in your terminal)
- Visit OpenAI Platform
- Sign in or create an account
- Create a new API key
- Copy the key to your
.envfile
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Copy the key to your
.envfile
- Visit Clerk.com and create an account
- Create a new application
- Go to "API Keys" in your dashboard
- Copy your Publishable Key
- Add it to your
.envfile
For detailed Clerk setup instructions, see CLERK_SETUP.md
| Model | Provider | Description |
|---|---|---|
| GPT-4o | OpenAI | Latest flagship model with enhanced reasoning |
| GPT-4o Mini | OpenAI | Faster, cost-effective version of GPT-4o |
| Gemini 2.0 Flash | Latest experimental model with fast responses | |
| Gemini 1.5 Flash | Production-ready model with excellent performance |
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- Frontend: React 18 + TypeScript + Vite
- UI Library: Material-UI (MUI) 5
- Authentication: Clerk
- Database: Convex (real-time, serverless)
- AI APIs: OpenAI + Google Generative AI
- Styling: Material-UI + Custom CSS
- Build Tool: Vite 6
src/
├── components/ # Reusable UI components
│ ├── chat/ # Chat-specific components
│ └── layout/ # Layout components
├── context/ # React context providers
├── pages/ # Main page components
├── services/ # API and external services
├── styles/ # Styling and themes
└── types/ # TypeScript type definitions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT models
- Google AI for Gemini models
- Material-UI for the component library
- Vite for the build tool
- React for the UI framework
Built with ❤️ using React, TypeScript, and modern web technologies