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
- Docker and Docker Compose for easy setup
Check:
node -v
docker --version
docker compose version-
Clone the repository
git clone https://github.com/sdass1918/ChatAI-Project.git cd ChatAI-Project -
Environment Variables
# Backend (.env) DATABASE_URL=postgresql://postgres:postgres@db:5432/chatai JWT_SECRET="your_jwt_secret" OPENROUTER_API_KEY="your_openrouter_key" # Frontend (.env) VITE_BACKEND_URL="http://localhost:3000"
-
🐳 Run the Project
docker compose up --build
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

