A powerful, feature-rich chat application providing seamless access to 18+ Large Language Models through a single, elegant interface.
cursorful-video-1750502865778.online-video-cutter.com.mp4
GodGPT is a modern, production-ready chat application that unifies access to the world's most powerful AI models. Built with cutting-edge web technologies and designed for both developers and end-users, it offers a comprehensive solution for AI-powered conversations with advanced features like real-time sync, offline capabilities, and intelligent model fallbacks.
- 18+ AI Models: Access to the latest models from OpenAI, Anthropic, Google, Meta, DeepSeek, and more
- Multi MOdels Response Proccessing Queue: Queue-based multi-model responses, so you donβt have to go full psycho opening the same prompt in 5 tabs
- Pre Prompt Generation: Pre-prompt generator to fix your shitty prompts, make them actually usable
- Smart Fallback System: Automatic fallback to OpenRouter when user API keys aren't available
- Real-time Multi-tab Sync: Conversations sync instantly across all browser tabs
- BYOK: Bring Your Own Keys Support
- Production Ready: Built with enterprise-grade architecture and security
- 8 Free Models: Including DeepSeek R1, Gemini 2.5 Flash, GPT-4o Mini, Claude 3.5 Haiku
- 5 Premium Text Models: GPT-4.1, Claude Sonnet 4, Gemini 2.5 Pro, and more
- 3 Image Models: DALL-E 3/2, Stable Diffusion 3.5
- 2 Vision Models: GPT-4o, GPT-4V for image analysis
- Smart Model Selection: Detailed model capability icons
- Better Auth Integration: Modern, secure authentication system
- Multiple Providers: Google OAuth, GitHub OAuth
- Session Management: Secure session handling with automatic expiration
- API Key Management: Secure storage of user API keys with encryption
- Dual Storage System: PostgreSQL for server data, Dexie.js for offline capabilities
- Real-time Synchronization: Instant sync across devices and browser tabs
- Persistent Chat History: Never lose your conversations
- Usage Tracking: Monitor API usage and rate limits
- Responsive Design: Perfect experience on desktop, tablet, and mobile
- Dark/Light Themes: System preference detection with manual override
- Streaming Responses: Real-time message streaming with typing indicators
- Multi-tab Sync: Continue conversations seamlessly across browser tabs
- Error Recovery: Automatic retry logic with graceful error handling
- Syntax Highlighting: Beautiful code rendering with copy functionality
- Next.js - React framework with App Router
- TypeScript - Type-safe development
- Prisma - Next-generation ORM
- PostgreSQL - Robust relational database (Neon)
- Dexie.js - Client-side IndexedDB wrapper for offline support
- Better Auth - Modern authentication solution
- bcryptjs - Password hashing
- OAuth Providers - Google, GitHub integration
- AI SDK 4.3.16 - Vercel's AI SDK for streaming
- OpenRouter Provider - Access to multiple LLM providers
- Google AI SDK - Direct Google Gemini integration
- OpenAI SDK - Direct OpenAI API integration
- Tailwind CSS 4.1.8 - Utility-first CSS framework
- Radix UI - Unstyled, accessible components
- Lucide React - Beautiful icon library
- Next Themes - Theme switching capabilities
- Zustand 5.0.5 - Lightweight state management
- React Hook Form - Performant form handling
- Zod 3.25.56 - Schema validation
- Lodash 4.17.21 - Utility library
// Example: Premium models automatically fallback to OpenRouter
'GPT-4.1': {
modelId: 'gpt-4.1',
provider: 'openai',
fallbackProvider: 'openrouter',
fallbackModelId: 'openai/gpt-4.1',
}- Broadcast Channel API for cross-tab communication
- Optimistic Updates for instant UI feedback
- Conflict Resolution for simultaneous edits
- Streaming State Sync across all active sessions
- Dexie.js for client-side persistence
- Background Sync when connection restored
- Conflict Resolution between local and server state
- Optimistic UI Updates for responsive experience
- Node.js 18+ or Bun (recommended)
- PostgreSQL Database (or Neon for cloud)
- Git for version control
- Clone the repository
git clone https://github.com/yourusername/godgpt.git
cd godgpt- Install dependencies
# Using bun (recommended)
bun install
# Or using npm
npm install- Configure your environment
# Database
DATABASE_URL="your-postgresql-connection-string"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key-32-chars-minimum"
BETTER_AUTH_URL="http://localhost:3000"
# OAuth Providers (optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# OpenRouter (required for free models)
OPENROUTER_API_KEY="sk-or-v1-your-api-key-here"
# Image Generation (optional)
IMAGEROUTER_API_KEY="your-imagerouter-key"
CLOUDINARY_CLOUD_NAME="your-cloudinary-name"
CLOUDINARY_API_KEY="your-cloudinary-key"
CLOUDINARY_API_SECRET="your-cloudinary-secret"- Set up the database
npm run db:push- Start the development server
npm run dev- Open your browser
Navigate to
http://localhost:3000
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β |
BETTER_AUTH_SECRET |
Secret for authentication | β |
BETTER_AUTH_URL |
Application URL | β |
OPENROUTER_API_KEY |
OpenRouter API key for free models | β |
| Variable | Description | Required |
|---|---|---|
GOOGLE_CLIENT_ID |
Google OAuth client ID | β |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | β |
GITHUB_CLIENT_ID |
GitHub OAuth client ID | β |
GITHUB_CLIENT_SECRET |
GitHub OAuth client secret | β |
IMAGEROUTER_API_KEY |
Image generation API key | β |
CLOUDINARY_* |
Cloudinary configuration | β |
- OpenRouter: Sign up at openrouter.ai - Required for free models
- Google OAuth: Create project at Google Cloud Console
- GitHub OAuth: Create app at GitHub Developer Settings
- Neon PostgreSQL: Create database at neon.tech
- Sign up with email, Google, or GitHub
- Select a model from the dropdown (18+ options available)
- Start chatting - responses stream in real-time
- Upload images for vision-capable models
- Can Select Multiple Models too (optional)
- Multi-tab Sync: Open multiple tabs - conversations sync instantly
- Offline Mode: Continue chatting even without internet
- Model Switching: Change models mid-conversation
- Chat History: Access all previous conversations
- Code Highlighting: Beautiful syntax highlighting for code blocks
- DeepSeek R1 0528 - Latest reasoning model
- Gemini 2.5 Flash - Fast Google model with vision
- GPT-4o Mini - OpenAI's efficient model with vision
- Claude 3.5 Haiku - Anthropic's fast model
- Meta-Llama 3.3 70B - Meta's open source model
- Claude Sonnet 4 - Anthropic's latest flagship
- GPT-4.1 - OpenAI's advanced model
- Gemini 2.5 Pro - Google's most capable model
- GPT-4o - OpenAI's multimodal model
- GPT-4V - Enhanced vision capabilities
- DALL-E 3 - OpenAI's latest image generator
- DALL-E 2 - Reliable image generation
- Stable Diffusion 3.5 - Open source image generation
godgpt/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ chat/ # Chat completion endpoint
β β βββ image/ # Image generation endpoint
β β βββ upload/ # File upload endpoint
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
βββ frontend/ # Client-side code
β βββ components/ # React components
β β βββ ui/ # Reusable UI components
β β βββ userdashboard/ # User dashboard components
β βββ dexie/ # Offline database layer
β βββ hooks/ # Custom React hooks
β βββ routes/ # Route components
β βββ stores/ # Zustand state stores
βββ lib/ # Shared utilities
βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
bun run build
wrangler deployFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Voice Chat - Speech-to-text and text-to-speech
- Branch Chat - supports branching of chats
- File Analysis - PDF, CSV, and document processing
- Plugin System - Extensible plugin architecture
- Team Workspaces - Collaborative chat environments like share chat
- Advanced Analytics - Usage statistics and insights
- Mobile Apps - Native iOS and Android applications
- End-to-end Encryption for API keys
- Rate Limiting to prevent abuse
- Input Sanitization for XSS protection
- CSRF Protection with secure tokens
- Secure Headers with Next.js security headers
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team for the incredible framework
- Vercel for the AI SDK and deployment platform
- Better Auth for modern authentication
- OpenRouter for unified LLM access
- Neon for serverless PostgreSQL
- Open Source Community for all the amazing tools
Built with β€οΈ by Neeraj (me) and Deepak (https://github.com/oneWritesCode)
"We want to make our app as its name"