A lightning-fast, cost-effective AI chat platform with multiple models and intelligent conversation management.
- Multiple AI Models: Choose from GPT-4o, Deepseek Chat, Qwen Coder, Google Gemini, and more
- Smart Conversations: Persistent chat history with intelligent conversation management
- Lightning Fast: Optimized for speed with real-time streaming responses
- Beautiful Interface: Clean, modern design built with React and TypeScript
- Secure Authentication: OTP-based login system for enhanced security
- React 18 with TypeScript
- Tailwind CSS for styling
- Vite for blazing-fast development
- Node.js with Express
- TypeScript for type safety
- Prisma ORM with PostgreSQL
- JWT Authentication
- OpenRouter API for AI model access
- Create and manage multiple conversations
- Automatic conversation titling based on first message
- Delete conversations with proper data cleanup
- Seamless conversation switching
- GPT-4o: OpenAI's flagship model
- Deepseek Chat: Advanced reasoning capabilities
- Qwen Coder: Specialized for coding tasks
- Google Gemini 2.0: Latest Google AI technology
- GPT-OSS: Cost-effective alternative
- Node.js 18+
- PostgreSQL database
- OpenRouter API key
-
Clone the repository
git clone https://github.com/sdass1918/ChatAI-Project.git cd ChatAI-Project -
Setup Backend
cd Backend npm install # Configure your environment variables npx prisma migrate dev npm run dev
-
Setup Frontend
cd frontend npm install # Configure your environment variables npm run dev
-
Environment Variables
# Backend (.env) DATABASE_URL="your_postgresql_url" JWT_SECRET="your_jwt_secret" OPENROUTER_API_KEY="your_openrouter_key" # Frontend (.env) VITE_BACKEND_URL="http://localhost:3000"
POST /auth/initiate_signin- Start OTP login processPOST /auth/signin- Complete login with OTP
GET /ai/conversations- List all conversationsPOST /ai/conversations- Create new conversationGET /ai/conversations/:id- Get conversation with messagesDELETE /ai/conversations/:id- Delete conversation
POST /ai/chat- Send message and get AI response (streaming)
- Sign In: Enter your email to receive an OTP
- Verify: Enter the OTP to access your dashboard
- New Chat: Click "New Chat" to start a conversation
- Choose Model: Select from available AI models
- Chat: Send messages and receive real-time AI responses
- Manage: Switch between conversations or delete old ones

