Skip to content

Dev-devadath/Kaffe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kaffe: Your AI Branding & Content Studio

Transform any creative work or product image into a complete marketing toolkit in seconds. Stop spending hours on content creation—let AI handle your marketing while you focus on what you do best.

License: MIT Python React FastAPI


The Creator's Dilemma

Creators can make visuals, but can't turn them into content—fast.

  • Artists spend countless hours writing blogs, captions, and marketing copy instead of creating
  • Branding, SEO, and positioning demand expertise across multiple disciplines
  • Existing AI tools miss the mark—they don't actually understand your artwork

"I can make art. I just can't market it." — Riya, freelance illustrator


One Upload. Complete Marketing Kit.

Kaffe transforms your creative work into comprehensive marketing materials through an intelligent multi-agent system. Upload once, get everything you need to promote across all channels.

How It Works: From Upload to Launch in 60 Seconds

  1. Upload Your Work — Share your product photo or creative piece with Kaffe's main orchestrator
  2. Vision Analysis — Image Analysis Agent examines composition, style, colors, and emotional impact
  3. Strategize — SEO and branding agents develop your positioning
  4. Parallel Processing — Branding and SEO agents work simultaneously to optimize your content strategy
  5. Content Generation — Specialized agents create blogs, captions, keywords, and product descriptions
  6. Channel Planning — Platform-specific customization for Instagram, LinkedIn, blogs, and more
  7. Quality Polish — Final review ensures brand consistency and marketing effectiveness

Focus on creating. Kaffe handles the rest.


Who Benefits from Kaffe

  • Freelance Illustrators — Turn portfolio pieces into engaging stories
  • Designers — Showcase work with professional marketing
  • Product Photographers — Generate compelling product narratives
  • Indie Brands — Launch products with complete marketing kits
  • Small Businesses — Professional content without hiring agencies

Real Impact for Real Creators

More visibility. Less burnout. Authentic growth powered by intelligent automation.

  • 10x Faster Content Creation — What took hours now takes minutes
  • 80% Time Saved — Reclaim your schedule for actual creative work
  • 40% Quicker Output — Multi-agent parallelization accelerates delivery

Features

  • Intelligent Image Analysis — Deep understanding of composition, style, and emotional impact
  • SEO-Optimized Content — Blogs, product descriptions, and meta tags
  • Platform-Specific Posts — Custom content for Instagram, LinkedIn, Medium, and more
  • Keyword Strategy — Intent-based keywords for better discoverability
  • Branding Consistency — Maintains your unique voice across all content
  • Automated Publishing — Direct posting to Instagram and LinkedIn (more platforms coming soon)
  • Multi-Agent Processing — Parallel execution for lightning-fast results
  • Quality Assurance — Final polish ensures publication-ready content

The Technology Behind Kaffe

Built with cutting-edge tools and architectural precision to deliver fast, intelligent, and scalable content generation.

Tech Stack

Backend

  • FastAPI 0.104 — High-performance async web framework
  • Python 3.13 — Modern Python with latest features
  • Google Gemini AI — Advanced multimodal AI for image understanding
  • OpenAI GPT-4o-mini — Content generation and reasoning
  • Uvicorn — Lightning-fast ASGI server
  • Pydantic 2.5 — Data validation and settings management
  • Playwright — Browser automation for platform publishing
  • Pillow — Image processing and manipulation
  • HTTPx — Modern async HTTP client
  • python-dotenv — Environment configuration management

Frontend

  • React 19 — Latest React with concurrent features
  • React Router v7 — Advanced routing and navigation
  • TypeScript 5.9 — Type-safe development
  • Tailwind CSS 4 — Utility-first styling framework
  • Vite 7 — Ultra-fast build tool and dev server
  • Lucide React — Beautiful icon library

Automation & Integration

  • N8N - Agent builder
  • Playwright Python — Instagram and LinkedIn automation
  • Browser Context Storage — Session persistence for authenticated posting
  • tmpfiles.org API — Temporary image hosting
  • Webhook Integration — External agent communication

Development Tools

  • Bun — Fast JavaScript runtime and package manager
  • Git — Version control
  • GitHub — Code hosting and collaboration

Multi-Agent Architecture

Specialized agents handle distinct responsibilities:

  • Vision Agent — Analyzes composition, style, colors, and emotional impact
  • Branding Agent — Develops positioning and brand voice
  • SEO Agent — Optimizes keywords and search strategy
  • Planning Agent — Customizes content for each platform
  • Content Agent — Generates blogs, captions, and product descriptions
  • Quality Agent — Ensures brand consistency and marketing effectiveness
  • Orchestrator Agent (ORCA) — Coordinates all agents and manages workflow

Project Structure

