The open-source alternative to ChatGPT
Live url: https://e7.chat
A modern, full-featured AI chat application built with Next.js, featuring multi-provider AI model access, image generation, user authentication, chat sharing, branching conversations, file attachments, and cloud synchronization.
- 🤖 Multi-AI Model Support - Access 100+ AI models via OpenRouter integration
- 🔐 Multiple Authentication Methods - Email/password and OAuth (Google, GitHub)
- 📱 Responsive Design - Works seamlessly on desktop and mobile
- 💾 Cloud Sync - Chat history synchronized across devices
- 🔗 Chat Sharing - Share conversations with public links
- 🎨 AI Image Generation - Create images with AI models
- 🌙 Dark Theme - Beautiful, modern dark interface
- 📂 File Uploads - Support for images and PDFs
- 🔍 Search Functionality - Find chats quickly
- 🎯 Chat Management - Rename, delete, and organize conversations
- Node.js 18+ installed
- An Appwrite account (free)
- An OpenRouter
- An OpenAI api key for image generation
git clone https://github.com/ebenezerdon/e7.chat.git
cd e7.chatnpm installCreate a .env.local file in the project root:
# OpenRouter API Configuration
OPENROUTER_API_KEY=your_openrouter_api_key_here
# Site Information (Optional)
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SITE_NAME=e7.chat
# Appwrite Configuration
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_appwrite_project_id
APPWRITE_API_KEY=your_appwrite_server_api_key
# Database Configuration (Optional - will use defaults)
NEXT_PUBLIC_APPWRITE_DATABASE_ID=ai-chat-db
NEXT_PUBLIC_APPWRITE_CHATS_COLLECTION_ID=chats
# Optional: OpenAI API Key for image generation
OPENAI_API_KEY=your_openai_api_key_for_imagesnpm run devVisit http://localhost:3000 to see your application running!
-
Get API Key
- Visit OpenRouter
- Sign up for a free account
- Navigate to API Keys
- Create a new API key
- Copy the key (starts with
sk-or-)
-
Add to Environment
OPENROUTER_API_KEY=sk-or-v1-your-key-here
- Go to Appwrite Console
- Create a new project
- Copy your Project ID
- Go to Auth → Settings
- Add your domain to Domains:
http://localhost:3000,https://yourdomain.com - Enable Email/Password authentication
For Google and GitHub sign-in, follow this OAuth Setup Guide.
- Database:
ai-chat-db - Collections:
chats- Stores chat conversationsshared-chats- Stores shared chat linksuser-chat-metadata- Optimized chat metadatauser-profiles- User preferences and API keys
For each collection, set these permissions:
- Create:
users - Read:
users - Update:
users - Delete:
users
- Go to Overview → Integrate with your server
- Create an API Key with these scopes:
databases.readdatabases.write
- Copy the key to
APPWRITE_API_KEY