UnchainedGPT is a cutting-edge, open-source AI platform that brings together the world's most powerful AI models in one seamless interface. From text generation to image creation, our platform offers free access to premium AI models including GPT-4o, Claude 3.5, MidJourney, Flux Pro, and many more.
- π€ Multiple AI Models: Access to GPT-4o, Claude 3.5, LLaMA 3.3, Deepseek r1, and more
- π¨ Image Generation: Create stunning visuals with Flux Pro, MidJourney, and DALL-E
- π¬ Real-time Chat: Lightning-fast responses with WebSocket technology
- π Secure Authentication: Google OAuth and Discord integration
- π± Responsive Design: Perfect experience across all devices
- π Dark Mode: Beautiful dark theme optimized for extended use
- πΎ Chat History: Save and organize your conversations
- π Auto Provider Selection: Intelligent fallback system for maximum uptime
- π Performance Metrics: Real-time response time tracking
- Node.js 18.0 or higher
- MongoDB database
- Git
-
Clone the repository
git clone https://github.com/SiddDevZ/UnchainedGPT.git cd unchainedgpt
-
Install frontend dependencies
npm install
-
Install backend dependencies
cd Backend npm install cd ..
-
Environment Setup
Create
.env.local
in the root directory:NEXT_PUBLIC_API_URL=http://localhost:3001/api
Create
.env
in the Backend directory:DATABASE_URL=your_mongodb_connection_string PORT=3001 GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret DISCORD_CLIENT_ID=your_discord_client_id DISCORD_CLIENT_SECRET=your_discord_client_secret
-
Start the development servers
Frontend (Terminal 1):
npm run dev
Backend (Terminal 2):
cd Backend npm start
-
Open your browser
http://localhost:3000
- Framework: Next.js 15.1.3 with App Router
- Styling: Tailwind CSS with custom animations
- UI Components: Radix UI primitives
- Real-time: Socket.io-client
- Markdown: React Markdown with syntax highlighting
- Animations: Framer Motion & GSAP
- Runtime: Node.js with Hono framework
- Database: MongoDB with Mongoose ODM
- Real-time: Socket.io server
- Authentication: JWT tokens with OAuth integration
- Rate Limiting: Built-in protection
unchainedgpt/
βββ app/ # Next.js app directory
β βββ chat/ # Main chat interface
β βββ login/ # Authentication pages
β βββ register/ # User registration
β βββ ...
βββ Backend/ # Node.js backend
β βββ routes/ # API endpoints
β βββ models/ # Database schemas
β βββ server.js # Main server file
βββ components/ # Reusable React components
β βββ Input/ # Chat input component
β βββ ui/ # UI primitives
β βββ ...
βββ public/ # Static assets
- GPT-4o - OpenAI's flagship model
- Claude 3.5 - Anthropic's advanced reasoning model
- LLaMA 3.3 70B - Meta's open-source powerhouse
- Deepseek r1 - Cutting-edge reasoning model
- Gemini 2.5 Thinking - Google's latest model
- Grok-3 - X's AI model
- Flux Pro - High-quality image synthesis
- MidJourney - Artistic image generation
- DALL-E - OpenAI's image model
Each model supports multiple providers with automatic fallback:
- Auto: Intelligent provider selection
- Pollinations AI: High-speed generation
- Blackbox AI: Reliable performance
- DeepInfra: Scalable infrastructure
- LambdaChat: Optimized responses
- Sign up or log in to your account
- Select your preferred AI model
- Choose a provider (or use Auto for best results)
- Start chatting!
- Select an image model (Flux Pro, MidJourney, etc.)
- Describe your desired image in detail
- Wait for the AI to generate your image
- Download and share your creation
- Chat History: All conversations are automatically saved
- Model Switching: Change models mid-conversation
- Copy Responses: One-click copying of AI responses
- Real-time Typing: See responses as they're generated
Models are configured in app/chat/models.js
. You can:
- Add new models
- Configure providers
- Set display names
- Enable/disable models
Variable | Description | Required |
---|---|---|
DATABASE_URL |
MongoDB connection string | Yes |
GOOGLE_CLIENT_ID |
Google OAuth client ID | Yes |
GOOGLE_CLIENT_SECRET |
Google OAuth secret | Yes |
DISCORD_CLIENT_ID |
Discord OAuth client ID | Optional |
DISCORD_CLIENT_SECRET |
Discord OAuth secret | Optional |
PORT |
Backend server port | No (default: 3001) |
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push
- Connect your repository
- Set the start command to
cd Backend && npm start
- Configure environment variables
- Deploy
# Dockerfile example for backend
FROM node:18-alpine
WORKDIR /app
COPY Backend/package*.json ./
RUN npm install
COPY Backend/ .
EXPOSE 3001
CMD ["npm", "start"]
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Use ESLint configuration provided
- Follow React/Next.js best practices
- Write descriptive commit messages
- Add comments for complex logic
# Run frontend tests
npm test
# Run backend tests
cd Backend && npm test
- WebSocket-based chat for instant responses
- Typing indicators and status updates
- Connection management and reconnection
- Responsive design for all screen sizes
- Dark mode optimized for extended use
- Smooth animations and transitions
- Intuitive model selection
- Response time tracking
- Automatic provider fallback
- Efficient message streaming
- Optimized bundle size
- JWT-based authentication
- Rate limiting protection
- Input sanitization
- Secure OAuth integration
POST /api/chat
- Create new chatPOST /api/message/:chatId
- Send messageGET /api/fetchchats/:userId
- Get user chatsGET /api/fetchchat/:chatId
- Get specific chat
POST /api/login
- User loginPOST /api/register
- User registrationPOST /api/verify
- Token verificationPOST /api/googleauth
- Google OAuth