Kaffe/
├── backend/
│   ├── main.py                  # FastAPI application entry point
│   ├── orca.md                  # ORCA agent documentation
│   ├── requirements.txt         # Python dependencies
│   ├── README.md                # Backend documentation
│   ├── .env                     # Environment variables (not in git)
│   └── api/
│       ├── img_temp.py          # Image upload service
│       ├── authenticate_instagram.py  # Instagram auth setup
│       ├── authenticate_linkedin.py   # LinkedIn auth setup
│       ├── instagram_poster.py  # Instagram automation
│       ├── playwright_post.py   # LinkedIn automation
│       ├── auth.json            # LinkedIn session (generated)
│       └── instagram_auth.json  # Instagram session (generated)
│
├── frontend/
│   ├── app/
│   │   ├── root.tsx             # Root component
│   │   ├── routes.ts            # Route configuration
│   │   ├── app.css              # Global styles
│   │   ├── components/          # React components
│   │   │   └── landing/         # Landing page components
│   │   ├── pages/               # Page components
│   │   │   ├── app.tsx
│   │   │   ├── dashboard.tsx
│   │   │   ├── home.tsx
│   │   │   ├── processing.tsx
│   │   │   └── upload.tsx
│   │   ├── routes/              # Route handlers
│   │   │   ├── home.tsx
│   │   │   ├── app.tsx
│   │   │   ├── app.dashboard.tsx
│   │   │   └── app.processing.tsx
│   │   └── welcome/             # Welcome screen
│   │       ├── welcome.tsx
│   │       ├── logo-dark.svg
│   │       └── logo-light.svg
│   ├── public/
│   │   ├── coffee.png           # App logo
│   │   └── favicon.ico          # Browser icon
│   ├── package.json             # Node dependencies
│   ├── vite.config.ts           # Vite configuration
│   ├── tsconfig.json            # TypeScript config
│   └── react-router.config.ts  # Router config
│
├── .gitignore                   # Git ignore rules
├── start.sh                     # Deployment script
└── README.md                    # Project documentation

Dependencies

Backend Requirements (requirements.txt)

fastapi==0.104.1
uvicorn[standard]==0.24.0
pydantic==2.5.0
pydantic-settings==2.1.0
google-generativeai==0.3.1
python-multipart==0.0.6
httpx==0.25.1
pillow==10.1.0
requests==2.31.0
python-dotenv==1.0.0

Frontend Dependencies (package.json)

{
  "name": "frontend",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "react-router build",
    "dev": "react-router dev",
    "start": "react-router-serve ./build/server/index.js",
    "typecheck": "react-router typegen && tsc"
  },
  "dependencies": {
    "@react-router/node": "7.10.1",
    "@react-router/serve": "7.10.1",
    "@supabase/supabase-js": "^2.87.1",
    "isbot": "^5.1.31",
    "lucide-react": "^0.561.0",
    "react": "^19.2.3",
    "react-dom": "^19.2.3",
    "react-router": "7.10.1"
  },
  "devDependencies": {
    "@react-router/dev": "7.10.1",
    "@tailwindcss/vite": "^4.1.13",
    "@types/node": "^22",
    "@types/react": "^19.2.7",
    "@types/react-dom": "^19.2.3",
    "tailwindcss": "^4.1.13",
    "typescript": "^5.9.2",
    "vite": "^7.1.7",
    "vite-tsconfig-paths": "^5.1.4"
  }
}

TypeScript Configuration (tsconfig.json)

{
  "include": [
    "**/*",
    "**/.server/**/*",
    "**/.client/**/*",
    ".react-router/types/**/*"
  ],
  "compilerOptions": {
    "lib": ["DOM", "DOM.Iterable", "ES2022"],
    "types": ["node", "vite/client"],
    "target": "ES2022",
    "module": "ES2022",
    "moduleResolution": "bundler",
    "jsx": "react-jsx",
    "rootDirs": [".", "./.react-router/types"],
    "baseUrl": ".",
    "paths": {
      "~/*": ["./app/*"]
    },
    "esModuleInterop": true,
    "verbatimModuleSyntax": true,
    "noEmit": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true
  }
}

Prerequisites

  • Python 3.13 or higher
  • Node.js 18+ or Bun
  • OpenAI API key

Installation

1. Clone the repository

git clone <repository-url>
cd kaffe

2. Backend Setup

cd backend

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate

# Install dependencies
pip install fastapi uvicorn openai python-dotenv python-multipart

3. Frontend Setup

cd frontend

# Install dependencies (using Bun)
bun install

# Or using npm
npm install

4. Environment Variables

Create a .env file in the backend directory:

OPENAI_API_KEY=your_openai_api_key_here

Usage

Start the Backend Server

