A modern, responsive AI chat workspace built with React, TypeScript, and Google Gemini
Features β’ Quick Start β’ Installation β’ Deployment β’ Contributing
| Status | Description |
|---|---|
| π’ Stable | Production ready |
| π’ Active | Regular updates |
| π’ Maintained | Bug fixes & features |
| π’ Documented | Comprehensive docs |
- β Workspace UI: Sidebar with saved chat history, "New Chat", and an editable profile
- β Design: "Midnight Indigo" dark theme + premium light theme, with a signature animated AI orb
- β AI Chat: Google Gemini integration, suggestion grid, retry & error recovery
- β Security: Session-scoped API key storage, input validation
- π Roadmap: See Issues for upcoming features
- Sidebar Navigation: Persistent chat history with rename/delete, a one-click "New Chat", and an editable local profile
- "Midnight Indigo" Theme: A premium dark-first design with a polished light variant, toggleable anytime
- Signature AI Orb: A pure-CSS glass-marble orb used as the brand mark, hero and thinking indicator
- Responsive Design: Fixed sidebar on desktop, slide-in drawer on mobile β works across all devices
- Accessibility: Keyboard-navigable, clear focus styles, and
prefers-reduced-motionsupport
- Gemini Integration: Powered by Google Gemini 2.5 Flash for intelligent, contextual responses
- Smart Suggestions: Pre-built prompts for common use cases
- Context Awareness: Maintains conversation context throughout the chat
- Error Recovery: Intelligent retry mechanisms with fallback options
- Multiple Chats: Start as many conversations as you like and switch between them instantly
- Persistent History: Conversations are saved in your browser and survive reloads
- Auto-Titles: Each chat is named from your first message β rename or delete anytime
- User API Keys: Use your own Google Gemini API key for personal use
- Server Fallback: Built-in server with default API key for easy setup
- Session Storage: Your API key is kept only for the current browser session and never sent to our servers
- Key Validation: Real-time API key testing and validation
- Fast Loading: Optimized bundle size and lazy loading
- Error Handling: Comprehensive error handling with user-friendly messages
- Retry Logic: Automatic retry mechanisms for failed requests
- Offline Support: Graceful degradation when offline
- TypeScript: Full type safety and excellent developer experience
- Modern Stack: React 18, Vite, Tailwind CSS, and more
- Hot Reload: Fast development with instant feedback
- ESLint & Prettier: Consistent code formatting and quality
Click to expand
β‘ Get up and running in under 5 minutes!
| Requirement | Version | Download |
|---|---|---|
| Node.js | β₯ 20.0.0 | Download |
| npm | Latest | Included with Node.js |
| Gemini API Key | Any | Get Key |
# Clone, then let EchoAI install deps, configure env vars, and start both apps
git clone https://github.com/droidbg/EchoAI.git && cd EchoAI && npm run dev
npm run devis end-to-end: it installs the client & server dependencies (first run only), sets safe defaults likeVITE_SERVER_URL, interactively asks for yourGEMINI_API_KEY(with steps to get one), then starts the client and server together.
git clone https://github.com/droidbg/EchoAI.git
cd EchoAI# Install client dependencies
cd client
npm install
# Install server dependencies
cd ../server
npm install# Copy environment templates
cp client/.env.example client/.env
cp server/.env.example server/.envEdit the environment files:
client/.env:
VITE_SERVER_URL=http://localhost:3080/server/.env:
GEMINI_API_KEY=AIza-your-gemini-api-key-here# Terminal 1: Start the server
cd server
npm start
# Terminal 2: Start the client
cd client
npm startVisit http://localhost:5173 to see EchoAI in action! π
This setup includes both the React frontend and Node.js backend:
# Clone and setup
git clone https://github.com/droidbg/EchoAI.git
cd EchoAI
# Install all dependencies
npm run install:all
# Configure environment
cp client/.env.example client/.env
cp server/.env.example server/.env
# Start both client and server
npm run devIf you prefer to use your own backend or API:
# Clone and setup client only
git clone https://github.com/droidbg/EchoAI.git
cd EchoAI/client
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Start client
npm startFor deploying just the backend:
# Clone and setup server only
git clone https://github.com/droidbg/EchoAI.git
cd EchoAI/server
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Start server
npm start| Variable | Description | Default | Required |
|---|---|---|---|
VITE_SERVER_URL |
Backend server URL | http://localhost:3080/ |
Yes |
VITE_DEBUG |
Enable debug mode | false |
No |
| Variable | Description | Default | Required |
|---|---|---|---|
GEMINI_API_KEY |
Your Gemini API key | - | Yes |
PORT |
Server port | 3080 |
No |
NODE_ENV |
Environment mode | development |
No |
CLIENT_URL |
Client URL for CORS | - | No (production) |
-
Get a Gemini API Key:
- Visit Google AI Studio
- Create a new API key
- Copy the key (starts with
AIza)
-
Add to EchoAI:
- Click the settings gear icon in the top-right corner
- Paste your API key in the "Gemini API Key" field
- Click "Save Key"
- The system will test your key automatically
-
Add to Server Environment:
# In server/.env GEMINI_API_KEY=AIza-your-gemini-api-key-here -
Restart the Server:
cd server npm start
- Start a Conversation: Type your message in the input field
- Send Message: Press Enter or click the send button
- View Response: The AI response will appear in the chat
- Continue Chatting: Keep the conversation going naturally
EchoAI provides helpful suggestions to get you started:
- "Explain quantum computing" - Get explanations of complex topics
- "Write a creative story" - Generate creative content
- "Help with coding" - Get programming assistance
- "Plan a vacation" - Get travel planning help
When errors occur, EchoAI provides helpful options:
- Try Again: Retry the failed request
- Use Your API Key: Switch to your personal API key
- Clear Error: Dismiss the error and continue
Access settings by clicking the gear icon:
- API Key Management: Add, test, or remove your API key
- Theme Toggle: Switch between dark and light modes
- Key Status: See which API key is currently active
client/
βββ src/
β βββ components/ # React components
β β βββ Sidebar.tsx # Workspace nav: history, new chat, profile
β β βββ Header.tsx # Top bar: status, settings, theme toggle
β β βββ Orb.tsx # Signature animated AI orb
β β βββ ChatBody.tsx # Message list + welcome / suggestion grid
β β βββ ChatInput.tsx # Composer
β β βββ AiChat.tsx # AI message bubble
β β βββ UserChat.tsx # User message bubble
β β βββ TypingIndicator.tsx # Thinking animation
β β βββ InlineErrorOptions.tsx # In-bubble retry / use-own-key actions
β β βββ SettingsModal.tsx # API key settings
β βββ utils/ # Utilities & state
β β βββ Api.ts # API communication
β β βββ ApiKeyManager.ts # API key management
β β βββ useConversations.ts # Reducer-backed chat store (localStorage)
β βββ App.tsx # Workspace shell & orchestration
β βββ main.tsx # Application entry point
βββ public/ # Static assets
βββ package.json # Dependencies and scripts
server/
βββ index.js # Main server file
βββ package.json # Dependencies and scripts
βββ vercel.json # Vercel deployment config
βββ .env.example # Environment template
- React 18 - Modern React with hooks,
useReducerstate and concurrent features - TypeScript - Type-safe JavaScript development
- Vite - Fast build tool and development server
- Tailwind CSS 4 - Utility-first styling layered over a custom design-token system
- Fraunces + Plus Jakarta Sans - Distinctive serif/sans type pairing
- React Query - Data fetching for chat requests
- Auto Animate - Smooth list animations
- localStorage - Client-side persistence for saved conversations
- Node.js - JavaScript runtime
- Express - Web application framework
- Google GenAI SDK - Official
@google/genaiclient for Gemini - CORS - Cross-origin resource sharing
- dotenv - Environment variable management
GET /Response:
{
"status": "healthy",
"service": "EchoAI Server",
"version": "2.0.0",
"timestamp": "2024-12-19T10:30:00.000Z",
"environment": "development"
}POST /
Content-Type: application/json
{
"message": "Hello, how are you?"
}Response:
{
"message": "Hello! I'm doing well, thank you for asking. How can I help you today?",
"usage": {
"promptTokenCount": 10,
"candidatesTokenCount": 20,
"totalTokenCount": 30
},
"model": "gemini-2.5-flash"
}Error Responses:
| Status | Error | Description |
|---|---|---|
| 400 | Invalid request | Missing or invalid message |
| 401 | Invalid API key | Gemini API key is invalid |
| 402 | Insufficient quota | Gemini API quota exceeded |
| 429 | Rate limit exceeded | Too many requests |
| 500 | Internal server error | Server-side error |
interface Message {
sender: 'user' | 'ai';
message: string;
isError?: boolean;
errorId?: string;
}// Fetch AI response
fetchResponse(messages: Message[]): Promise<{ message: string }>
// API Key Management
ApiKeyManager.getApiKey(): string | null
ApiKeyManager.setApiKey(key: string): void
ApiKeyManager.clearApiKey(): void
ApiKeyManager.validateApiKeyFormat(key: string): { isValid: boolean; message: string }
ApiKeyManager.testApiKey(key: string): Promise<{ isValid: boolean; message: string }># Install Vercel CLI
npm i -g vercel
# Deploy client
cd client
vercel
# Follow the prompts to configure# Deploy server
cd server
vercel
# Add environment variables in Vercel dashboard
# GEMINI_API_KEY=your-key-here# Install Railway CLI
npm i -g @railway/cli
# Login and deploy
railway login
railway init
railway up# Dockerfile for server
FROM node:24-alpine
WORKDIR /app
COPY server/package*.json ./
RUN npm ci --only=production
COPY server/ .
EXPOSE 3080
CMD ["npm", "start"]# Install PM2
npm i -g pm2
# Start server with PM2
cd server
pm2 start index.js --name echoai-server
pm2 startup
pm2 save# Server
GEMINI_API_KEY=AIza-your-production-key
NODE_ENV=production
PORT=3080
CLIENT_URL=https://your-client-domain.com
# Client
VITE_SERVER_URL=https://your-server-domain.comWe welcome contributions to EchoAI! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test them
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Fork and clone
git clone https://github.com/droidbg/EchoAI.git
cd EchoAI
# Install dependencies
npm run install:all
# Start development servers
npm run dev- Use TypeScript for all new code
- Follow ESLint and Prettier configurations
- Add JSDoc comments for complex functions
- Write meaningful commit messages
- Test your changes thoroughly
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Google for the Gemini models and the GenAI SDK
- React Team for the excellent framework
- Vercel for the deployment platform
- All Contributors who help make EchoAI better
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: Security Policy
Made with β€οΈ by the EchoAI Contributors
β Star us on GitHub β’ π Report Bug β’ π‘ Request Feature





