Spaces:
Running
Running
Ctrl+K
- 1.52 kB initial commit
- 212 Bytes # Social Media Channels Management Page - AI Generation Prompt ## Page Overview Create a comprehensive **Social Media Channels** management page (`/channels`) for the Conversena platform. This page is accessed through the sidebar navigation under "المحادثات" (Conversations) and serves as a centralized hub for managing platform integrations and social media channel configurations. ## Technical Requirements ### Page Location & Navigation - **Route**: `/channels` - **Sidebar Navigation**: Under "المحادثات" (Conversations) section - **Page Title**: "قنوات التواصل الاجتماعي" (Social Media Channels) - **Breadcrumb**: الرئيسية > المحادثات > قنوات التواصل الاجتماعي ### Language & Localization - **Primary Language**: Arabic (RTL) - **Text Direction**: Right-to-left layout - **Font**: Arabic-optimized font (e.g., Tajawal, Cairo, or similar) - **Date Format**: Arabic/Islamic date format support - **Number Format**: Arabic numerals with proper RTL alignment ## Core Functionality (Based on Functional Requirements) ### Supported Platforms (CA-001) The page should manage three primary social media integrations: 1. **فيسبوك ماسنجر** (Facebook Messenger) 2. **انستغرام** (Instagram Direct Messages) 3. **واتساب بيزنس** (WhatsApp Business Cloud API) ### Channel Data Display For each connected channel, display: - **Platform Name**: اسم المنصة - **Account Name**: اسم الحساب - **Connection Status**: حالة الاتصال (متصل/غير متصل/خطأ) - **Account ID**: معرف الحساب - **Last Activity**: آخر نشاط - **Message Count**: عدد الرسائل (اليوم/هذا الأسبوع/هذا الشهر) - **Active Conversations**: المحادثات النشطة - **Response Rate**: معدل الاستجابة - **API Status**: حالة API - **Rate Limit Status**: حالة حد المعدل ### Integration Status Types 1. **متصل** (Connected) - Working properly 2. **غير متصل** (Disconnected) - Not connected 3. **خطأ** (Error) - Connection error 4. **انتهت الصلاحية** (Expired) - Token expired 5. **محدود** (Limited) - Rate limited 6. **معلق** (Suspended) - Account suspended ## Key Features to Include ### 1. Dashboard Overview Section - Total connected channels counter - Total messages processed today - Active conversations across all platforms - Overall health status indicator ### 2. Platform Integration Cards Each platform should have a dedicated card showing: - Platform icon and name - Connection status badge - Quick stats (messages, conversations) - Action buttons (Connect, Disconnect, Configure, Test) - Last sync time ### 3. Channel Configuration Panel - **Facebook Messenger Settings**: - Page selection dropdown - Webhook URL display - Verify token configuration - Page access token status - Greeting message setup - **Instagram Settings**: - Business account selection - Instagram Business API status - Auto-reply configuration - Story mention handling - **WhatsApp Business Settings**: - Business phone number - WhatsApp Business API credentials - Webhook configuration - Template message approval status - Business verification status ### 4. Real-time Monitoring - Live message flow indicator - API response time monitoring - Error rate tracking - Connection stability metrics ### 5. Webhook Management - Webhook URL configuration - Webhook verification status - Test webhook functionality - Webhook logs and debugging ## Design Specifications ### Layout Structure ``` Header Section: - Page title with social media icon - Quick stats cards (4 cards in a row) - Add New Channel button - Refresh All button Platform Cards Section: - Three main platform cards (Facebook, Instagram, WhatsApp) - Each card shows status, stats, and actions - Expandable configuration panels Monitoring Section: - Real-time activity feed - Message flow visualization - Error alerts and notifications - Performance metrics Settings Section: - Global webhook settings - Rate limit configurations - Security settings - Backup and restore options ``` ### Visual Design Requirements - **Color Scheme**: Use platform brand colors (Facebook blue, Instagram gradient, WhatsApp green) - **Icons**: Platform-specific icons and status indicators - **Status Indicators**: Green for connected, red for errors, amber for warnings - **Connection Flow**: Visual connection lines between platforms and ConversAI - **Responsive Design**: Mobile-friendly with collapsible sections ### Platform Card Specifications - **Facebook Card**: Blue theme with Facebook logo - **Instagram Card**: Gradient theme with Instagram logo - **WhatsApp Card**: Green theme with WhatsApp logo - **Action Buttons**: Connect, Configure, Test, Disconnect - **Status Badges**: Real-time status indicators - **Stats Display**: Message counts, response rates, uptime ## Functional Behavior ### Connection Management Based on CA-033 to CA-038 requirements: 1. **Facebook Messenger Integration**: - OAuth flow for page permissions - Webhook verification process - Multiple page support per client - Real-time message handling 2. **Instagram DM Integration**: - Business account linking - Instagram Graph API setup - Story mention handling - Media message support 3. **WhatsApp Cloud API Integration**: - Business phone verification - Webhook configuration - Template message management - Message rate limit monitoring ### Real-time Updates - Auto-refresh connection status every 30 seconds - Live message count updates - Real-time error notifications - API health monitoring ### Multi-Channel Support (CA-038) - Support multiple social media accounts per client - Account switching interface - Unified message management - Cross-platform analytics ## Content & Messaging ### Arabic UI Text Examples - **Main Title**: "إدارة قنوات التواصل الاجتماعي" - **Connection Status**: - "متصل بنجاح" (Successfully Connected) - "فشل في الاتصال" (Connection Failed) - "يتم الاتصال..." (Connecting...) - **Action Buttons**: - "ربط الحساب" (Connect Account) - "اختبار الاتصال" (Test Connection) - "إعادة الاتصال" (Reconnect) - "قطع الاتصال" (Disconnect) - **Stats Labels**: - "الرسائل اليوم" (Messages Today) - "المحادثات النشطة" (Active Conversations) - "معدل الاستجابة" (Response Rate) ### Platform-Specific Arabic Text - **Facebook**: "صفحة فيسبوك" (Facebook Page) - **Instagram**: "حساب انستغرام التجاري" (Instagram Business Account) - **WhatsApp**: "واتساب بيزنس" (WhatsApp Business) ### Error Messages (Arabic) - **Connection Error**: "خطأ في الاتصال - يرجى المحاولة مرة أخرى" - **Token Expired**: "انتهت صلاحية الرمز - يرجى إعادة التفويض" - **Rate Limited**: "تم تجاوز حد المعدل - يرجى الانتظار" ## Technical Implementation Notes ### API Integration Requirements - **Meta Graph API**: For Facebook and Instagram integration - **WhatsApp Cloud API**: For WhatsApp Business integration - **Webhook Management**: Real-time message processing - **Rate Limit Handling**: Respect API limits (CA-036) ### Security Features - Secure token storage and encryption - Webhook signature verification - API key rotation support - Access log monitoring ### Performance Optimization - Efficient API call management - Message queue handling for high volume - Real-time status updates without page refresh - Optimized for mobile devices ## Configuration Wizards ### Facebook Messenger Setup Wizard 1. **Page Selection**: Choose Facebook business page 2. **Permissions**: Grant required permissions 3. **Webhook Setup**: Configure webhook URL 4. **Testing**: Send test message 5. **Activation**: Enable bot responses ### Instagram Setup Wizard 1. **Business Account**: Link Instagram business account 2. **API Access**: Configure Instagram Graph API 3. **Permissions**: Grant DM permissions 4. **Webhook**: Set up Instagram webhooks 5. **Testing**: Test DM functionality ### WhatsApp Setup Wizard 1. **Phone Verification**: Verify business phone number 2. **API Credentials**: Enter WhatsApp API credentials 3. **Webhook Config**: Configure webhook endpoint 4. **Template Setup**: Create message templates 5. **Testing**: Send test WhatsApp message ## Monitoring & Analytics ### Real-time Metrics Display - **Message Volume**: Live message count per platform - **Response Time**: Average bot response time - **Error Rate**: API error percentage - **Uptime**: Connection stability percentage ### Health Indicators - **Green**: All systems operational - **Yellow**: Minor issues or warnings - **Red**: Critical errors requiring attention - **Gray**: Platform disconnected ### Activity Feed - Recent message activity across all platforms - Connection status changes - Error notifications - Configuration updates ## Mobile Optimization - Responsive design for tablet and mobile - Touch-friendly connection buttons - Swipe gestures for platform cards - Collapsible configuration panels - Optimized Arabic text rendering ## Integration Testing Tools - **Send Test Message**: Test bot responses - **Webhook Validator**: Verify webhook configuration - **Connection Tester**: Test API connectivity - **Message Simulator**: Simulate incoming messages This page should provide comprehensive social media channel management while maintaining seamless integration with the ConversAI system and supporting the multi-channel messaging requirements outlined in your functional specifications. , and make the sidebar responsive - Initial Deployment
- 6.8 kB ✍️ 24/03 - 16:45 - Manual changes.
- 388 Bytes initial commit