Skip to content

kismetkanceled/mediatoolsv.5

Repository files navigation

Impact Genie - AI Content Assistant Platform

Built by Anthropic & EthosX

Impact Genie is an AI-powered content creation and automation platform for digital creators. It combines intelligent caption generation, media processing, and browser automation into a unified workflow accessible via browser extension or web interface.


Repository Structure

This project spans two repositories:

Repository Purpose URL
impactgenie AI Agent Backend + Browser Extensions github.com/kismetkanceled/impactgenie
mediatools Media Processing Hub + Web UI github.com/kismetkanceled/mediatools

System Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                              CLIENT LAYER                                    │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│   ┌─────────────────┐   ┌─────────────────┐   ┌─────────────────────────┐  │
│   │ Chrome Extension│   │Firefox Extension│   │   Web UI (agent-chat)   │  │
│   │   (extension/)  │   │(extension-firefox)│  │  impactgenie.me/        │  │
│   └────────┬────────┘   └────────┬────────┘   └───────────┬─────────────┘  │
│            │                     │                         │                │
│            └─────────────────────┼─────────────────────────┘                │
│                                  │                                          │
│                                  ▼                                          │
│                         HTTPS API Calls                                     │
└──────────────────────────────────┼──────────────────────────────────────────┘
                                   │
                                   ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                         IONOS SERVER (Plesk)                                 │
