A powerful AI chat interface powered by Google's Gemini 1.5 Flash model
Built with Flask 3, Vercel, and modern web technologies 🚀
Demo • Documentation • Quick Start • Deployment • Contributing
Try Dragon AI instantly:
- 🌐 Visit https://dragon-ai-assistant.vercel.app/
- 🔒 No signup required
- 💬 Start chatting with the AI
Or run locally:
# Clone repository
git clone https://github.com/bniladridas/dragon-ai-assistant.git
cd dragon-ai-assistant
# Install Vercel CLI
npm i -g vercel
# Install dependencies
pip install -r requirements.txt
# Run development server
vercel dev
Your Flask application will be available at http://localhost:3000
.
- 🎨 New Twitter/X-inspired dark theme UI
- 🚀 Vercel Edge Functions integration
- 🤖 Upgraded to Gemini 1.5 Flash
- 📱 Enhanced mobile responsiveness
- 🔄 Real-time chat synchronization
- 🎨 Custom SVG animations
- 🌐 Global CDN distribution
- ⚡ Flask 3.0 support
- ⚡ 50% faster response times
- 📦 Reduced bundle size
- 🔧 Optimized API calls
- 🌍 Enhanced global latency
flowchart TB
subgraph Client
B[Browser] --> V[Vercel Edge Network]
end
subgraph Cloud["Cloud Infrastructure"]
V --> VF[Vercel Frontend]
V --> PS[Python Serverless Function]
PS --> G[Google Gemini API]
subgraph Vercel["Vercel Platform"]
VF --> |Static Assets| VC[Vercel CDN]
PS --> |Environment Variables| VE[Vercel ENV]
end
end
subgraph Storage
B --> |Chat History| LS[Local Storage]
end
style B fill:#1D9BF0,color:#fff
style V fill:#000000,color:#fff
style VF fill:#0070F3,color:#fff
style PS fill:#16181C,color:#fff
style G fill:#4285F4,color:#fff
style VC fill:#0070F3,color:#fff
style VE fill:#0070F3,color:#fff
style LS fill:#1DA1F2,color:#fff
Dragon AI uses the Web Server Gateway Interface (WSGI) with Flask 3 to enable handling requests on Vercel with Serverless Functions. The architecture is designed as follows:
flowchart TB
U[User Interface] --> |HTTP Request| F[Flask 3 Server]
F --> |Prompt| G[Gemini 1.5 Flash API]
G --> |Generated Response| F
F --> |JSON Response| U
subgraph Frontend
U --> |Store| LC[Local Storage]
LC --> |Load| U
end
subgraph Cloud Infrastructure
F --> |Vercel Edge| V[Vercel Platform]
V --> |CDN| C[Global CDN]
end
- 💬 Real-time AI chat interface
- 📝 Markdown & code syntax highlighting
- 💾 Local chat history
- 📱 Responsive design
- 🌙 Dark mode
- ⚡ Fast response times
- 🔒 Secure API handling
- 🔄 WebSocket support
- 📦 Efficient bundling
- 🌐 Edge network distribution
- 🔧 Environment management
- 📊 Performance monitoring
- 🔍 SEO optimization
- 🚀 CI/CD pipeline
{
"version": 2,
"builds": [
{
"src": "app.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "app.py"
}
]
}
Deploy the example using Vercel:
- TTFB: ~100ms
- FCP: ~300ms
- LCP: ~800ms
- TTI: ~1.2s
- Python 3.8+
- Flask
- Google Cloud API key
- Vercel account
GOOGLE_API_KEY=your_api_key_here
VERCEL_ENV=development
DEBUG=True
POST /generate
Content-Type: application/json
{
"prompt": "string",
"chatId": "number"
}
{
"response": "string",
"metadata": {
"model": "gemini-1.5-flash",
"timestamp": "string",
"processTime": "number"
}
}
- 🔐 API key encryption
- 🛡️ Rate limiting
- 🔍 Input validation
- 🚫 XSS protection
- 📝 Security logs
- 📈 Real-time metrics
- 🔍 Error tracking
- 📊 Usage analytics
- ⚡ Performance monitoring
- 🌡️ Health checks
- Fork repository
- Create feature branch
- Commit changes
- Push to branch
- Create Pull Request
MIT License - View License
- Google AI Team
- Vercel Platform
- Open Source Community
- 📧 Email: [email protected]
- 💬 Discord: Join
- 🐦 Twitter: @DragonAI
- Status Page: status.dragon-ai.vercel.app
- Blog: blog.dragon-ai.vercel.app
- Updates: @DragonAIStatus
Made with ❤️ by Dragon Team | Powered by Vercel
© 2024 Dragon AI. All rights reserved.
© 2024 Dragon AI. All rights reserved.