🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add logo generator tool and enhance related tools section
Bill Yang6ba280f191e1
diff --git a/docs/src/app/(home)/tools/(social-media-tools)/[slug]/page.tsx b/docs/src/app/(home)/tools/(social-media-tools)/[slug]/page.tsxindex a8d422f43..a48ade3c6 100644--- a/docs/src/app/(home)/tools/(social-media-tools)/[slug]/page.tsx+++ b/docs/src/app/(home)/tools/(social-media-tools)/[slug]/page.tsx@@ -8,6 +8,7 @@ import ImageResizer from "../components/ImageResizer";import { HashtagGenerator } from "../components/HashtagGenerator";import { CharacterCounter } from "../components/CharacterCounter";import { BioGenerator } from "../components/BioGenerator";+import { LogoGenerator } from "../components/LogoGenerator";import { platformConfigs, platformList } from "../components/platform-configs";import { commentPlatformConfigs, commentPlatformList } from "../components/comment-platform-configs";import { pageNamePlatformConfigs, pageNamePlatformList } from "../components/page-name-platform-configs";@@ -29,9 +30,13 @@ import {} from "../components/character-counter-platform-configs";import { bioGeneratorPlatformConfigs, bioGeneratorPlatformList } from "../components/bio-generator-platform-configs";import { imageResizerPlatformConfigs, imageResizerPlatformList } from "../components/image-resizer-platform-configs";+import {+ logoGeneratorPlatformConfigs,+ logoGeneratorPlatformList,+} from "../components/logo-generator-platform-configs";import type { Metadata } from "next";import { notFound } from "next/navigation";-import { Hash, Type, User } from "lucide-react";+import { Hash, Palette, Type, User } from "lucide-react";interface PageProps {params: Promise<{@@ -77,6 +82,10 @@ export async function generateStaticParams() {slug: `${platform.id}-photo-resizer`,}));+ const logoGenerators = logoGeneratorPlatformList.map(platform => ({+ slug: `${platform.id}-logo-generator`,+ }));+return [...fontGenerators,...commentGenerators,@@ -87,6 +96,7 @@ export async function generateStaticParams() {...characterCounters,...bioGenerators,...imageResizers,+ ...logoGenerators,];}@@ -334,6 +344,36 @@ export async function generateMetadata({ params }: PageProps): Promise<Metadata>};}+ // Check if it's a logo generator+ if (slug.endsWith("-logo-generator")) {+ const platformId = slug.replace("-logo-generator", "");+ const platform = logoGeneratorPlatformConfigs[platformId];++ if (!platform) {+ return { title: "Logo Generator Not Found" };+ }++ return {+ title: `${platform.displayName} | AI-Powered Brand Logo Creator`,+ description: platform.description,+ openGraph: {+ title: platform.displayName,+ description: platform.description,+ type: "website",+ url: `https://rybbit.com/tools/${platform.id}-logo-generator`,+ siteName: "Rybbit Documentation",+ },+ twitter: {+ card: "summary_large_image",+ title: platform.displayName,+ description: platform.description,+ },+ alternates: {+ canonical: `https://rybbit.com/tools/${platform.id}-logo-generator`,+ },+ };+ }+// It's a font generatorconst platformId = slug.replace("-font-generator", "");const platform = platformConfigs[platformId];@@ -1578,6 +1618,164 @@ export default async function PlatformToolPage({ params }: PageProps) {);}+ // Check if it's a logo generator+ if (slug.endsWith("-logo-generator")) {+ const platformId = slug.replace("-logo-generator", "");+ const platform = logoGeneratorPlatformConfigs[platformId];++ if (!platform) {+ notFound();+ }++ const structuredData = {+ "@context": "https://schema.org",+ "@type": "WebApplication",+ name: platform.displayName,+ description: platform.description,+ url: `https://rybbit.com/tools/${platform.id}-logo-generator`,+ applicationCategory: "DesignApplication",+ offers: {+ "@type": "Offer",+ price: "0",+ priceCurrency: "USD",+ },+ author: {+ "@type": "Organization",+ name: "Rybbit",+ url: "https://rybbit.com",+ },+ };++ const educationalContent = (+ <>+ <h2 className="text-2xl font-bold text-neutral-900 dark:text-white mb-4">+ About {platform.name} Logo Generation+ </h2>+ <p className="text-neutral-700 dark:text-neutral-300 leading-relaxed mb-6">{platform.educationalContent}</p>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">How to Use This Tool</h3>+ <ol className="space-y-2 text-neutral-700 dark:text-neutral-300 mb-6">+ <li>+ <strong>Enter your brand name</strong> - The name that will inspire the logo design+ </li>+ <li>+ <strong>Add your industry</strong> (optional) - Helps create relevant design elements+ </li>+ <li>+ <strong>Choose a design style</strong> - Select from {platform.recommendedStyles.length} style options+ </li>+ <li>+ <strong>Specify colors</strong> (optional) - Add preferred colors or let AI choose+ </li>+ <li>+ <strong>Click "Generate Logo"</strong> to create your unique brand logo+ </li>+ <li>+ <strong>Download</strong> your logo in PNG format for immediate use+ </li>+ </ol>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">Recommended Design Styles</h3>+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6">+ {platform.recommendedStyles.map(style => (+ <div+ key={style}+ className="p-4 bg-neutral-50 dark:bg-neutral-900/20 rounded-lg border border-neutral-200 dark:border-neutral-800 flex items-center gap-2"+ >+ <Palette className="w-4 h-4 text-emerald-600 dark:text-emerald-400" />+ <div className="font-medium text-neutral-900 dark:text-white">{style}</div>+ </div>+ ))}+ </div>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">+ Logo Design Tips for {platform.name}+ </h3>+ <ul className="space-y-2 text-neutral-700 dark:text-neutral-300 mb-6">+ <li>+ <strong>Keep it simple:</strong> Simple logos are more memorable and work better at small sizes+ </li>+ <li>+ <strong>Consider the format:</strong> {platform.name} displays logos in various sizes and shapes+ </li>+ <li>+ <strong>Choose appropriate colors:</strong> Colors should reflect your brand personality+ </li>+ <li>+ <strong>Test at different sizes:</strong> Ensure your logo looks good as a tiny profile icon+ </li>+ <li>+ <strong>Iterate and refine:</strong> Generate multiple options and choose the best fit+ </li>+ </ul>++ <p className="text-sm text-neutral-600 dark:text-neutral-400 mt-6">+ <strong>Note:</strong> AI-generated logos are starting points. Consider working with a designer to refine your+ final brand identity. Always ensure your logo is unique and doesn't infringe on existing trademarks.+ </p>+ </>+ );++ const faqs = [+ {+ question: `How does the ${platform.name} logo generator work?`,+ answer: `This tool uses AI image generation to create unique brand logos based on your inputs. It considers your brand name, industry, preferred style, and colors to generate a professional logo optimized for ${platform.name}.`,+ },+ {+ question: "What design styles are available?",+ answer: `You can choose from 8 styles: Minimalist, Modern, Playful, Professional, Vintage, Abstract, Geometric, and Hand-drawn. For ${platform.name}, we recommend: ${platform.recommendedStyles.join(", ")}.`,+ },+ {+ question: "Can I use these logos commercially?",+ answer:+ "Yes! The logos generated are yours to use for commercial purposes. However, we recommend having a designer review and refine your logo for professional use, and always conduct a trademark search before finalizing.",+ },+ {+ question: "What file format is the logo?",+ answer:+ "Logos are generated in PNG format, which works well for most digital uses including social media profiles, websites, and presentations. For print or scalable needs, consider recreating the design in vector format.",+ },+ {+ question: "How many logos can I generate?",+ answer:+ "You can generate logos at a rate of 3 per minute. Each generation creates a unique design, so feel free to experiment with different styles and inputs to find the perfect logo.",+ },+ {+ question: "How can Rybbit help with my brand?",+ answer: (+ <>+ Rybbit helps you track your brand's performance across social media platforms. Monitor how your brand is+ discovered, track engagement, and understand your audience.{" "}+ <a+ href="https://app.rybbit.io/signup"+ className="text-emerald-600 hover:text-emerald-500 dark:text-emerald-400 dark:hover:text-emerald-300 underline"+ >+ Start tracking for free+ </a>+ .+ </>+ ),+ },+ ];++ return (+ <ToolPageLayout+ toolSlug={`${platform.id}-logo-generator`}+ title={platform.displayName}+ description={platform.description}+ badge="AI-Powered Tool"+ toolComponent={<LogoGenerator platform={platform} />}+ educationalContent={educationalContent}+ faqs={faqs}+ relatedToolsCategory="social-media"+ ctaTitle={`Build your ${platform.name} brand presence with Rybbit`}+ ctaDescription={`Track how your brand performs on ${platform.name}. Measure visibility, engagement, and growth with powerful analytics.`}+ ctaEventLocation={`${platform.id}_logo_generator_cta`}+ structuredData={structuredData}+ />+ );+ }+// It's a font generatorconst platformId = slug.replace("-font-generator", "");const platform = platformConfigs[platformId];diff --git a/docs/src/app/(home)/tools/(social-media-tools)/components/LogoGenerator.tsx b/docs/src/app/(home)/tools/(social-media-tools)/components/LogoGenerator.tsxnew file mode 100644index 000000000..2e8c6012b--- /dev/null+++ b/docs/src/app/(home)/tools/(social-media-tools)/components/LogoGenerator.tsx@@ -0,0 +1,283 @@+"use client";++import { useState } from "react";+import { Palette, Download, AlertCircle, Loader2, RefreshCw } from "lucide-react";+import type { LogoGeneratorPlatformConfig } from "./logo-generator-platform-configs";++interface LogoGeneratorProps {+ platform: LogoGeneratorPlatformConfig;+}++const DESIGN_STYLES = [+ { id: "minimalist", name: "Minimalist", description: "Clean lines, simple shapes" },+ { id: "modern", name: "Modern", description: "Contemporary and sleek" },+ { id: "playful", name: "Playful", description: "Fun and colorful" },+ { id: "professional", name: "Professional", description: "Corporate and trustworthy" },+ { id: "vintage", name: "Vintage", description: "Retro and classic" },+ { id: "abstract", name: "Abstract", description: "Artistic and unique" },+ { id: "geometric", name: "Geometric", description: "Structured shapes" },+ { id: "hand-drawn", name: "Hand-drawn", description: "Organic and personal" },+];++export function LogoGenerator({ platform }: LogoGeneratorProps) {+ const [brandName, setBrandName] = useState("");+ const [industry, setIndustry] = useState("");+ const [style, setStyle] = useState(platform.recommendedStyles[0]?.toLowerCase() || "modern");+ const [colors, setColors] = useState("");+ const [imageUrl, setImageUrl] = useState<string | null>(null);+ const [loading, setLoading] = useState(false);+ const [error, setError] = useState("");+ const [rateLimit, setRateLimit] = useState<{+ limit: number;+ remaining: number;+ reset: string;+ } | null>(null);++ const handleGenerate = async () => {+ if (!brandName.trim()) {+ setError("Please provide a brand or company name");+ return;+ }++ setLoading(true);+ setError("");+ setImageUrl(null);++ try {+ const response = await fetch("/api/tools/generate-logo", {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({+ brandName: brandName.trim(),+ industry: industry.trim() || undefined,+ style,+ colors: colors.trim() || undefined,+ platform: platform.id,+ }),+ });++ // Extract rate limit headers+ const limit = response.headers.get("X-RateLimit-Limit");+ const remaining = response.headers.get("X-RateLimit-Remaining");+ const reset = response.headers.get("X-RateLimit-Reset");++ if (limit && remaining && reset) {+ setRateLimit({+ limit: parseInt(limit),+ remaining: parseInt(remaining),+ reset,+ });+ }++ const data = await response.json();++ if (!response.ok) {+ throw new Error(data.error || "Failed to generate logo");+ }++ setImageUrl(data.imageUrl);+ } catch (err) {+ setError(err instanceof Error ? err.message : "An error occurred");+ } finally {+ setLoading(false);+ }+ };++ const handleDownload = async () => {+ if (!imageUrl) return;++ try {+ // If it's a data URL, convert to blob+ if (imageUrl.startsWith("data:")) {+ const response = await fetch(imageUrl);+ const blob = await response.blob();+ const url = window.URL.createObjectURL(blob);+ const a = document.createElement("a");+ a.href = url;+ a.download = `${brandName.trim().toLowerCase().replace(/\s+/g, "-")}-logo.png`;+ document.body.appendChild(a);+ a.click();+ window.URL.revokeObjectURL(url);+ document.body.removeChild(a);+ } else {+ // For external URLs+ const a = document.createElement("a");+ a.href = imageUrl;+ a.download = `${brandName.trim().toLowerCase().replace(/\s+/g, "-")}-logo.png`;+ a.target = "_blank";+ document.body.appendChild(a);+ a.click();+ document.body.removeChild(a);+ }+ } catch (err) {+ console.error("Download failed:", err);+ setError("Failed to download logo. Try right-clicking and saving the image.");+ }+ };++ return (+ <div className="w-full max-w-4xl mx-auto">+ {/* Context Guidelines */}+ <div className="mb-8 p-4 bg-neutral-50 dark:bg-neutral-800/50 border border-neutral-200 dark:border-neutral-700 rounded-lg">+ <div className="flex gap-3">+ <div className="p-2 bg-emerald-100 dark:bg-emerald-900/30 rounded-lg h-fit">+ <Palette className="w-5 h-5 text-emerald-600 dark:text-emerald-400" />+ </div>+ <div>+ <h3 className="text-sm font-medium text-neutral-900 dark:text-white mb-1">+ {platform.name} Logo Guidelines+ </h3>+ <p className="text-sm text-neutral-600 dark:text-neutral-400">{platform.contextGuidelines}</p>+ </div>+ </div>+ </div>++ {/* Generator Form */}+ <div className="space-y-6 mb-8">+ {/* Brand Name Input */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Brand or Company Name *+ </label>+ <input+ type="text"+ value={brandName}+ onChange={e => setBrandName(e.target.value)}+ placeholder="Enter your brand or company name"+ className="w-full px-4 py-3 bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 focus:border-transparent text-neutral-900 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500"+ />+ </div>++ {/* Industry Input */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Industry or Niche (Optional)+ </label>+ <input+ type="text"+ value={industry}+ onChange={e => setIndustry(e.target.value)}+ placeholder="e.g., Technology, Food & Beverage, Fashion, Fitness"+ className="w-full px-4 py-3 bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 focus:border-transparent text-neutral-900 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500"+ />+ </div>++ {/* Style Selector */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">Design Style</label>+ <select+ value={style}+ onChange={e => setStyle(e.target.value)}+ className="w-full px-4 py-3 bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 focus:border-transparent text-neutral-900 dark:text-white"+ >+ {DESIGN_STYLES.map(s => (+ <option key={s.id} value={s.id}>+ {s.name} - {s.description}+ </option>+ ))}+ </select>+ </div>++ {/* Colors Input */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Color Preferences (Optional)+ </label>+ <input+ type="text"+ value={colors}+ onChange={e => setColors(e.target.value)}+ placeholder="e.g., Blue and white, Earth tones, Vibrant colors"+ className="w-full px-4 py-3 bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 focus:border-transparent text-neutral-900 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500"+ />+ </div>++ {/* Generate Button */}+ <button+ onClick={handleGenerate}+ disabled={loading || !brandName.trim()}+ className="w-full px-6 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-neutral-300 dark:disabled:bg-neutral-700 text-white font-medium rounded-lg transition-colors duration-200 flex items-center justify-center gap-2"+ >+ {loading ? (+ <>+ <Loader2 className="w-5 h-5 animate-spin" />+ Generating Logo...+ </>+ ) : (+ <>+ <Palette className="w-5 h-5" />+ Generate Logo+ </>+ )}+ </button>+ </div>++ {/* Rate Limit Info */}+ {rateLimit && (+ <div className="mb-6 p-4 bg-neutral-50 dark:bg-neutral-900/50 border border-neutral-200 dark:border-neutral-800 rounded-lg">+ <p className="text-sm text-neutral-600 dark:text-neutral-400">+ Rate limit: {rateLimit.remaining} of {rateLimit.limit} requests remaining+ </p>+ </div>+ )}++ {/* Error Message */}+ {error && (+ <div className="mb-6 p-4 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded-lg flex items-start gap-3">+ <AlertCircle className="w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0" />+ <p className="text-sm text-red-600 dark:text-red-400">{error}</p>+ </div>+ )}++ {/* Generated Logo */}+ {imageUrl && (+ <div className="space-y-4">+ <h3 className="text-lg font-semibold text-neutral-900 dark:text-white mb-4">Your Generated Logo</h3>++ <div className="p-6 bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-lg">+ {/* Logo Display */}+ <div className="flex justify-center mb-6">+ <div className="relative bg-neutral-100 dark:bg-neutral-800 rounded-lg p-4">+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img+ src={imageUrl}+ alt={`Generated logo for ${brandName}`}+ className="max-w-full max-h-[400px] object-contain rounded-lg"+ />+ </div>+ </div>++ {/* Actions */}+ <div className="flex flex-col sm:flex-row gap-3 justify-center">+ <button+ onClick={handleDownload}+ className="px-6 py-2.5 bg-emerald-600 hover:bg-emerald-700 text-white font-medium rounded-lg transition-colors duration-200 flex items-center justify-center gap-2"+ >+ <Download className="w-4 h-4" />+ Download PNG+ </button>+ <button+ onClick={handleGenerate}+ disabled={loading}+ className="px-6 py-2.5 bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 text-neutral-700 dark:text-neutral-200 font-medium rounded-lg transition-colors duration-200 flex items-center justify-center gap-2"+ >+ <RefreshCw className="w-4 h-4" />+ Regenerate+ </button>+ </div>+ </div>++ {/* Tips */}+ <div className="p-4 bg-neutral-50 dark:bg-neutral-800/50 border border-neutral-200 dark:border-neutral-700 rounded-lg">+ <p className="text-sm text-neutral-600 dark:text-neutral-400">+ <strong>Tip:</strong> Not quite right? Try adjusting your style or color preferences and regenerate. Each+ generation creates a unique design.+ </p>+ </div>+ </div>+ )}+ </div>+ );+}++export default LogoGenerator;diff --git a/docs/src/app/(home)/tools/(social-media-tools)/components/logo-generator-platform-configs.ts b/docs/src/app/(home)/tools/(social-media-tools)/components/logo-generator-platform-configs.tsnew file mode 100644index 000000000..74137adad--- /dev/null+++ b/docs/src/app/(home)/tools/(social-media-tools)/components/logo-generator-platform-configs.ts@@ -0,0 +1,421 @@+export interface LogoGeneratorPlatformConfig {+ id: string;+ name: string;+ displayName: string;+ description: string;+ simpleIconSlug: string;+ colorHex: string;+ educationalContent: string;+ contextGuidelines: string;+ recommendedStyles: string[];+}++export const logoGeneratorPlatformConfigs: Record<+ string,+ LogoGeneratorPlatformConfig+> = {+ instagram: {+ id: "instagram",+ name: "Instagram",+ displayName: "Instagram Logo Generator",+ description:+ "Generate unique brand logos for Instagram with AI. Create professional logos that stand out in feeds and stories.",+ simpleIconSlug: "instagram",+ colorHex: "#E4405F",+ contextGuidelines:+ "Instagram logos should be vibrant and eye-catching. They need to work well as profile pictures (circular crop) and be recognizable at small sizes in feeds and stories.",+ educationalContent: `A strong Instagram logo is essential for brand recognition on the platform. Your logo appears as your profile picture, in comments, in DMs, and throughout the app. It needs to be instantly recognizable at small sizes.++The best Instagram logos are simple, memorable, and work well in a circular format. They should pop against both light and dark backgrounds since Instagram has light and dark modes. Consider using bold colors that align with Instagram's visual culture.`,+ recommendedStyles: [+ "Modern",+ "Playful",+ "Minimalist",+ "Abstract",+ ],+ },+ x: {+ id: "x",+ name: "X (Twitter)",+ displayName: "X (Twitter) Logo Generator",+ description:+ "Generate professional brand logos for X (Twitter) with AI. Create memorable logos that build your presence on the platform.",+ simpleIconSlug: "x",+ colorHex: "#000000",+ contextGuidelines:+ "X logos should be clean and professional. They appear circular in most places and need to be legible at small sizes in feeds and reply threads.",+ educationalContent: `Your X (Twitter) logo represents your brand across millions of interactions. It appears in your profile, tweets, replies, retweets, and direct messages. A strong logo helps build recognition and trust.++Effective X logos are typically simple and work well in a circular format. Since X has a clean, minimalist interface, logos that are too busy can look out of place. Consider using designs that make a statement while remaining professional.`,+ recommendedStyles: [+ "Minimalist",+ "Professional",+ "Modern",+ "Geometric",+ ],+ },+ tiktok: {+ id: "tiktok",+ name: "TikTok",+ displayName: "TikTok Logo Generator",+ description:+ "Generate creative brand logos for TikTok with AI. Create eye-catching logos that resonate with TikTok's young, creative audience.",+ simpleIconSlug: "tiktok",+ colorHex: "#000000",+ contextGuidelines:+ "TikTok logos should be creative and energetic. They need to appeal to a younger demographic and stand out in a fast-scrolling feed.",+ educationalContent: `TikTok is all about creativity and self-expression. Your logo should reflect the platform's energetic, trend-forward culture while still being professional enough for brand partnerships.++The best TikTok logos are bold, creative, and instantly recognizable. They work well as profile pictures and should be memorable enough that viewers remember your brand after scrolling past. Consider using vibrant colors and modern design elements.`,+ recommendedStyles: [+ "Playful",+ "Modern",+ "Abstract",+ "Geometric",+ ],+ },+ linkedin: {+ id: "linkedin",+ name: "LinkedIn",+ displayName: "LinkedIn Logo Generator",+ description:+ "Generate professional brand logos for LinkedIn with AI. Create polished logos that establish credibility in the business world.",+ simpleIconSlug: "linkedin",+ colorHex: "#0A66C2",+ contextGuidelines:+ "LinkedIn logos must be highly professional. They appear in a business context and need to convey trust, expertise, and credibility.",+ educationalContent: `LinkedIn is the world's largest professional network, making your logo a crucial part of your business identity. It appears on your company page, in employee profiles, job postings, and ads.++Professional LinkedIn logos tend to be clean, trustworthy, and business-appropriate. Avoid overly casual or playful designs. The logo should work well in LinkedIn's predominantly blue interface and convey professionalism at a glance.`,+ recommendedStyles: [+ "Professional",+ "Minimalist",+ "Modern",+ "Geometric",+ ],+ },+ youtube: {+ id: "youtube",+ name: "YouTube",+ displayName: "YouTube Logo Generator",+ description:+ "Generate channel logos for YouTube with AI. Create recognizable logos that build your brand across videos and thumbnails.",+ simpleIconSlug: "youtube",+ colorHex: "#FF0000",+ contextGuidelines:+ "YouTube logos should be bold and recognizable. They appear as channel icons, in comments, and sometimes in video thumbnails or watermarks.",+ educationalContent: `Your YouTube channel logo is central to your brand identity on the platform. It appears as your channel icon, in comments, in the subscription feed, and can be used as a watermark on videos.++Successful YouTube logos are typically bold and simple. They need to be recognizable at small sizes in the subscription sidebar and comments section. Many top creators use simple, memorable designs that viewers can instantly identify.`,+ recommendedStyles: [+ "Modern",+ "Playful",+ "Minimalist",+ "Abstract",+ ],+ },+ facebook: {+ id: "facebook",+ name: "Facebook",+ displayName: "Facebook Logo Generator",+ description:+ "Generate brand logos for Facebook with AI. Create professional logos for your Facebook page or business profile.",+ simpleIconSlug: "facebook",+ colorHex: "#1877F2",+ contextGuidelines:+ "Facebook logos should be versatile and professional. They appear in various sizes across the platform, from tiny comment icons to larger page headers.",+ educationalContent: `A Facebook logo represents your brand across one of the world's largest social platforms. It appears as your profile picture, in posts, comments, ads, and the Facebook business ecosystem.++Effective Facebook logos work well at multiple sizes and in Facebook's blue-tinted interface. They should be professional enough for business use while still being engaging for social interactions.`,+ recommendedStyles: [+ "Professional",+ "Modern",+ "Minimalist",+ "Playful",+ ],+ },+ pinterest: {+ id: "pinterest",+ name: "Pinterest",+ displayName: "Pinterest Logo Generator",+ description:+ "Generate aesthetic brand logos for Pinterest with AI. Create visually appealing logos that fit Pinterest's design-focused platform.",+ simpleIconSlug: "pinterest",+ colorHex: "#BD081C",+ contextGuidelines:+ "Pinterest logos should be visually aesthetic and design-forward. The platform is highly visual, so your logo needs to complement beautiful imagery.",+ educationalContent: `Pinterest is a visual discovery platform where aesthetics matter greatly. Your logo appears alongside carefully curated pins and boards, so it needs to be visually appealing.++The best Pinterest logos are artistic, clean, and design-conscious. They should complement rather than clash with the beautiful imagery on the platform. Consider using designs that feel creative and inspiring.`,+ recommendedStyles: [+ "Minimalist",+ "Modern",+ "Abstract",+ "Hand-drawn",+ ],+ },+ discord: {+ id: "discord",+ name: "Discord",+ displayName: "Discord Logo Generator",+ description:+ "Generate server logos for Discord with AI. Create memorable icons for your Discord server or bot.",+ simpleIconSlug: "discord",+ colorHex: "#5865F2",+ contextGuidelines:+ "Discord logos should be distinctive and work well as circular server icons. They need to stand out in a sidebar full of other servers.",+ educationalContent: `Discord server icons are how members identify your community at a glance. They appear in the server sidebar, invites, and throughout the Discord interface.++Effective Discord logos are bold and distinctive. Since they appear alongside many other server icons in a small sidebar, they need to be instantly recognizable. Many successful servers use simple, memorable designs with bold colors.`,+ recommendedStyles: [+ "Modern",+ "Playful",+ "Geometric",+ "Abstract",+ ],+ },+ twitch: {+ id: "twitch",+ name: "Twitch",+ displayName: "Twitch Logo Generator",+ description:+ "Generate channel logos for Twitch with AI. Create engaging logos that build your streaming brand.",+ simpleIconSlug: "twitch",+ colorHex: "#9146FF",+ contextGuidelines:+ "Twitch logos should be energetic and gamer-friendly. They appear as channel profile pictures and need to stand out in the browse and following sections.",+ educationalContent: `Your Twitch logo is central to your streaming brand. It appears as your profile picture, in chat, in the browse section, and on your channel page.++Successful Twitch logos are often bold, colorful, and gaming-oriented. They should be recognizable at small sizes in chat and the sidebar. Many top streamers use distinctive designs that viewers can instantly identify.`,+ recommendedStyles: [+ "Modern",+ "Playful",+ "Abstract",+ "Geometric",+ ],+ },+ snapchat: {+ id: "snapchat",+ name: "Snapchat",+ displayName: "Snapchat Logo Generator",+ description:+ "Generate brand logos for Snapchat with AI. Create fun, youthful logos for your Snapchat presence.",+ simpleIconSlug: "snapchat",+ colorHex: "#FFFC00",+ contextGuidelines:+ "Snapchat logos should be fun, youthful, and bold. They appear in a platform known for casual, ephemeral content.",+ educationalContent: `Snapchat is a platform centered on fun, casual communication. Your logo should reflect this youthful, energetic spirit while still being recognizable.++Effective Snapchat logos are often playful and bold. They should work well as profile pictures and be memorable enough to stand out in a friend list. Consider using bright colors and friendly designs.`,+ recommendedStyles: [+ "Playful",+ "Modern",+ "Abstract",+ "Geometric",+ ],+ },+ reddit: {+ id: "reddit",+ name: "Reddit",+ displayName: "Reddit Logo Generator",+ description:+ "Generate community logos for Reddit with AI. Create distinctive icons for your subreddit or Reddit presence.",+ simpleIconSlug: "reddit",+ colorHex: "#FF4500",+ contextGuidelines:+ "Reddit logos should be distinctive and community-focused. They appear as subreddit icons and user avatars across the platform.",+ educationalContent: `Reddit logos represent communities and individual users across thousands of subreddits. A good logo helps your subreddit or brand stand out in feeds and sidebars.++Effective Reddit logos are often simple and recognizable. They should work well at small sizes in the subreddit sidebar and in feeds. Many successful subreddits use creative designs that reflect their community's theme.`,+ recommendedStyles: [+ "Modern",+ "Playful",+ "Minimalist",+ "Abstract",+ ],+ },+ threads: {+ id: "threads",+ name: "Threads",+ displayName: "Threads Logo Generator",+ description:+ "Generate brand logos for Threads with AI. Create clean, modern logos for Meta's text-based conversation app.",+ simpleIconSlug: "threads",+ colorHex: "#000000",+ contextGuidelines:+ "Threads logos should be clean and modern. The platform has a minimalist aesthetic similar to Twitter/X.",+ educationalContent: `Threads is Meta's text-based conversation platform with a clean, minimalist design. Your logo needs to fit this aesthetic while standing out in conversations.++Effective Threads logos are typically simple and modern. They should work well in a text-heavy interface and be recognizable at small sizes in replies and feeds.`,+ recommendedStyles: [+ "Minimalist",+ "Modern",+ "Professional",+ "Geometric",+ ],+ },+ bluesky: {+ id: "bluesky",+ name: "Bluesky",+ displayName: "Bluesky Logo Generator",+ description:+ "Generate brand logos for Bluesky with AI. Create unique logos for the decentralized social platform.",+ simpleIconSlug: "bluesky",+ colorHex: "#0085FF",+ contextGuidelines:+ "Bluesky logos should be modern and forward-thinking. The platform attracts tech-savvy users who appreciate good design.",+ educationalContent: `Bluesky is a decentralized social platform that attracts users who value innovation and good design. Your logo should reflect these values.++Effective Bluesky logos are often modern and tech-forward. They should appeal to a design-conscious audience while remaining professional and recognizable.`,+ recommendedStyles: [+ "Modern",+ "Minimalist",+ "Geometric",+ "Abstract",+ ],+ },+ mastodon: {+ id: "mastodon",+ name: "Mastodon",+ displayName: "Mastodon Logo Generator",+ description:+ "Generate brand logos for Mastodon with AI. Create distinctive logos for the federated social network.",+ simpleIconSlug: "mastodon",+ colorHex: "#6364FF",+ contextGuidelines:+ "Mastodon logos should be distinctive and work across different instances. The decentralized nature means your logo may appear in various contexts.",+ educationalContent: `Mastodon is a federated social network with many different instances and communities. Your logo represents you across this diverse ecosystem.++Effective Mastodon logos are typically distinctive and memorable. They should work well across different instance themes and be recognizable to followers across the fediverse.`,+ recommendedStyles: [+ "Modern",+ "Minimalist",+ "Abstract",+ "Geometric",+ ],+ },+ github: {+ id: "github",+ name: "GitHub",+ displayName: "GitHub Logo Generator",+ description:+ "Generate profile logos for GitHub with AI. Create professional logos for your developer or organization profile.",+ simpleIconSlug: "github",+ colorHex: "#181717",+ contextGuidelines:+ "GitHub logos should be professional and developer-friendly. They appear in a technical context alongside code and documentation.",+ educationalContent: `GitHub is the world's largest code hosting platform, and your logo represents you in the developer community. It appears on your profile, repositories, and contributions.++Effective GitHub logos are typically clean and professional. They should convey technical competence while being distinctive. Many developers and organizations use simple, geometric designs.`,+ recommendedStyles: [+ "Minimalist",+ "Geometric",+ "Modern",+ "Professional",+ ],+ },+ medium: {+ id: "medium",+ name: "Medium",+ displayName: "Medium Logo Generator",+ description:+ "Generate publication logos for Medium with AI. Create elegant logos for your Medium publication or profile.",+ simpleIconSlug: "medium",+ colorHex: "#000000",+ contextGuidelines:+ "Medium logos should be elegant and editorial. They appear in a reading-focused platform that values clean design.",+ educationalContent: `Medium is a platform focused on quality writing and ideas. Your logo appears alongside articles and represents your publication or personal brand to readers.++Effective Medium logos are typically elegant and understated. They should complement written content rather than overshadow it. Consider using designs that feel editorial and sophisticated.`,+ recommendedStyles: [+ "Minimalist",+ "Professional",+ "Modern",+ "Hand-drawn",+ ],+ },+ substack: {+ id: "substack",+ name: "Substack",+ displayName: "Substack Logo Generator",+ description:+ "Generate newsletter logos for Substack with AI. Create distinctive logos for your Substack publication.",+ simpleIconSlug: "substack",+ colorHex: "#FF6719",+ contextGuidelines:+ "Substack logos should be distinctive and personal. They represent your newsletter brand to subscribers.",+ educationalContent: `Substack is a newsletter platform where your logo represents your personal or publication brand. It appears in subscriber inboxes, on your Substack page, and in recommendations.++Effective Substack logos are typically personal and memorable. They should help subscribers identify your newsletter at a glance. Many successful newsletters use distinctive designs that reflect their content's personality.`,+ recommendedStyles: [+ "Minimalist",+ "Modern",+ "Hand-drawn",+ "Abstract",+ ],+ },+ spotify: {+ id: "spotify",+ name: "Spotify",+ displayName: "Spotify Logo Generator",+ description:+ "Generate artist or podcast logos for Spotify with AI. Create professional logos for your Spotify presence.",+ simpleIconSlug: "spotify",+ colorHex: "#1DB954",+ contextGuidelines:+ "Spotify logos should be visually striking and work well at album/podcast cover sizes. They appear in a music and audio-focused context.",+ educationalContent: `Spotify logos represent artists, podcasts, and playlists on the world's largest audio streaming platform. Your logo appears as your profile picture and alongside your content.++Effective Spotify logos are typically bold and visually striking. They should work well at various sizes, from small profile thumbnails to larger cover displays. Consider using designs that convey your audio content's mood and style.`,+ recommendedStyles: [+ "Modern",+ "Abstract",+ "Minimalist",+ "Playful",+ ],+ },+ telegram: {+ id: "telegram",+ name: "Telegram",+ displayName: "Telegram Logo Generator",+ description:+ "Generate channel logos for Telegram with AI. Create distinctive logos for your Telegram channel or bot.",+ simpleIconSlug: "telegram",+ colorHex: "#26A5E4",+ contextGuidelines:+ "Telegram logos should be clear and distinctive. They appear as channel/bot profile pictures and need to be recognizable in chat lists.",+ educationalContent: `Telegram logos represent channels, bots, and groups on the messaging platform. Your logo appears in chat lists and at the top of your channel or group.++Effective Telegram logos are typically clear and bold. They should be recognizable at small sizes in chat lists and convey your channel's purpose at a glance.`,+ recommendedStyles: [+ "Modern",+ "Minimalist",+ "Geometric",+ "Professional",+ ],+ },+ whatsapp: {+ id: "whatsapp",+ name: "WhatsApp",+ displayName: "WhatsApp Logo Generator",+ description:+ "Generate business logos for WhatsApp with AI. Create professional logos for your WhatsApp Business profile.",+ simpleIconSlug: "whatsapp",+ colorHex: "#25D366",+ contextGuidelines:+ "WhatsApp logos should be professional and trustworthy. They appear as business profile pictures in a personal messaging context.",+ educationalContent: `WhatsApp Business logos represent your company in customers' personal messaging space. Your logo appears in chat lists alongside messages from friends and family.++Effective WhatsApp Business logos are typically professional and trustworthy. They should make customers feel comfortable engaging with your business. Consider using designs that convey reliability and professionalism.`,+ recommendedStyles: [+ "Professional",+ "Minimalist",+ "Modern",+ "Geometric",+ ],+ },+};++export const logoGeneratorPlatformList = Object.values(+ logoGeneratorPlatformConfigs+);diff --git a/docs/src/app/(home)/tools/page.tsx b/docs/src/app/(home)/tools/page.tsxindex 07e93aa4a..799be526c 100644--- a/docs/src/app/(home)/tools/page.tsx+++ b/docs/src/app/(home)/tools/page.tsx@@ -8,6 +8,7 @@ import {Gauge,Link as LinkIcon,MousePointerClick,+ Palette,PlayCircle,Search,Share2,@@ -31,6 +32,7 @@ import { hashtagGeneratorPlatformList } from "./(social-media-tools)/components/import { characterCounterPlatformList } from "./(social-media-tools)/components/character-counter-platform-configs";import { bioGeneratorPlatformList } from "./(social-media-tools)/components/bio-generator-platform-configs";import { imageResizerPlatformList } from "./(social-media-tools)/components/image-resizer-platform-configs";+import { logoGeneratorPlatformList } from "./(social-media-tools)/components/logo-generator-platform-configs";import {SiDiscord,SiX,@@ -57,6 +59,7 @@ import {SiSnapchat,SiSteam,SiTumblr,+ SiWhatsapp,} from "@icons-pack/react-simple-icons";export const metadata = {@@ -243,6 +246,7 @@ const platformIconMap: Record<string, any> = {snapchat: SiSnapchat,steam: SiSteam,tumblr: SiTumblr,+ whatsapp: SiWhatsapp,};const fontGeneratorTools = platformList.map(platform => ({@@ -308,6 +312,13 @@ const imageResizerTools = imageResizerPlatformList.map(platform => ({description: `Resize and crop images for ${platform.name} profiles, covers, and posts.`,}));+const logoGeneratorTools = logoGeneratorPlatformList.map(platform => ({+ href: `/tools/${platform.id}-logo-generator`,+ icon: platformIconMap[platform.id] || Palette,+ title: platform.displayName,+ description: `Generate AI-powered brand logos for ${platform.name}.`,+}));+const socialMediaTools = [...fontGeneratorTools,...commentGeneratorTools,@@ -318,6 +329,7 @@ const socialMediaTools = [...characterCounterTools,...bioGeneratorTools,...imageResizerTools,+ ...logoGeneratorTools,];function ToolCard({ tool }: { tool: { href: string; icon: any; title: string; description: string } }) {diff --git a/docs/src/app/api/tools/generate-logo/route.ts b/docs/src/app/api/tools/generate-logo/route.tsnew file mode 100644index 000000000..69f506c1d--- /dev/null+++ b/docs/src/app/api/tools/generate-logo/route.ts@@ -0,0 +1,96 @@+import { callOpenRouterImage } from "@/lib/openrouter";+import { getClientIP, rateLimit } from "@/lib/rate-limit";+import { NextRequest, NextResponse } from "next/server";+import { z } from "zod";++const requestSchema = z.object({+ brandName: z.string().min(1).max(100),+ industry: z.string().max(100).optional(),+ style: z.string(),+ colors: z.string().max(100).optional(),+ platform: z.string(),+});++const DESIGN_STYLES: Record<string, string> = {+ minimalist: "minimalist with clean lines, simple shapes, and limited colors",+ modern: "modern, contemporary, sleek, and tech-forward",+ playful: "playful, fun, colorful, and friendly",+ professional: "professional, corporate, trustworthy, and established",+ vintage: "vintage, retro, classic, and nostalgic",+ abstract: "abstract, artistic, with unique shapes and forms",+ geometric: "geometric with structured shapes and patterns",+ "hand-drawn": "hand-drawn, organic, personal, and artisanal",+};++export async function POST(request: NextRequest) {+ try {+ // Rate limiting - 3 requests per minute (image generation is expensive)+ const ip = getClientIP(request);+ const rateLimitResult = rateLimit(`logo-generator:${ip}`, 3, 60 * 1000);++ const headers = new Headers({+ "X-RateLimit-Limit": rateLimitResult.limit.toString(),+ "X-RateLimit-Remaining": rateLimitResult.remaining.toString(),+ "X-RateLimit-Reset": new Date(rateLimitResult.reset).toISOString(),+ });++ if (!rateLimitResult.success) {+ return NextResponse.json(+ { error: "Rate limit exceeded. Please try again later." },+ { status: 429, headers }+ );+ }++ // Parse and validate request+ const body = await request.json();+ const validatedData = requestSchema.parse(body);++ const styleDescription =+ DESIGN_STYLES[validatedData.style.toLowerCase()] ||+ validatedData.style;++ const colorInstruction = validatedData.colors+ ? `Use these colors: ${validatedData.colors}`+ : "Use appropriate colors that fit the brand and industry";++ const industryContext = validatedData.industry+ ? `in the ${validatedData.industry} industry`+ : "";++ // Build prompt for logo generation+ const prompt = `Create a professional brand logo for "${validatedData.brandName}" ${industryContext}.++Design Style: ${styleDescription}++${colorInstruction}++Requirements:+- Create a clean, professional logo design+- The logo should be suitable for use as a ${validatedData.platform} profile picture or brand icon+- Make it memorable and recognizable+- Keep the design simple enough to work at small sizes+- Do not include any text or letters in the logo - focus on an iconic symbol/mark only+- The logo should work well on both light and dark backgrounds+- Output a square image with the logo centered++Generate only the logo image, no explanations or text.`;++ // Call OpenRouter with Gemini image model+ const imageUrl = await callOpenRouterImage(prompt);++ return NextResponse.json({ imageUrl }, { headers });+ } catch (error) {+ if (error instanceof z.ZodError) {+ return NextResponse.json(+ { error: "Invalid request data", details: z.treeifyError(error) },+ { status: 400 }+ );+ }++ console.error("Logo generation error:", error);+ return NextResponse.json(+ { error: "Failed to generate logo. Please try again." },+ { status: 500 }+ );+ }+}diff --git a/docs/src/lib/openrouter.ts b/docs/src/lib/openrouter.tsindex 82d567edc..e3e913227 100644--- a/docs/src/lib/openrouter.ts+++ b/docs/src/lib/openrouter.ts@@ -2,7 +2,32 @@ const OPENROUTER_API_URL = "https://openrouter.ai/api/v1/chat/completions";export interface OpenRouterMessage {role: "system" | "user" | "assistant";- content: string;+ content: string | OpenRouterContentPart[];+}++export interface OpenRouterContentPart {+ type: "text" | "image_url";+ text?: string;+ image_url?: {+ url: string;+ };+}++export interface OpenRouterImageResponse {+ id: string;+ choices: Array<{+ message: {+ role: string;+ content?: string;+ images?: Array<{+ type: string;+ image_url: {+ url: string;+ };+ }>;+ };+ finish_reason: string;+ }>;}export interface OpenRouterResponse {@@ -64,9 +89,67 @@ export async function callOpenRouter(throw new Error("No response from OpenRouter");}- return data.choices[0].message.content;+ return data.choices[0].message.content as string;} catch (error) {console.error("OpenRouter error:", error);throw error;}}++export async function callOpenRouterImage(+ prompt: string,+ options?: {+ model?: string;+ }+): Promise<string> {+ const apiKey = process.env.OPENROUTER_API_KEY;+ const model = options?.model || "google/gemini-2.5-flash-image-preview";++ if (!apiKey) {+ throw new Error("OPENROUTER_API_KEY is not configured");+ }++ try {+ const response = await fetch(OPENROUTER_API_URL, {+ method: "POST",+ headers: {+ Authorization: `Bearer ${apiKey}`,+ "Content-Type": "application/json",+ "HTTP-Referer": "https://rybbit.com",+ "X-Title": "Rybbit Analytics Tools",+ },+ body: JSON.stringify({+ model,+ messages: [+ {+ role: "user",+ content: prompt,+ },+ ],+ modalities: ["image", "text"],+ }),+ });++ if (!response.ok) {+ const error = await response.text();+ throw new Error(`OpenRouter API error: ${response.status} - ${error}`);+ }++ const data = (await response.json()) as OpenRouterImageResponse;++ if (!data.choices || data.choices.length === 0) {+ throw new Error("No response from OpenRouter");+ }++ // Images are returned in message.images array+ const images = data.choices[0].message.images;+ if (images && images.length > 0 && images[0].image_url?.url) {+ return images[0].image_url.url;+ }++ throw new Error("No image found in response");+ } catch (error) {+ console.error("OpenRouter image error:", error);+ throw error;+ }+}