Skip to content

gigamaster/ai-media-agent

Repository files navigation

AI Social Media Content Agent

Generate optimized content for all your social media platforms in one click.

AI Media Agent Interface

Features

  • Generate content for multiple social media platforms (LinkedIn, X, Instagram, Facebook, Medium, Telegram)
  • Customize tone, length, and style of content
  • Add images to your posts
  • Save and reuse previous content
  • Support for both Google Gemini and OpenAI-compatible providers

Deployment Options

This application can be deployed in multiple ways:

Option 1: Standalone Repository Deployment (ai-media-agent)

  1. Build the application:
    npm run build
  2. Deploy the contents of the dist folder to any static hosting service

Option 2: Integration with Existing 'codemo' Project

  1. Build the application:
    npm run build
  2. Copy the contents of the dist folder to the appropriate location in the 'codemo' project
  3. No base path configuration is needed, making integration flexible

Option 3: GitHub Pages Deployment

To deploy to GitHub Pages at https://gigamaster.github.io/ai-media-agent/:

  1. Update vite.config.ts to include:
    base: '/ai-media-agent/'
  2. Build and deploy:
    npm run deploy

Local Development

  1. Install dependencies:

    npm install
  2. Start the development server:

    npm run dev
  3. Open your browser to http://localhost:5173

CSS Linting

This project uses Stylelint to ensure CSS code quality. To check for CSS issues:

npx stylelint index.css

To automatically fix CSS issues:

npx stylelint index.css --fix

Usage

  1. Obtain an API key from either:

    • Google AI Studio (for Gemini)
    • Your OpenAI-compatible provider
  2. Click the settings icon (⚙️) in the top right corner and enter your API key.

  3. Fill in the content details:

    • Post Title / Topic (Required)
    • Keywords / Hashtags (Optional)
    • Link (Optional)
    • Content Tone (Optional)
    • Content Length (Optional)
    • Content Style (Optional)
  4. Select target platforms

  5. Add an image (optional)

  6. Click "Generate Content"

  7. Copy, save, or regenerate content as needed

Data Storage

The Content History is stored in the browser's localStorage with the key contentHistory.
The data structure is an array of HistoryItem objects with the following properties:

  • id (string): A unique identifier generated using Date.now().toString()
  • topic (string): The main topic/title of the content
  • platform (string): The social media platform (e.g., "X", "LinkedIn", "Instagram")
  • content (string): The actual generated content text
  • keywords (string, optional): Any keywords or hashtags used
  • link (string, optional): Any link that was included

License

This project is licensed under the MIT License - see the LICENSE file for details.

Created by Nuno Luciano.

About

AI Social Media Content Agent

Resources

License

Stars

Watchers

Forks