Skip to content
VyoumPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

SMMA AI Platform

AI-powered Social Media Marketing Automation platform with multi-agent workflows using LangGraph, Gemini, and Nano Banana Pro (Gemini 3 Pro Image Preview).

Architecture

src/
├── agents/                    # LangGraph-based AI agents
│   ├── contentGeneratorAgent  # Platform-specific post generation
│   ├── scriptGeneratorAgent   # Video scripts (Reels/YouTube/TikTok)
│   ├── calendarAgent          # Campaign & scheduling management
│   ├── chatResponseAgent      # DM response handling
│   ├── imageGeneratorAgent    # AI image generation
│   └── orchestratorAgent      # Multi-agent coordination
├── workflows/                 # LangGraph state machine workflows
│   ├── postGenerationWorkflow
│   ├── scriptGenerationWorkflow
│   ├── calendarWorkflow
│   └── chatWorkflow
├── prompts/                   # Platform-specific prompt templates
│   ├── instagram/
│   ├── linkedin/
│   ├── twitter/
│   ├── scriptGeneration/
│   └── imageGeneration/
├── api/
│   ├── routes/                # Express API routes
│   ├── controllers/           # Request handlers
│   └── middleware/             # Auth & validation
├── services/                  # External service integrations
│   ├── gemini.service          # Google Gemini LLM
│   ├── nanoBananaPro.service   # Image generation (Gemini 3 Pro Image — gemini-3-pro-image-preview)
│   ├── platformIntegration     # Social media APIs
│   └── scheduler.service       # Cron-based publisher
├── models/                    # Mongoose data models
├── utils/                     # Utility modules
└── config/                    # Configuration files

Quick Start

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Start development server
npm run dev

# Start production server
npm start

API Endpoints

Content Generation

Method Endpoint Description
POST /api/content/generate Generate platform-specific post
POST /api/content/script Generate video script
POST /api/content/image Generate AI image
POST /api/content/package Generate post + image combo
POST /api/content/feedback Submit feedback for iteration
GET /api/content/history/:id Get generation history

Calendar & Campaigns

Method Endpoint Description
POST /api/calendar/campaign Create campaign
GET /api/calendar/campaigns List campaigns
GET /api/calendar/upcoming-events Get upcoming events
POST /api/calendar/schedule Schedule a post
GET /api/calendar/scheduled Get scheduled posts
PUT /api/calendar/reschedule/:id Reschedule a post
GET /api/calendar/scan Calendar overview

Chat / DM Responses

Method Endpoint Description
POST /api/chat/respond Generate AI DM response
POST /api/chat/webhook/instagram Instagram webhook
GET /api/chat/history/:userId Get chat history

Example Requests

Generate Instagram Post

curl -X POST http://localhost:3000/api/content/generate \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "topic": "Benefits of morning meditation",
    "tone": "creative",
    "targetAudience": "wellness enthusiasts"
  }'

Generate YouTube Script

curl -X POST http://localhost:3000/api/content/script \
  -H "Content-Type: application/json" \
  -d '{
    "contentType": "youtube",
    "duration": 600,
    "topic": "Top 5 productivity hacks",
    "style": "educational"
  }'

Create Campaign

curl -X POST http://localhost:3000/api/calendar/campaign \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q1 Wellness Campaign",
    "startDate": "2026-03-01",
    "endDate": "2026-03-31",
    "platforms": ["instagram", "linkedin"],
    "frequency": "daily",
    "autoGenerate": true,
    "topics": ["mindfulness", "productivity", "health"]
  }'

Submit Feedback for Iteration

curl -X POST http://localhost:3000/api/content/feedback \
  -H "Content-Type: application/json" \
  -d '{
    "postId": "POST_ID_HERE",
    "feedback": "Make the tone more casual and add more emojis"
  }'

Environment Variables

Variable Description
GEMINI_API_KEY Google Gemini API key (also used for Nano Banana Pro image generation)
GEMINI_MODEL Gemini model name (default: gemini-1.5-pro)
DATABASE_URL MongoDB connection string
CLOUDINARY_CLOUD_NAME Cloudinary cloud name
CLOUDINARY_API_KEY Cloudinary API key
CLOUDINARY_API_SECRET Cloudinary API secret
INSTAGRAM_ACCESS_TOKEN Instagram Graph API token
LINKEDIN_ACCESS_TOKEN LinkedIn API token
LINKEDIN_PERSON_URN LinkedIn person URN (e.g. urn:li:person:abc123)
TWITTER_API_KEY Twitter/X OAuth 2.0 user access token
PORT Server port (default: 3000)
NODE_ENV Environment (development/production)

📖 For detailed step-by-step setup of each platform API, see PLATFORM_SETUP.md

Tech Stack

  • Runtime: Node.js (ES Modules)
  • Framework: Express.js
  • AI/LLM: LangChain + Google Gemini
  • Workflows: LangGraph
  • Image Gen: Nano Banana Pro (gemini-3-pro-image-preview via @google/genai SDK)
  • Database: MongoDB + Mongoose
  • Validation: Zod
  • Scheduling: node-cron

License

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages