๐ค YOGA AI Assistant -โจ
๐ค What is this?
This is a smart chatbot website that can help you with different things depending on what you need. Think of it as having 6 different AI assistants in one app! ๐
๐ญ What can it do?
The AI has 6 different "modes" or personalities:
- ๐ง General โ Answers everyday questions and has normal conversations ๐ฌ
- ๐ฏ Productivity โ Helps you organize tasks and manage your time โฐ
- โค๏ธ Wellness โ Gives advice about health, fitness, and feeling good ๐ฑ
- ๐ Learning โ Acts like a tutor to help you study and learn new things ๐
- ๐ก Creative โ Helps with brainstorming ideas and creative projects ๐จ
- ๐ BFF โ Talks like a friendly Gen-Z bestie for emotional support ๐ฏโโ๏ธ
โจ Cool Features
- ๐ค Voice Chat: Talk to it instead of typing โ and it talks back!
- ๐ง Multiple AI Brains: Powered by Groq, Google, OpenAI, Claude ๐ฅ
- ๐พ Remembers Conversations: Keeps memory per mode ๐
- ๐ฑ Responsive Design: Works great on desktop, tablet, and phone
- ๐ Dark/Light Mode: Choose your vibe โ๏ธ๐
๐จโ๐ป Technical Stuff (for developers)
Built using modern web tech:
- Next.js, React, TypeScript, Tailwind CSS
- Uses Vercel AI SDK to connect with multiple AI models
๐ง Multi-Mode Intelligence
Mode | Description |
---|---|
๐ง General | All-purpose companion for everyday chats |
๐ฏ Productivity | Task manager, planner, and time optimizer |
โค๏ธ Wellness | Health tips, mental support, and fitness guidance |
๐ Learning | Tutor-like help for learning and studying |
๐ก Creative | Idea generator for all your creative projects |
๐ BFF | Casual chats, emotional support, Gen-Z style |
๐ค Multi-Provider AI Support
Provider | Description |
---|---|
Groq | Fast responses via Llama models (no API key needed) |
Google Gemini | Multimodal AI from Google (no API key needed) |
OpenAI | GPT-4o, GPT-4 Turbo, GPT-3.5 (API key required) |
Claude | Anthropic's Claude models (API key required) |
๐ Advanced Chat Interface
- โก Streaming Responses
- ๐ง Mode-Specific Memory
- ๐ฌ Persistent Chat History
- ๐จ Beautiful Responsive UI
- ๐ Dark & Light Themes
- ๐ค Message Export (coming soon)
๐ค Voice Integration
- Speech-to-Text input
- Text-to-Speech output
- Multi-language support
- Voice Controls with indicators and interruption
- Natural-Sounding Voices
โก Quick Actions & Smart Features
- Quick Prompts per mode
- One-Click Access for tasks
- Context-Aware Suggestions
- Robust Error Handling
- Secure API Key Management
๐จ Dynamic AI Visualization
- Interactive 3D Particle System
- Mode-based Color Themes
- Real-Time Activity Animation
- Live AI Usage Analytics
๐ Activity Analytics
- Track message counts, response times, and session data
- Mode Usage Breakdown
- Live AI Status + voice activity monitoring
๐ ๏ธ Tech Stack
Frontend
- Next.js 14, React 18, TypeScript
- Tailwind CSS, shadcn/ui, Lucide Icons
- Three.js for 3D effects
Backend & AI
- Vercel AI SDK
- Providers: Groq, Gemini, OpenAI, Claude
- Speech APIs: WebKit for STT/TTS
- Storage: localStorage for persistence
๐ Smart Model Selection
let modelType = "fast"; // llama-3.1-8b-instant
if (query.includes("analyze", "compare", "plan", "strategy")) {
modelType = "reasoning"; // llama-3.3-70b
}
if (query.includes("creative", "idea", "write", "design")) {
modelType = "creative"; // qwen3-32b
}
๐ Getting Started
Prerequisites
- Node.js 18+
- Modern browser (for speech features)
- Optional: API Keys for OpenAI/Claude
Installation
Use
git clone https://github.com/yogarathnam-s/ai-assistant.git
cd ai-assistant
npm install # or bun install
Set up your .env
file:
GROQ_API_KEY=your_key
GOOGLE_GENERATIVE_AI_API_KEY=your_key
# Optional:
# OPENAI_API_KEY=
# ANTHROPIC_API_KEY=
Run dev server:
npm run dev # or bun run dev
๐ฎ Usage Guide
Switching Modes
Click any of the six mode icons to shift the assistantโs behavior.
Choosing AI Providers
Select between:
- Groq (default)
- Gemini
- OpenAI
- Claude
Using Voice Features
- Click ๐ค to talk
- Click ๐ to hear the AI speak
- Works in multiple languages
Managing Chats
- Auto-saves per mode
- Clear history with trash button
- Switch modes without losing past chats
Themes & UX
- Toggle between Light and Dark
- Fully responsive and accessible
๐๏ธ Project Structure
ai-assistant/
โโโ app/
โ โโโ api/chat/route.ts # Multi-provider chat API endpoint
โ โโโ globals.css # Global styles and theme variables
โ โโโ layout.tsx # Root layout with metadata
โ โโโ page.tsx # Main application orchestrator
โโโ components/
โ โโโ ui/ # shadcn/ui base components
โ โโโ chat-header.tsx # Header with controls and mode display
โ โโโ chat-sidebar.tsx # Mode selection and quick actions
โ โโโ chat-messages.tsx # Message display and formatting
โ โโโ chat-input.tsx # Input field with voice controls
โ โโโ chat-container.tsx # Chat logic and state management
โ โโโ ai-visualization.tsx # 3D particle system visualization
โ โโโ activity-matrix.tsx # Real-time analytics dashboard
โโโ hooks/
โ โโโ use-speech.ts # Speech recognition and synthesis
โโโ types/
โ โโโ speech.d.ts # TypeScript definitions for speech APIs
โโโ lib/
โโโ utils.ts # Utility functions and helpers
Each folder is modularized for easy extension.
๐ง Configuration
Model Selection
Set preferred models per task:
const MODELS = {
groq: {
fast: "llama-3.1-8b-instant",
reasoning: "llama-3.3-70b-versatile",
creative: "qwen/qwen3-32b"
},
gemini: { default: "gemini-2.0-flash" },
openai: { default: "gpt-4o" },
claude: { default: "claude-3-5-sonnet-20241022" }
}
Customize:
-
Quick Actions โ in
app/page.tsx
- Mode Styling โ color and behavior
-
Particles โ in
ai-visualization.tsx
-
Voice Settings โ in
use-speech.ts
๐ Key Highlights
- Smart AI Model Routing
- Per-Mode Chat History
- Real-time 3D Feedback
- Voice in + out
- Multi-provider support
- Analytics dashboard
๐ค Contributing
We welcome contributions!
git checkout -b feature/your-feature
# make changes
git commit -m "Add feature"
git push origin feature/your-feature
Submit a pull request!
Dev Guidelines
- Use TypeScript
- Follow existing structure
- Add tests if possible
- Keep it accessible and responsive
๐ License
MIT License โ See LICENSE
๐ Support & Community
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ง Email:
yogarathinam81@gmail.com
๐ฎ Roadmap
Coming Soon
- [ ] Export chat history
- [ ] Custom AI personalities
- [ ] Real-time collaboration
- [ ] Voice cloning
Performance
- [ ] Response caching
- [ ] Data compression
โญ Star the repo โข ๐ Report bugs
Top comments (0)