A sleek and feature-rich open source version of T3 Chat built for the T3 Chat Cloneathon competition.
Volo Chat is a full-stack AI chat application that provides a unified interface for multiple AI providers and models. Chat with Claude, GPT-4, Gemini, DeepSeek, and generate images with OpenAI's GPT-Image-1 - all while maintaining full control over your data and API keys.
- Streaming output - Real-time responses from AI models
- Chat branching - Create alternative conversation paths from any message (great UX)
- Message retries - Easily retry failed or unsatisfactory responses
- File attachments - Upload and analyze documents, images, PDFs, and code files
- Chat sharing - Share conversations with public links that others can import
- Bring Your Own Key (BYOK) - Secure implementation for OpenRouter + OpenAI keys
- Chat management - Pin, delete, rename, and organize chats
- Custom instructions - Set personalized AI behavior
- Markdown rendering - Rich text display with copy buttons for messages/code blocks
- Responsive design - Works well on mobile and desktop
- Frontend: React (Vite) + Tailwind CSS + ShadCN components
- Backend: Hono API configured for Cloudflare Workers
- Authentication: Firebase Auth (enabling smooth Google Sign-in)
- Database: PostgreSQL with Drizzle ORM
- AI Models: OpenRouter for text models, OpenAI for image generation
- File Storage: Cloudflare R2 bucket for uploaded files
- Package Manager: pnpm
- Node.js 18+ and pnpm
- Git
-
Clone and Install
git clone https://github.com/VoloBuilds/volo-chat cd volo-chat pnpm install -
Configure Firebase
- Update
ui/src/lib/firebase-config.jsonwith your Firebase project details - Or keep the default config to use the demo Firebase project
- Alternatively, use the Firebase emulator to run locally without a Firebase account
- Update
-
Configure Backend
- Copy
server/platforms/cloudflare/wrangler.toml.templatetoserver/wrangler.toml - Update the configuration with your values:
name = "your-worker-name" main = "src/index.ts" compatibility_date = "2024-09-23" compatibility_flags = [ "nodejs_compat" ] [vars] NODE_ENV = "production" FIREBASE_PROJECT_ID = "your-firebase-project-id" DATABASE_URL = "postgresql://your-neon-db-url" OPENROUTER_API_KEY = "your-openrouter-key" OPENAI_API_KEY = "your-openai-key" # Optional, for image generation API_KEY_ENCRYPTION_SECRET = "your-32-char-secret" [[r2_buckets]] bucket_name = "your-r2-bucket-name" binding = "R2_BUCKET"
- Copy
-
Set Up Database Schema
cd server pnpm db:push -
Start Development
pnpm dev
This starts both the frontend and backend on available ports (default 5500 and 5501)
-
Start Chatting
- Open the frontend URL
- Sign in with your Google account (or email/password)
- Optionally, add your API keys in Settings → API Keys
- Start a conversation
Database: PostgreSQL (Neon recommended)
- Any PostgreSQL database will work
- Get free database at neon.tech
Storage: Cloudflare R2
- Required for file uploads and attachments
- Set up R2 bucket in Cloudflare dashboard
- Note: Uses R2 API directly (not S3-compatible storage atm)
Authentication: Firebase Auth
- Create project at firebase.google.com
- Enable Google Sign-in provider
- Update
firebase-config.jsonwith your project details
Add your keys in the app at Settings → API Keys:
- OpenRouter: For access to Claude, GPT-4, Gemini, DeepSeek, and 100+ other models
- OpenAI: For GPT-Image-1 image generation (optional)
- API keys are encrypted using
API_KEY_ENCRYPTION_SECRET - Use a 32-character random string for the encryption secret
- Different secret = different encrypted values (not transferable)
- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus
- OpenAI: GPT-4o, GPT-4o-mini, o1 series
- Google: Gemini 2.5 Pro, Gemini 2.5 Flash
- DeepSeek: R1 series, V3 models
- 100+ Others: Full OpenRouter catalog
- GPT-Image-1: High-quality image generation
- Hover over any message
- Click the branch icon
- Continue the conversation from that point
- Original chat remains unchanged
- Open chat actions menu (3 dots)
- Click "Share Chat"
- Copy the generated link
- Others can view and import the conversation
- Drag & drop files onto chat input
- Supports images, PDFs, documents, code files
- Up to 5 files per message
- Auto-switches to multimodal models when needed
volo-chat/
├── ui/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ │ ├── chat/ # Chat-specific components
│ │ │ ├── sidebar/ # Navigation and chat list
│ │ │ └── settings/ # API key management
│ │ ├── hooks/ # React hooks
│ │ ├── stores/ # Zustand state management
│ │ ├── types/ # TypeScript definitions
│ │ └── services/ # API communication
│ └── package.json
├── server/ # Hono API backend
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ │ ├── chat-messaging.ts
│ │ │ ├── chat-sharing.ts
│ │ │ ├── chat-branching.ts
│ │ │ └── image-generation.ts
│ │ ├── services/ # Business logic
│ │ │ ├── ai/ # AI provider integrations
│ │ │ └── ChatCopyService.ts
│ │ ├── schema/ # Database schema
│ │ └── middleware/ # Auth and rate limiting
│ └── package.json
└── scripts/ # Development utilities
Models not loading:
- Add OpenRouter API key in Settings
- Check API key validity at openrouter.ai
File uploads failing:
- Verify R2 bucket is configured in
wrangler.toml - Check file size limits (10MB max)
- Ensure stable internet connection
Database connection issues:
- Verify
DATABASE_URLinwrangler.toml - Ensure database schema is initialized:
cd server && pnpm db:push
Authentication problems:
- Check Firebase configuration in
firebase-config.json - Verify
FIREBASE_PROJECT_IDmatches in both files
This project was built using "document-driven development" with Cursor agents - check out the development timelapse showing how 5k+ lines of code were written in 2-3 hours!
Areas for contribution:
- Web search
- Ability to modify generated images
- Resumable streams
- Code/markdown canvas (editable)
- MCPs & tool integrations
MIT License - see LICENSE file for details.