│                                                                              │
│   ┌─────────────────────────────────────────────────────────────────────┐  │
│   │                    FastAPI Backend (port 8000)                       │  │
│   │                                                                       │  │
│   │   /api/chat           - AI conversation with Genie                   │  │
│   │   /api/generate-caption - Platform-specific caption generation       │  │
│   │   /api/suggest-tags    - Smart tag recommendations                   │  │
│   │   /api/feedback        - User feedback + learning                    │  │
│   │   /api/media/*         - Download, process, convert media            │  │
│   │   /api/stagehand/*     - Browser automation recipes                  │  │
│   │                                                                       │  │
│   └───────────────┬────────────────────────────┬────────────────────────┘  │
│                   │                            │                            │
│        ┌──────────▼──────────┐      ┌─────────▼─────────┐                  │
│        │     Ollama LLM      │      │     Directus      │                  │
│        │   (Mistral 7B)      │      │   (port 8055)     │                  │
│        │   port 11434        │      │   Admin + CMS     │                  │
│        └──────────┬──────────┘      └─────────┬─────────┘                  │
│                   │                            │                            │
│                   └────────────┬───────────────┘                            │
│                                │                                            │
│                     ┌──────────▼──────────┐                                 │
│                     │     PostgreSQL      │                                 │
│                     │   - users           │                                 │
│                     │   - preferences     │                                 │
│                     │   - interactions    │                                 │
│                     │   - recipes         │                                 │
│                     └─────────────────────┘                                 │
│                                                                              │
│   ┌─────────────────────────────────────────────────────────────────────┐  │
│   │                 Stagehand (port 3000)                                │  │
│   │                 Playwright Browser Automation                        │  │
│   │   - Web scraping                                                     │  │
│   │   - Automated posting workflows                                      │  │
│   │   - Screenshot capture                                               │  │
│   └─────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
│                         │ Claude API Fallback                               │
│                         ▼ (when user downvotes)                             │
│              ┌─────────────────────────┐                                    │
│              │   Anthropic Claude API  │                                    │
│              │   Premium refinement    │                                    │
│              └─────────────────────────┘                                    │
└─────────────────────────────────────────────────────────────────────────────┘

Repository Contents

1. impactgenie (This Repository)

Location: /var/www/vhosts/impactgenie.me/agent-browser/

impactgenie/
├── backend/                    # FastAPI Backend
│   ├── app/
│   │   ├── api/routes/
│   │   │   ├── captions.py     # Caption generation
│   │   │   ├── tags.py         # Tag suggestions
│   │   │   ├── chat.py         # AI chat with Genie
│   │   │   ├── media.py        # Media download/process
│   │   │   ├── stagehand.py    # Browser automation
│   │   │   ├── feedback.py     # User feedback
│   │   │   └── auth.py         # Authentication
├── backend/                    # FastAPI Backend
│   ├── (**) not sure what to call these but they will be a sst of prefefined variable inputs, prolly structure and output data integration rules
│   │   ├── **Power Admin   # Source Data**
│   │   └── **Power Admin   # Create Actions**
│   │   └── **Power Admin   # Create Activities**
│   │   └── **Power Admin   # Create Collections**
│   │   └── **Power Admin   # Edit Relationships**
│   │   └── **Power Admin   # Directus Management**
│   │   ├── services/
│   │   │   ├── llm_service.py  # Ollama + Claude integration
│   │   │   └── personalization_service.py
│   │   │   └── **Prime Dieective -file is primary prompt**
│   │   │   └── **Memory Modifications - access to per user and overall memory context wimdows to modify as power admin**
│   │   └── main.py
│   ├── Dockerfile
│   └── requirements.txt
│
├── Agent Access        # Browser Platform and Extension Alternative Entry point
│
├── extension/                  # Chrome Extension
│   ├── src/
│   ├── dist/                   # Built extension
│   └── manifest.json
│
├── extension-firefox/          # Firefox Extension
│   ├── src/
│   ├── dist/                   # Built extension
│   └── manifest.json
│
├── directus/                   # CMS Configuration
│   └── schema.json
│
├── schemas/                    # Database Schemas
│   └── directus
│
├── automation/stagehand/       # Browser Automation Service
│   ├── dist/                   # Built extension
│   └── manifest.jst
│   ├── distance
│
├── broserr application/       # UI front end `
welcome,                       # has select upload or download plus conversion Window, user icon linked to signuo or q generic profile for unregistered users
    ├── agent-chat.html         # 
    ├── agent-test.html         # Testing interface                    
    ├── automation/stagehand/       #
│   └── manifest.json p
├── clarifying             # Wselect upload or download eb UI (**moves to a new browser based**)
├── processing            # Testing interface
└── .env                        # Environment config

Key Features:

  • AI-powered caption generation (platform-specific)
  • Smart tag suggestions based on user history
  • Browser automation for social media posting
  • Media download (YouTube, etc.) and processing
  • User preference learning and personalization
  • Claude API fallback for premium quality

2. mediatools (Companion Repositor

Location: /var/www/vhosts/impactgenie.me/httpdocs/ Repository: github.com/kismetkanceled/mediatools

mediatools/
├── app.py                      # Flask application
├── services/
│   ├── media/
│   │   ├── image_ops.py        # Image processing (Pillow)
│   │   ├── video_ops.py        # Video processing (FFmpeg)
│   │   └── doc_ops.py          # Document conversion
│   ├── file_manager.py
│   └── database.py
│
├── templates/                  # Jinja2 templates
│   ├── workflow.html
│   ├── convert.html
│   ├── resize.html
│   ├── crop.html
│   ├── compress.html
│   └── download.html
│
├── static/                     # CSS/JS assets
├── agent-chat.html             # Impact Genie Web UI
├── extension-ui/               # Chrome extension scaffold
└── config/default.yaml

Key Features:

  • Video compression, resize, crop, trim, join
  • Image conversion, resize, crop
  • YouTube/social media downloads (yt-dlp)
  • Document conversion (MD, DOCX to PDF)
  • Flask-based web interface with HTMX

Functional Workflow

Caption Generation Flow

1. User uploads image/video or provides context
   │
   ▼
2. POST /api/generate-caption
   ├── Platform: Instagram, TikTok, OnlyFans, etc.
   ├── Tone: casual, professional, flirty, etc.
   └── Context: previous content, user preferences
   │
   ▼
3. Backend processes request
   ├── Load user preferences from Directus
   ├── Build prompt with platform-specific rules
   └── Call Ollama (Mistral 7B)
   │
   ▼
4. Return caption + suggestions
   │
   ▼
5. User feedback loop
   ├── 👍 Accept → Log success, update preferences
   ├── 🔄 Regenerate → Try with different parameters
   └── 👎 Downvote → Trigger Claude API fallback

Media Processing Flow

1. User selects operation (trim, compress, convert, etc.)
   │
   ▼
2. POST /api/media/process
   ├── Upload file
   ├── Specify operation + parameters
   └── user_id for tracking
   │
   ▼
3. Backend executes
   ├── FFmpeg for video operations
   ├── ImageMagick for image operations
   └── yt-dlp for downloads
   │
   ▼
4. Return download link
   └── /media-output/{filename}

Browser Automation Flow

1. User selects automation recipe
   │
   ▼
2. POST /api/stagehand/execute
   ├── Recipe: "onlyfans_image_post"
   ├── Variables: caption, tags, media
   └── Credentials (if required)
   │
   ▼
3. Stagehand executes Playwright workflow
   ├── Navigate to site
   ├── Upload media
   ├── Fill caption/tags
   ├── Submit post
   └── Screenshot each step
   │
   ▼
4. Return results
   ├── Success/failure status
   ├── Screenshots
   └── Update recipe success_rate

API Reference

Chat & Content

Endpoint Method Purpose
/api/chat POST Conversational AI with Genie
/api/generate-caption POST Generate platform-specific caption
/api/suggest-tags POST Get smart tag recommendations
/api/feedback POST Submit user feedback

Media Operations

Endpoint Method Purpose
/api/media/download POST Download from YouTube/social
/api/media/process POST Process media (trim, crop, etc.)
/api/media/info/{filename} GET Get media metadata
/api/media/download-file/{filename} GET Download processed file

Browser Automation

Endpoint Method Purpose
/api/stagehand/execute POST Run automation recipe
/api/stagehand/recipes GET List available recipes
/api/stagehand/screenshot POST Capture page screenshot

Deployment

Services (Docker Compose)

cd /var/www/vhosts/impactgenie.me/agent-browser
docker compose up -d
Service Port Description
backend 8000 FastAPI application
directus 8055 Admin CMS
postgres 5432 Database
stagehand 3000 Browser automation
ollama 11434 LLM (host service)

URLs

URL Purpose
https://impactgenie.me Main site (proxied to backend)
https://impactgenie.me/agent-chat.html Web UI
https://impactgenie.me/docs API Documentation
https://impactgenie.me/admin Directus Admin

Nginx Configuration (Plesk)

location /admin {
    proxy_pass http://127.0.0.1:8055;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
}

location /api/ {
    proxy_pass http://127.0.0.1:8000/api/;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_connect_timeout 120s;
    proxy_read_timeout 120s;
}

location / {
    root /var/www/vhosts/impactgenie.me/httpdocs;
    try_files $uri $uri/ /agent-chat.html;
}

Data Model (Directus Collections)

users

{
  "id": "uuid",
  "email": "string",
  "subscription_tier": "free|pro",
  "total_posts": "integer",
  "last_active": "timestamp"
}

user_preferences

{
  "user_id": "uuid (FK)",
  "favorite_tags": ["array"],
  "preferred_caption_style": "flirty|direct|mysterious",
  "preferred_posting_times": [{"site": "onlyfans", "hour": 20}],
  "automation_speed": "fast|careful"
}

interaction_logs

{
  "user_id": "uuid (FK)",
  "interaction_type": "generate_caption|suggest_tags|automate_post",
  "model_used": "mistral|claude",
  "user_feedback": "upvote|downvote|regenerate",
  "response_time_ms": "integer"
}

automation_recipes

{
  "site_name": "onlyfans|pornhub|fansly",
  "workflow_type": "image_post|video_post",
  "steps": [{"action": "click", "selector": "..."}],
  "success_rate": "float"
}

Development

Prerequisites

  • Docker & Docker Compose
  • Node.js 20+ (for extensions)
  • Python 3.11+ (for backend)
  • Ollama with Mistral 7B model

Local Setup

# Clone repository
git clone git@github.com:kismetkanceled/impactgenie.git
cd impactgenie

# Copy environment file
cp .env.example .env
# Edit .env with your settings

# Start services
docker compose up -d

# Build Chrome extension
cd extension && npm install && npm run build

# Build Firefox extension
cd extension-firefox && npm install && npm run build

Testing

# Health check
curl http://127.0.0.1:8000/health

# Test caption generation
curl -X POST http://127.0.0.1:8000/api/generate-caption \
  -H "Content-Type: application/json" \
  -d '{"platform": "instagram", "description": "Beach sunset"}'

# Test media download
curl -X POST http://127.0.0.1:8000/api/media/download \
  -H "Content-Type: application/json" \
  -d '{"url": "https://youtube.com/watch?v=...", "user_id": "test"}'

Related Documentation

Document Location Description
ARCHITECTURE.md mediatools Flask app architecture
NEXT_STEPS.md Both repos Deployment status
DEPLOYMENT.md impactgenie Full deployment guide

License

Proprietary - All rights reserved


Contact

  • Project: Impact Genie
  • Attribution: Built by Anthropic & EthosX
  • Version: 2.0.0
  • Last Updated: January 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors