Jeropay Social Media Caption Generator

A beautiful web application that generates creative social media captions for the Jeropay team using OpenAI's GPT-4o-mini model.

Features

  • šŸŽØ Beautiful Web Interface - Modern, responsive design with glass morphism effects
  • šŸ¤– AI-Powered Generation - Creates 5 catchy, audience-friendly captions per topic
  • šŸŽÆ Targeted Content - Tailored for young professionals and creatives
  • šŸ“‹ Easy Copy-to-Clipboard - One-click copying for each caption
  • ⚔ Real-time Generation - Fast caption creation with loading states
  • šŸ“± Mobile Responsive - Works perfectly on all devices

Project Structure

ā”œā”€ā”€ backend/
│   └── index.ts          # Hono API server
ā”œā”€ā”€ frontend/
│   ā”œā”€ā”€ index.html        # Main HTML template
│   └── index.tsx         # React frontend application
ā”œā”€ā”€ shared/
│   └── types.ts          # Shared TypeScript types
└── README.md

Usage

Web Interface

  1. Visit the application URL
  2. Enter any topic for your social media campaign
  3. Click "Generate Captions" or press Enter
  4. Copy your favorite captions with one click
  5. Use them for Jeropay's social media posts!

API Endpoints

Generate Captions

POST /api/generate

{ "topic": "your topic here" }

Legacy Endpoint (Backward Compatibility)

POST /

{ "topic": "your topic here" }

Example API Usage

curl -X POST https://your-val-url.web.val.run/api/generate \ -H "Content-Type: application/json" \ -d '{"topic": "summer productivity tips"}'

Technical Details

  • Frontend: React 18.2.0 with TypeScript
  • Backend: Hono framework with OpenAI integration
  • Styling: TailwindCSS with custom glass morphism effects
  • AI Model: GPT-4o-mini (free tier)
  • Temperature: 0.8 for creative variation
  • Max Tokens: 500

Content Guidelines

Generated captions are optimized for:

  • Young professionals and creatives
  • Engaging hooks and action-oriented copy
  • Positive, helpful tone
  • Avoiding generic phrases
  • Social media best practices
  • June 2024 campaign alignment

Error Handling

  • Input validation with user-friendly messages
  • Loading states during generation
  • Graceful error recovery
  • Copy-to-clipboard feedback