A modern chat application that leverages multiple AI models to provide both thinking and coding assistance. Built with React, Node.js, and Express.
- 💬 Real-time chat interface with AI models
- 🔄 Switch between different AI models
- 💻 Code syntax highlighting
- 📋 Copy code snippets with one click
- 🌓 Dark/Light mode support
- 📱 Responsive design
- ⚡ Fast and efficient
- 🔒 Secure API handling
- React.js
- TailwindCSS
- React Markdown
- Syntax Highlighter
- Context API for state management
- Node.js
- Express
- JWT Authentication
- REST API
- Node.js (v14 or higher)
- npm or yarn
- API keys for your AI providers
- Clone the repository
git clone https://github.com/saadkhan2003/Dual-Model-Ai.git
cd Dual-Model-Ai- Install dependencies
# Install root dependencies
npm install
# Install client dependencies
cd client
npm install
# Install server dependencies
cd ../server
npm install- Environment Setup
# In the client directory, create .env file
REACT_APP_API_URL=your_api_url
# In the server directory, create .env file
PORT=5000
JWT_SECRET=your_jwt_secret- Start the application
# Start server (from server directory)
npm start
# Start client (from client directory)
npm startdual-model-ai/
├── client/
│ ├── public/
│ └── src/
│ ├── components/
│ ├── context/
│ ├── hooks/
│ ├── services/
│ └── styles/
└── server/
├── routes/
├── middleware/
└── services/
The application can be configured through environment variables:
REACT_APP_API_URL: Backend API URLREACT_APP_ENV: Environment (development/production)
PORT: Server portJWT_SECRET: Secret for JWT tokensALLOWED_ORIGINS: CORS allowed origins
- Configure your AI providers in the settings
- Start a new chat session
- Toggle between thinking and coding modes
- Use markdown in your messages
- Copy code snippets with the copy button
- Regenerate responses when needed
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Saad Khan
- Thanks to all the open-source libraries used in this project
- AI provider partners
- Community contributors