← 返回
未分类 Key 中文

Social Media Platform

Build a plugin-based social media management platform with multi-platform publishing, content calendar, brand voices, AI content generation via LangGraph, an...
构建基于插件的社交媒体管理平台,支持多平台发布、内容日历、品牌声音、基于LangGraph的AI内容生成,...
brandonwadepackard-cell
未分类 clawhub v1.0.0 1 版本 99447.5 Key: 需要
★ 0
Stars
📥 180
下载
💾 0
安装
1
版本
#latest

概述

Social Media Platform Builder

Build a complete social media management system with plugin architecture, AI-powered content generation, and multi-platform publishing.

Architecture

┌─────────────────────────────────────┐
│         Frontend (5 pages)          │
│  Dashboard│Compose│Calendar│Analytics│Settings│
├─────────────────────────────────────┤
│         API Layer (FastAPI)         │
│  Posts CRUD│Publishing│Calendar│AI  │
├─────────────────────────────────────┤
│      Plugin Registry (per-platform) │
│  Twitter│Instagram│YouTube│FB│TikTok│Manual│
├─────────────────────────────────────┤
│    LangGraph Content Pipeline       │
│  Voice→Research→Draft→Optimize→Save │
├─────────────────────────────────────┤
│         Supabase (6 tables)         │
└─────────────────────────────────────┘

Step 1: Supabase Tables

Create 6 tables:

  • social_posts — id, platform, content, status (draft/scheduled/published/failed), media_urls, published_at, post_url, engagement_metrics (JSONB)
  • platform_connections — id, platform, account_name, credentials (JSONB), status, scopes
  • content_calendar — id, post_id (FK), scheduled_for, platform, status
  • brand_voices — id, name, description, tone, example_phrases (JSONB array), is_default
  • social_analytics — id, post_id (FK), platform, impressions, clicks, likes, shares, comments, fetched_at
  • publish_queue — id, post_id (FK), platform, status, retry_count, error_message

Seed 3-5 brand voices. Example voices:

  • Primary Voice (default) — authoritative, clear, educational
  • Casual — conversational, friendly, uses contractions
  • Coach — motivational, direct, action-oriented

Step 2: Plugin System

Base class pattern:

class SocialPlugin:
    platform: str
    def validate_credentials(self, creds: dict) -> bool
    def publish(self, content: str, media_urls: list = None) -> dict
    def get_analytics(self, post_id: str) -> dict
    def format_content(self, content: str, max_length: int) -> str

class PluginRegistry:
    _plugins: dict[str, SocialPlugin] = {}
    def register(self, plugin: SocialPlugin)
    def get(self, platform: str) -> SocialPlugin
    def list_active(self) -> list[str]

Platform-specific implementations:

  • Twitter: tweepy or requests to v2 API. 280 char limit. Free tier = 100 posts/month.
  • Facebook: Graph API v21.0. Page Access Token required. Post to /{page_id}/feed.
  • Instagram: Graph API via FB Page Token. Post to /{ig_user_id}/media/{ig_user_id}/media_publish. Image required.
  • YouTube: google-auth + google-api-python-client. OAuth with youtube.upload scope. Upload via resumable upload API.
  • TikTok: Content Posting API (requires app review + demo video). Use Manual mode as fallback.
  • Manual: No API — generates copy + suggests optimal posting times. Fallback for any unconnected platform.

Step 3: LangGraph Content Pipeline

6-node graph:

load_voice → research_context → generate_drafts → optimize_per_platform → finalize → END
  • load_voice: Pull selected brand voice from Supabase
  • research_context: Query knowledge vault / RAG for relevant domain content
  • generate_drafts: LLM generates 2-3 draft variants in the voice
  • optimize_per_platform: Adapt each draft per platform (length, hashtags, media suggestions)
  • finalize: Store drafts in social_posts as draft status

Step 4: API Endpoints

Core routes (~19 endpoints):

  • GET/POST /api/social/posts — CRUD
  • POST /api/social/posts/{id}/publish — publish to selected platforms
  • GET/POST /api/social/calendar — calendar view + scheduling
  • GET /api/social/analytics — aggregated metrics
  • GET/POST /api/social/voices — brand voice management
  • GET/POST /api/social/connections — platform credentials
  • POST /api/social/generate — AI content generation (triggers LangGraph)

Step 5: Frontend Pages

5 pages with shared dark-theme shell (sidebar nav, top bar):

  1. Dashboard — post count by platform, recent activity, quick-publish
  2. Compose — rich editor, platform multi-select, voice picker, live preview cards per platform
  3. Calendar — month view, color-coded by platform, drag-to-reschedule
  4. Analytics — Chart.js line/bar charts for engagement over time
  5. Settings — platform connection forms (OAuth flows), brand voice editor

Key Patterns

  • Credentials in JSONB: Each platform stores different auth shapes (API keys vs OAuth tokens vs page tokens) in a single credentials JSONB column
  • Graceful degradation: Always include Manual plugin as fallback — generates copy even without API access
  • Platform content limits: Enforce per-platform (Twitter 280, IG needs image, YT needs video, FB 63K)
  • Publish queue with retry: Failed publishes go to retry queue with exponential backoff

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 06:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Supabase Dashboard Builder

brandonwadepackard-cell
Build admin dashboards and command centers backed by Supabase REST API with D3.js force graphs, Chart.js visualizations,
★ 0 📥 258

Hume EVI + LangGraph Integration

brandonwadepackard-cell
使用 interrupt/resume 模式将 Hume EVI 语音 AI 与 LangGraph 集成。适用于需要 Twilio 电话处理和 Hume EVI 的语音 AI 代理开发。
★ 0 📥 287
communication-collaboration

Domain Email Forwarding

brandonwadepackard-cell
为自定义域名设置邮件转发,接收验证码、密码重置及其他邮件到您拥有但不常用于邮件收发的域名。
★ 0 📥 735