cd backend
source venv/bin/activate  # On Windows: venv\Scripts\activate
uvicorn main:app --reload

The backend will be available at http://localhost:8000

Start the Frontend Development Server

cd frontend
bun dev
# Or: npm run dev

The frontend will be available at http://localhost:5173 (or the port shown in terminal)

Using the Application

  1. Open the application in your browser
  2. Connect your social media and blog accounts (Medium, Instagram, Twitter/X, etc.)
  3. Upload an image of your artwork
  4. Wait for AI analysis and content generation (usually takes a few seconds)
  5. That's it! The agent automatically:

Using the Application

  1. Upload Your Work — Drop your artwork or product image into Kaffe
  2. AI Analysis — Kaffe examines visual elements, specs, and creative intent
  3. Content Generation — Get SEO blogs, social captions, keywords, and descriptions
  4. Platform Publishing — Automatically post to Instagram, LinkedIn, and more
  5. Track Results — Monitor engagement and refine your strategy

That's it! Focus on creating while Kaffe handles your entire marketing pipeline.


Project Structure

kaffe/
├── backend/
│   ├── agents/
│   │   ├── base_agent.py      # Base agent class
│   │   ├── orca_agent.py      # Multi-agent orchestrator
│   │   └── img_agent.py       # Image analysis agent
│   ├── api/
│   │   ├── img_temp.py        # Image upload API
│   │   ├── playwright_post.py # LinkedIn automation
│   │   └── instagram_poster.py # Instagram automation
│   ├── app/
│   │   ├── routes.py          # API endpoints
│   │   └── utils.py           # Utility functions
│   ├── models/
│   │   ├── job.py             # Job models
│   │   └── agent_contracts.py # Agent interfaces
│   ├── services/
│   │   ├── gemini_client.py   # AI service client
│   │   ├── image_service.py   # Image processing
│   │   └── job_manager.py     # Job orchestration
│   └── main.py                # FastAPI application
├── frontend/
│   ├── app/
│   │   ├── routes/
│   │   │   └── home.tsx       # Home page route
│   │   ├── root.tsx           # Root component
│   │   ├── routes.ts          # Route configuration
│   │   └── app.css            # Global styles
│   ├── public/                # Static assets
│   └── package.json           # Frontend dependencies
└── README.md

Development

Backend Development

cd backend
source venv/bin/activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Development

cd frontend
bun dev

Type Checking (Frontend)

## 🧪 API Endpoints

### POST `/api/upload-temp-image`

Upload an image for analysis and content generation.

**Request:**
- `Content-Type: multipart/form-data`
- `file`: Image file (PNG, JPG, JPEG, WEBP)

**Response:**
```json
{
  "sessionId": "uuid",
  "tempUrl": "https://tmpfiles.org/dl/...",
  "query": {
    "blog": "SEO-optimized blog post",
    "captions": {
      "instagram": "...",
      "linkedin": "..."
    },
    "keywords": ["keyword1", "keyword2"],
    "description": "Product description"
  }
}

Automation Scripts

LinkedIn Publishing:

python playwright_post.py "Post text" image.jpg
# Requires: authenticate_linkedin.py (one-time setup)

Instagram Publishing:

python instagram_poster.py "Caption text" image.jpg
# Requires: authenticate_instagram.py (one-time setup)

Deployment

Backend (Render)

  1. Connect your GitHub repository to Render
  2. Set build command: pip install -r requirements.txt
  3. Set start command: uvicorn api.img_temp:app --host 0.0.0.0 --port $PORT
  4. Add environment variable: EXTERNAL_AGENT_URL

Frontend (Vercel/Netlify)

  1. Connect your GitHub repository
  2. Set build command: cd frontend && npm run build
  3. Set output directory: frontend/build

Unique Edge

"Unlike generic AI writers that start from a blank prompt, Kaffe starts from your art—so your content is authentic, on-brand, and deeply connected to your creative voice."


Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

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


Creators Should Create. Kaffe Does the Rest.

Kaffe represents the future of creative marketing—where artists focus on art, and AI handles everything else. Join us in democratizing professional marketing for every creator.

Ready to transform how creators market their work?

Try the Demo GitHub


Built with ☕ by creators, for creators

  • OpenAI for GPT-4o Vision API
  • FastAPI for the excellent web framework
  • React Router team for the routing solution
  • All the open-source contributors whose libraries made this possible

Why It Wins:

  • AI + Creativity: Leverages cutting-edge multimodal AI (GPT-4o Vision)
  • Real-world utility: Solves a daily pain point for millions of creators
  • Fast, focused scope: Image → structured content (no scope creep)
  • Polished UX: Clean frontend + smart backend = demo-ready in 24h

Made with ❤️ for visual creators everywhere

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors