Platform-optimized captions for Instagram, YouTube, LinkedIn & viral hashtags — in seconds.
- ⚡ Lightning Fast — Groq inference in under 3 seconds
- 📸 Multi-Platform — Instagram, YouTube, LinkedIn, Hashtags
- 🎨 6 Caption Tones — Viral, Funny, Luxury, Emotional, Professional, Inspirational
- 🖼️ Drag & Drop Upload — With Cloudinary CDN or local fallback
- 📋 One-Click Copy — Instant clipboard copy for each platform
- 💾 Download All — Export all captions as a text file
- 🌙 Dark Mode — Premium dark-first design
- 📱 Mobile Responsive — Fully optimized for all devices
- 🔒 Secure — Server-side API calls, keys never exposed
- 🔔 Toast Notifications — Realtime feedback with Sonner
- 🎭 Framer Motion — Smooth, premium animations
- 🏠 Landing Page — Hero, Features, Pricing, FAQ, CTA, Footer
- 📊 Dashboard — Usage stats and generation history
| Technology | Purpose |
|---|---|
| Next.js 15 | App Router, SSR, API Routes |
| TypeScript | Type safety |
| Tailwind CSS | Utility-first styling |
| Framer Motion | Animations |
| Groq SDK | AI caption generation (Llama 4) |
| Cloudinary | Image hosting & CDN |
| Sonner | Toast notifications |
| Lucide React | Icons |
caption-ai/
├── app/
│ ├── api/
│ │ ├── generate/route.ts # AI caption generation
│ │ └── upload/route.ts # Image upload handler
│ ├── dashboard/page.tsx # User dashboard
│ ├── generate/
│ │ ├── page.tsx # Generate page (SSR)
│ │ └── GenerateClient.tsx # Client component
│ ├── login/page.tsx # Auth page
│ ├── pricing/page.tsx # Pricing page
│ ├── globals.css # Global styles
│ └── layout.tsx # Root layout + metadata
├── components/
│ ├── layout/
│ │ ├── Navbar.tsx # Responsive navbar
│ │ └── Footer.tsx # Footer with links
│ ├── sections/
│ │ ├── HeroSection.tsx # Landing hero
│ │ ├── FeaturesSection.tsx # Features grid
│ │ ├── PricingSection.tsx # Pricing cards
│ │ ├── FAQSection.tsx # Accordion FAQ
│ │ ├── CTASection.tsx # Call to action
│ │ ├── ImageUploader.tsx # Drag & drop upload
│ │ ├── CaptionCard.tsx # Caption display + copy
│ │ └── ToneSelector.tsx # Tone picker
│ └── ui/
│ ├── button.tsx # Button component
│ ├── badge.tsx # Badge component
│ └── card.tsx # Card component
├── hooks/
│ └── useCaption.ts # Caption generation hook
├── lib/
│ ├── groq.ts # Groq AI integration
│ ├── cloudinary.ts # Cloudinary helper
│ └── utils.ts # Utility functions
├── types/
│ └── index.ts # TypeScript types
├── .env.example # Environment template
└── README.md
git clone https://github.com/yourusername/caption-ai.git
cd caption-ainpm install
# or
yarn install
# or
pnpm installcp .env.example .env.localEdit .env.local:
# Required
GROQ_API_KEY=your_groq_api_key_here
# Optional (for cloud image hosting)
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=caption_ai
# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000npm run devOpen http://localhost:3000 🎉
- Go to console.groq.com
- Create an account and generate an API key
- Add to
.env.localasGROQ_API_KEY
- Sign up at cloudinary.com
- Go to Settings → Upload → Upload Presets
- Create an unsigned preset named
caption_ai - Add your Cloud Name to
.env.local
Note: Without Cloudinary, images are processed as base64 locally. Cloudinary is recommended for production for better performance and storage.
npm install -g vercel
vercel login
vercel --prodAdd environment variables in the Vercel dashboard under Settings → Environment Variables.
Edit components/sections/ToneSelector.tsx to add or modify tone options.
Edit components/sections/PricingSection.tsx to change plans, prices, and features.
Edit lib/groq.ts to customize the system prompt and caption generation behavior.
MIT License — see LICENSE for details.
Built with ❤️ using Next.js + Groq AI