Overview
The GitaChat widget provides a beautiful, self-contained way to display daily verses from the Bhagavad Gita on any website. The widget is designed to be lightweight, visually appealing, and automatically updates with new content each day.Daily Rotation
Automatically cycles through ~700 verses from the Gita
Beautiful Design
Pre-styled with GitaChat’s signature aesthetic
No Dependencies
Works standalone without external libraries
Performance Optimized
Server-rendered with 1-hour caching
Widget Features
Visual Design
The widget features GitaChat’s characteristic styling:Dark Background
Deep brown background (#1a1410) for an elegant look
Saffron Accents
Traditional saffron color (#d97b2e) for verse references
Clean Typography
Readable serif fonts with proper spacing
Centered Layout
Content centered for visual balance
Content Structure
Each widget display includes: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:44-55
- Chapter and verse reference in saffron color
- Verse translation in a readable cream color
- Centered layout with comfortable padding
Implementation
Standard Iframe Embed
The recommended approach is using an iframe to embed the widget:WordPress Integration
For WordPress sites, add the iframe to a Custom HTML block:React/Next.js Integration
For React or Next.js projects, wrap the iframe in a component:Vue.js Integration
For Vue.js applications:Widget Architecture
Server-Side Rendering
The widget is server-rendered for optimal performance and SEO: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:33-42
- Fast initial load - No client-side JavaScript required
- SEO friendly - Content is available to search engines
- Consistent display - Same verse for all users on a given day
- Error handling - Graceful fallback if API fails
Data Fetching
The widget fetches verses from the backend API with caching: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:14-18
1-Hour Cache
Responses cached for optimal performance
Backend API
Fetches from centralized verse database
Error Resilience
Returns null on failure for graceful handling
JSON Response
Clean data structure with chapter, verse, translation
Customization Options
Size Variations
Compact
180px height for tight spaces
Standard
200px height for balanced display
Large
250px+ height for prominent placement
Full Width
100% width with max-width constraint
Styling Examples
Add custom styling to match your site’s design:Daily Verse Algorithm
Deterministic Selection
The widget uses a deterministic algorithm to select verses, ensuring everyone sees the same verse on a given day: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:2-6
Verse Coverage
~700 Verses
Cycles through entire Bhagavad Gita collection
Daily Updates
New verse automatically appears each day
Global Consistency
Same verse worldwide for any given date
Continuous Loop
Returns to beginning after all verses shown
Use Cases
Blog Integration
Perfect for spiritual, wellness, or lifestyle blogs:Meditation Apps
Integrate into meditation or mindfulness applications:Welcome Screen
Display verse on app launch
Session End
Show verse after meditation sessions
Daily Notification
Link to widget in daily reminders
Profile Pages
Personal daily verse on user profiles
Community Platforms
Add spiritual wisdom to community sites:Performance Considerations
Lightweight
Minimal HTML with no external dependencies
Cached Data
1-hour cache reduces backend load
Server-Rendered
No client-side JavaScript execution
Fast Loading
Optimized for quick display
Performance Metrics
- Initial Load: < 100ms (cached)
- File Size: ~2KB HTML
- No JavaScript: Zero client-side execution
- CDN-Ready: Can be edge-cached globally
Error Handling
The widget includes graceful error handling: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:36-42
- Displays a subtle error message
- Maintains the widget’s visual style
- Prevents broken iframe display
- Allows for automatic recovery on retry
Accessibility
The widget is designed with accessibility in mind:Semantic HTML
Proper HTML structure for screen readers
High Contrast
Cream text on dark background for readability
Readable Fonts
Appropriate font sizes and line height
Title Attribute
Add title attribute to iframe for context
Accessibility Best Practices
Getting Started
Visit the embed page
Go to gitachat.org/embed for the embed code
Interactive Embed Tool
Use the interactive tool to generate and preview your widget
Support & Resources
Embed Generator
Access the official embed code generator
Live Preview
View the widget standalone
Main Site
Explore full GitaChat features
API Documentation
Learn about GitaChat’s API endpoints