🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add hashtag generation tools and enhance related tools section
Bill Yang6ac034c1ebb5
diff --git a/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx b/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsxindex 663be87c1..cc6f62f7c 100644--- a/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx+++ b/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx@@ -4,6 +4,7 @@ import AICommentForm from "../../components/AICommentForm";import PageNameGenerator from "../../components/PageNameGenerator";import PostGenerator from "../../components/PostGenerator";import UsernameGenerator from "../../components/UsernameGenerator";+import { HashtagGenerator } from "../../components/HashtagGenerator";import { platformConfigs, platformList } from "../../components/platform-configs";import {commentPlatformConfigs,@@ -21,6 +22,10 @@ import {usernameGeneratorPlatformConfigs,usernameGeneratorPlatformList,} from "../../components/username-generator-platform-configs";+import {+ hashtagGeneratorPlatformConfigs,+ hashtagGeneratorPlatformList,+} from "../../components/hashtag-generator-platform-configs";import type { Metadata } from "next";import { notFound } from "next/navigation";@@ -52,12 +57,17 @@ export async function generateStaticParams() {slug: `${platform.id}-username-generator`,}));+ const hashtagGenerators = hashtagGeneratorPlatformList.map((platform) => ({+ slug: `${platform.id}-hashtag-generator`,+ }));+return [...fontGenerators,...commentGenerators,...pageNameGenerators,...postGenerators,...usernameGenerators,+ ...hashtagGenerators,];}@@ -67,6 +77,36 @@ export async function generateMetadata({}: PageProps): Promise<Metadata> {const { slug } = await params;+ // Check if it's a hashtag generator+ if (slug.endsWith("-hashtag-generator")) {+ const platformId = slug.replace("-hashtag-generator", "");+ const platform = hashtagGeneratorPlatformConfigs[platformId];++ if (!platform) {+ return { title: "Hashtag Generator Not Found" };+ }++ return {+ title: `${platform.displayName} | AI-Powered ${platform.name} Hashtags`,+ description: platform.description,+ openGraph: {+ title: platform.displayName,+ description: platform.description,+ type: "website",+ url: `https://rybbit.com/tools/${platform.id}-hashtag-generator`,+ siteName: "Rybbit Documentation",+ },+ twitter: {+ card: "summary_large_image",+ title: platform.displayName,+ description: platform.description,+ },+ alternates: {+ canonical: `https://rybbit.com/tools/${platform.id}-hashtag-generator`,+ },+ };+ }+// Check if it's a username generatorif (slug.endsWith("-username-generator")) {const platformId = slug.replace("-username-generator", "");@@ -221,6 +261,193 @@ export async function generateMetadata({export default async function PlatformToolPage({ params }: PageProps) {const { slug } = await params;+ // Check if it's a hashtag generator+ if (slug.endsWith("-hashtag-generator")) {+ const platformId = slug.replace("-hashtag-generator", "");+ const platform = hashtagGeneratorPlatformConfigs[platformId];++ // Handle invalid platform+ if (!platform) {+ notFound();+ }++ const structuredData = {+ "@context": "https://schema.org",+ "@type": "WebApplication",+ name: platform.displayName,+ description: platform.description,+ url: `https://rybbit.com/tools/${platform.id}-hashtag-generator`,+ applicationCategory: "Utility",+ 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} Hashtags+ </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>Describe your content</strong> - What is your post about?+ </li>+ <li>+ <strong>Select a strategy</strong> - Choose from{" "}+ {platform.hashtagStrategies.length} platform-optimized strategies+ </li>+ <li>+ <strong>Add niche keywords (optional)</strong> - Include specific+ topics or interests+ </li>+ <li>+ <strong>Click "Generate Hashtags"</strong> to get 3 unique sets+ </li>+ <li>+ <strong>Copy and use</strong> your favorite hashtag set on{" "}+ {platform.name}+ </li>+ </ol>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">+ Available Hashtag Strategies+ </h3>+ <ul className="grid grid-cols-2 gap-2 text-sm text-neutral-700 dark:text-neutral-300 mb-6">+ {platform.hashtagStrategies.map((strategy) => (+ <li key={strategy} className="flex items-center gap-2">+ <span className="w-1.5 h-1.5 rounded-full bg-emerald-500" />+ {strategy}+ </li>+ ))}+ </ul>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">+ Hashtag Best Practices for {platform.name}+ </h3>+ <ul className="space-y-2 text-neutral-700 dark:text-neutral-300 mb-6">+ <li>+ <strong>Use relevant hashtags:</strong> Choose hashtags that+ accurately describe your content+ </li>+ <li>+ <strong>Mix popular and niche:</strong> Combine high-volume hashtags+ with specific niche tags+ </li>+ <li>+ <strong>Research trending tags:</strong> Stay current with trending+ topics in your niche+ </li>+ <li>+ <strong>Don't overuse:</strong> Follow platform-specific best+ practices for hashtag counts+ </li>+ <li>+ <strong>Track performance:</strong> Monitor which hashtags drive the+ most engagement+ </li>+ </ul>++ {platform.maxHashtags && (+ <div className="bg-emerald-50 dark:bg-emerald-900/20 border border-emerald-200 dark:border-emerald-800 rounded-lg p-4 mb-6">+ <h4 className="font-semibold text-emerald-900 dark:text-emerald-100 mb-2">+ Platform Guidelines+ </h4>+ <ul className="space-y-1 text-sm text-emerald-800 dark:text-emerald-200">+ <li>+ <strong>Maximum hashtags:</strong> {platform.maxHashtags}+ </li>+ {platform.characterLimit && (+ <li>+ <strong>Character limit:</strong> {platform.characterLimit}{" "}+ total characters+ </li>+ )}+ </ul>+ </div>+ )}++ <p className="text-sm text-neutral-600 dark:text-neutral-400 mt-6">+ <strong>Note:</strong> While this tool generates strategic hashtags,+ always review and customize them based on your specific content and+ audience. The most effective hashtags are relevant, timely, and+ authentic to your brand.+ </p>+ </>+ );++ const faqs = [+ {+ question: `How does the ${platform.name} hashtag generator work?`,+ answer: `This tool uses AI to analyze your content topic and generate strategic hashtags based on your chosen strategy. It considers ${platform.name}'s best practices, character limits, and hashtag culture to create effective hashtag sets that maximize reach and engagement.`,+ },+ {+ question: "What hashtag strategies are available?",+ answer: `You can choose from ${platform.hashtagStrategies.length} strategies: ${platform.hashtagStrategies.join(", ")}. Each strategy is optimized for ${platform.name} and designed to help you achieve different goals like viral reach, niche engagement, or community building.`,+ },+ {+ question: "Should I use all the generated hashtags?",+ answer: `Not necessarily. Each set is designed to work together, but you should review and adjust based on your specific content and goals. Some hashtags may be more relevant than others for your particular post. Quality and relevance matter more than quantity.`,+ },+ {+ question: "How many hashtags should I use?",+ answer: `${platform.contextGuidelines} The optimal number varies by platform and content type. Generally, focus on using highly relevant hashtags rather than maxing out the limit.`,+ },+ {+ question: "Can I edit the generated hashtags?",+ answer:+ "Absolutely! Use the generated hashtags as a starting point and customize them to better fit your content. Combining AI-generated hashtags with your own research often yields the best results.",+ },+ {+ question: "How can Rybbit help me track hashtag performance?",+ answer: (+ <>+ Rybbit helps you measure which content and hashtags drive the most+ engagement on {platform.name}. Track clicks, traffic sources, and+ content performance to optimize your hashtag strategy.{" "}+ <a+ href="https://rybbit.com"+ className="text-emerald-600 hover:text-emerald-500 underline"+ >+ Start tracking for free+ </a>+ .+ </>+ ),+ },+ ];++ return (+ <ToolPageLayout+ toolSlug={`${platform.id}-hashtag-generator`}+ title={platform.displayName}+ description={platform.description}+ badge="AI-Powered Tool"+ toolComponent={<HashtagGenerator platform={platform} />}+ educationalContent={educationalContent}+ faqs={faqs}+ relatedToolsCategory="social-media"+ ctaTitle={`Optimize your ${platform.name} hashtag strategy with Rybbit`}+ ctaDescription={`Track which hashtags drive the most engagement and refine your content strategy with data-driven insights.`}+ ctaEventLocation={`${platform.id}_hashtag_generator_cta`}+ structuredData={structuredData}+ />+ );+ }+// Check if it's a username generatorif (slug.endsWith("-username-generator")) {const platformId = slug.replace("-username-generator", "");diff --git a/docs/src/app/(home)/tools/components/HashtagGenerator.tsx b/docs/src/app/(home)/tools/components/HashtagGenerator.tsxnew file mode 100644index 000000000..357f94f4b--- /dev/null+++ b/docs/src/app/(home)/tools/components/HashtagGenerator.tsx@@ -0,0 +1,261 @@+"use client";++import { useState } from "react";+import { Hash, Copy, Check, AlertCircle, Loader2 } from "lucide-react";+import type { HashtagGeneratorPlatformConfig } from "./hashtag-generator-platform-configs";++interface HashtagGeneratorProps {+ platform: HashtagGeneratorPlatformConfig;+}++export function HashtagGenerator({ platform }: HashtagGeneratorProps) {+ const [topic, setTopic] = useState("");+ const [strategy, setStrategy] = useState(platform.hashtagStrategies[0]);+ const [keywords, setKeywords] = useState("");+ const [hashtags, setHashtags] = useState<string[]>([]);+ const [loading, setLoading] = useState(false);+ const [error, setError] = useState("");+ const [copiedIndex, setCopiedIndex] = useState<number | null>(null);+ const [rateLimit, setRateLimit] = useState<{+ limit: number;+ remaining: number;+ reset: string;+ } | null>(null);++ const handleGenerate = async () => {+ if (!topic.trim()) {+ setError("Please enter a topic or content description");+ return;+ }++ setLoading(true);+ setError("");+ setHashtags([]);++ try {+ const response = await fetch("/api/tools/generate-hashtag", {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({+ topic: topic.trim(),+ strategy,+ keywords: keywords.trim() || undefined,+ platform: platform.id,+ maxHashtags: platform.maxHashtags,+ characterLimit: platform.characterLimit,+ }),+ });++ // 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 hashtags");+ }++ setHashtags(data.hashtags);+ } catch (err) {+ setError(err instanceof Error ? err.message : "An error occurred");+ } finally {+ setLoading(false);+ }+ };++ const copyHashtags = async (hashtagSet: string, index: number) => {+ try {+ await navigator.clipboard.writeText(hashtagSet);+ setCopiedIndex(index);+ setTimeout(() => setCopiedIndex(null), 2000);+ } catch (err) {+ console.error("Failed to copy:", err);+ }+ };++ const copyAllHashtags = async () => {+ try {+ await navigator.clipboard.writeText(hashtags.join(" "));+ setCopiedIndex(-1);+ setTimeout(() => setCopiedIndex(null), 2000);+ } catch (err) {+ console.error("Failed to copy:", err);+ }+ };++ return (+ <div className="w-full max-w-4xl mx-auto">+ {/* Context Guidelines */}+ <div className="mb-8 p-6 bg-emerald-50/50 dark:bg-emerald-950/20 border border-emerald-200 dark:border-emerald-800 rounded-xl">+ <div className="flex items-start gap-3">+ <Hash className="w-5 h-5 text-emerald-600 dark:text-emerald-400 mt-0.5 flex-shrink-0" />+ <div>+ <h3 className="font-semibold text-neutral-900 dark:text-white mb-2">+ {platform.name} Hashtag Guidelines+ </h3>+ <p className="text-sm text-neutral-600 dark:text-neutral-300">+ {platform.contextGuidelines}+ </p>+ </div>+ </div>+ </div>++ {/* Generator Form */}+ <div className="space-y-6 mb-8">+ {/* Topic Input */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Topic or Content Description *+ </label>+ <textarea+ value={topic}+ onChange={(e) => setTopic(e.target.value)}+ placeholder={`Describe your ${platform.name} content...`}+ rows={4}+ 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 resize-none text-neutral-900 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500"+ />+ </div>++ {/* Strategy Selector */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Hashtag Strategy+ </label>+ <select+ value={strategy}+ onChange={(e) => setStrategy(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"+ >+ {platform.hashtagStrategies.map((strat) => (+ <option key={strat} value={strat}>+ {strat}+ </option>+ ))}+ </select>+ </div>++ {/* Keywords (Optional) */}+ <div>+ <label className="block text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-2">+ Niche/Keywords (Optional)+ </label>+ <input+ type="text"+ value={keywords}+ onChange={(e) => setKeywords(e.target.value)}+ placeholder="e.g., fitness, vegan, startup, travel"+ 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 || !topic.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...+ </>+ ) : (+ <>+ <Hash className="w-5 h-5" />+ Generate Hashtags+ </>+ )}+ </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 Hashtags */}+ {hashtags.length > 0 && (+ <div className="space-y-4">+ <div className="flex items-center justify-between mb-4">+ <h3 className="text-lg font-semibold text-neutral-900 dark:text-white">+ Generated Hashtag Sets+ </h3>+ <button+ onClick={copyAllHashtags}+ className="px-4 py-2 text-sm bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 text-neutral-700 dark:text-neutral-200 rounded-lg transition-colors duration-200 flex items-center gap-2"+ >+ {copiedIndex === -1 ? (+ <>+ <Check className="w-4 h-4 text-emerald-600 dark:text-emerald-400" />+ Copied!+ </>+ ) : (+ <>+ <Copy className="w-4 h-4" />+ Copy All+ </>+ )}+ </button>+ </div>++ {hashtags.map((hashtagSet, index) => (+ <div+ key={index}+ className="p-4 bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-lg"+ >+ <div className="flex items-start justify-between gap-4 mb-3">+ <p className="text-sm font-medium text-neutral-500 dark:text-neutral-400">+ Set {index + 1}+ </p>+ <button+ onClick={() => copyHashtags(hashtagSet, index)}+ className="px-3 py-1.5 text-xs bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 text-neutral-700 dark:text-neutral-200 rounded-md transition-colors duration-200 flex items-center gap-2 flex-shrink-0"+ >+ {copiedIndex === index ? (+ <>+ <Check className="w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400" />+ Copied!+ </>+ ) : (+ <>+ <Copy className="w-3.5 h-3.5" />+ Copy+ </>+ )}+ </button>+ </div>+ <p className="text-neutral-900 dark:text-white break-words">+ {hashtagSet}+ </p>+ <p className="text-xs text-neutral-500 dark:text-neutral-400 mt-2">+ {hashtagSet.split(/\s+/).filter(Boolean).length} hashtags • {hashtagSet.length} characters+ </p>+ </div>+ ))}+ </div>+ )}+ </div>+ );+}diff --git a/docs/src/app/(home)/tools/components/hashtag-generator-platform-configs.ts b/docs/src/app/(home)/tools/components/hashtag-generator-platform-configs.tsnew file mode 100644index 000000000..b591151a1--- /dev/null+++ b/docs/src/app/(home)/tools/components/hashtag-generator-platform-configs.ts@@ -0,0 +1,239 @@+export interface HashtagGeneratorPlatformConfig {+ id: string;+ name: string;+ displayName: string;+ description: string;+ simpleIconSlug: string;+ colorHex: string;+ maxHashtags?: number;+ characterLimit?: number;+ educationalContent: string;+ contextGuidelines: string;+ hashtagStrategies: string[];+}++export const hashtagGeneratorPlatformConfigs: Record<+ string,+ HashtagGeneratorPlatformConfig+> = {+ instagram: {+ id: "instagram",+ name: "Instagram",+ displayName: "Instagram Hashtag Generator",+ description:+ "Generate strategic Instagram hashtags with AI. Create hashtag sets that boost discoverability and reach your target audience.",+ simpleIconSlug: "instagram",+ colorHex: "#E4405F",+ maxHashtags: 30,+ characterLimit: undefined,+ contextGuidelines:+ "Instagram allows up to 30 hashtags per post. Use a mix of popular, niche, and branded hashtags for maximum reach and engagement.",+ educationalContent: `Instagram hashtags are crucial for discoverability and reaching new audiences. The right hashtag strategy can significantly increase your post's reach, engagement, and follower growth.++Effective Instagram hashtag strategies use a mix of popular hashtags (for broad reach), niche hashtags (for targeted engagement), and branded hashtags (for community building). The best approach balances visibility with relevance to attract your ideal audience.`,+ hashtagStrategies: [+ "Viral/Trending",+ "Niche-Specific",+ "Engagement-Focused",+ "Community Building",+ "Location-Based",+ "Mixed Strategy",+ ],+ },+ tiktok: {+ id: "tiktok",+ name: "TikTok",+ displayName: "TikTok Hashtag Generator",+ description:+ "Generate trending TikTok hashtags with AI. Create hashtag combinations that increase visibility and help your videos go viral.",+ simpleIconSlug: "tiktok",+ colorHex: "#000000",+ maxHashtags: undefined,+ characterLimit: 100,+ contextGuidelines:+ "TikTok hashtags should include trending tags, niche tags, and content descriptors. Focus on discoverability and FYP (For You Page) optimization.",+ educationalContent: `TikTok hashtags help your content get discovered and can significantly impact whether your video reaches the For You Page (FYP). Strategic hashtag use is essential for visibility and growth.++Effective TikTok hashtag strategies combine trending hashtags (for viral potential), niche hashtags (for targeted reach), and descriptive hashtags (for content categorization). The best approach keeps hashtags current with trends while staying relevant to your content.`,+ hashtagStrategies: [+ "Viral/Trending",+ "FYP Optimized",+ "Niche Community",+ "Content Category",+ "Challenge/Trend",+ "Mixed Strategy",+ ],+ },+ x: {+ id: "x",+ name: "X (Twitter)",+ displayName: "X (Twitter) Hashtag Generator",+ description:+ "Generate impactful X (Twitter) hashtags with AI. Create concise hashtag sets that join conversations and increase engagement.",+ simpleIconSlug: "x",+ colorHex: "#000000",+ maxHashtags: undefined,+ characterLimit: 280,+ contextGuidelines:+ "X/Twitter hashtags should be concise and relevant. 1-2 hashtags per tweet often perform better than many. Use trending hashtags to join conversations.",+ educationalContent: `X (Twitter) hashtags help you join conversations, increase discoverability, and engage with trending topics. Unlike Instagram, fewer hashtags (1-3) often perform better on X.++Effective X hashtag strategies focus on relevance over quantity. Trending hashtags can increase visibility dramatically but should be used authentically. The best approach uses targeted hashtags that connect your content to ongoing conversations.`,+ hashtagStrategies: [+ "Trending Topics",+ "Industry-Specific",+ "Event/News Related",+ "Community Tags",+ "Brand Hashtags",+ "Mixed Strategy",+ ],+ },+ linkedin: {+ id: "linkedin",+ name: "LinkedIn",+ displayName: "LinkedIn Hashtag Generator",+ description:+ "Generate professional LinkedIn hashtags with AI. Create hashtag sets that increase post visibility in professional networks.",+ simpleIconSlug: "linkedin",+ colorHex: "#0A66C2",+ maxHashtags: undefined,+ characterLimit: 3000,+ contextGuidelines:+ "LinkedIn recommends 3-5 hashtags per post. Focus on professional, industry-specific hashtags that help the right professionals find your content.",+ educationalContent: `LinkedIn hashtags help your content reach professionals interested in your topics. They're essential for expanding reach beyond your immediate network and establishing thought leadership.++Effective LinkedIn hashtag strategies use 3-5 professional, industry-specific hashtags. Popular hashtags increase visibility while niche hashtags attract targeted engagement. The best approach balances broad professional topics with specific industry keywords.`,+ hashtagStrategies: [+ "Industry Leadership",+ "Professional Development",+ "Business/Industry",+ "Skills & Expertise",+ "Trending Professional",+ "Mixed Strategy",+ ],+ },+ facebook: {+ id: "facebook",+ name: "Facebook",+ displayName: "Facebook Hashtag Generator",+ description:+ "Generate effective Facebook hashtags with AI. Create hashtag sets that increase post reach and engagement in groups and pages.",+ simpleIconSlug: "facebook",+ colorHex: "#1877F2",+ maxHashtags: undefined,+ characterLimit: 63206,+ contextGuidelines:+ "Facebook hashtags are less critical than on other platforms but can help with discoverability. Use 1-3 relevant hashtags focused on your topic or community.",+ educationalContent: `Facebook hashtags help with content discovery, especially in groups and public posts. While not as essential as on Instagram or TikTok, strategic hashtag use can increase reach.++Effective Facebook hashtag strategies use 1-3 highly relevant hashtags. Focus on community-specific or topic-focused tags rather than generic popular hashtags. The best approach targets your specific audience or local community.`,+ hashtagStrategies: [+ "Community-Focused",+ "Topic/Interest Based",+ "Local/Regional",+ "Event-Specific",+ "Brand/Group Tags",+ "Mixed Strategy",+ ],+ },+ youtube: {+ id: "youtube",+ name: "YouTube",+ displayName: "YouTube Hashtag Generator",+ description:+ "Generate SEO-optimized YouTube hashtags with AI. Create hashtag sets that improve video discoverability and search rankings.",+ simpleIconSlug: "youtube",+ colorHex: "#FF0000",+ maxHashtags: 15,+ characterLimit: 5000,+ contextGuidelines:+ "YouTube allows hashtags in titles and descriptions (max 15, first 3 appear above title). Focus on searchable, descriptive hashtags that improve SEO.",+ educationalContent: `YouTube hashtags improve video discoverability and SEO. The first 3 hashtags appear above your video title and are especially important for search and suggestions.++Effective YouTube hashtag strategies use descriptive, searchable keywords. Focus on video topic, content category, and related searches. The best approach balances popular search terms with specific niche descriptors that accurately represent your content.`,+ hashtagStrategies: [+ "SEO/Search Optimized",+ "Topic/Category",+ "Tutorial/How-To",+ "Trending/Viral",+ "Series/Brand Tags",+ "Mixed Strategy",+ ],+ },+ pinterest: {+ id: "pinterest",+ name: "Pinterest",+ displayName: "Pinterest Hashtag Generator",+ description:+ "Generate Pinterest hashtags with AI. Create hashtag sets that improve pin discoverability and drive traffic to your content.",+ simpleIconSlug: "pinterest",+ colorHex: "#E60023",+ maxHashtags: 20,+ characterLimit: 500,+ contextGuidelines:+ "Pinterest recommends up to 20 hashtags. Focus on descriptive, searchable keywords that match user search intent and pin content.",+ educationalContent: `Pinterest hashtags help your pins appear in search results and related pin suggestions. They're searchable and categorize your content for users actively looking for ideas.++Effective Pinterest hashtag strategies use descriptive keywords that match search intent. Focus on specific topics, styles, or use cases rather than broad generic terms. The best approach uses hashtags that describe what users will learn, make, or achieve with your pin.`,+ hashtagStrategies: [+ "Search-Optimized",+ "DIY/Tutorial",+ "Style/Aesthetic",+ "Seasonal/Occasion",+ "How-To/Guide",+ "Mixed Strategy",+ ],+ },+ threads: {+ id: "threads",+ name: "Threads",+ displayName: "Threads Hashtag Generator",+ description:+ "Generate engaging Threads hashtags with AI. Create hashtag sets that increase post visibility and join trending conversations.",+ simpleIconSlug: "threads",+ colorHex: "#000000",+ maxHashtags: undefined,+ characterLimit: 500,+ contextGuidelines:+ "Threads hashtags work similarly to Instagram. Use relevant hashtags to increase discoverability and join conversations.",+ educationalContent: `Threads hashtags help your posts get discovered beyond your followers. As Meta's text-based platform, hashtags function similarly to Instagram but in a conversation-focused context.++Effective Threads hashtag strategies balance trending topics with niche interests. Focus on conversation starters and community tags. The best approach uses hashtags that encourage discussion and connect you with like-minded users.`,+ hashtagStrategies: [+ "Trending Conversations",+ "Community Topics",+ "Interest-Based",+ "Discussion Starters",+ "Meta Ecosystem",+ "Mixed Strategy",+ ],+ },+ tumblr: {+ id: "tumblr",+ name: "Tumblr",+ displayName: "Tumblr Tag Generator",+ description:+ "Generate creative Tumblr tags with AI. Create tag sets that help your posts get discovered in Tumblr's community-driven platform.",+ simpleIconSlug: "tumblr",+ colorHex: "#36465D",+ maxHashtags: 30,+ characterLimit: undefined,+ contextGuidelines:+ "Tumblr tags (not hashtags with #) are crucial for discoverability. Use up to 30 tags that describe content, fandom, aesthetic, or topic. First 5 tags are most important.",+ educationalContent: `Tumblr tags are essential for content discovery and community connection. Unlike other platforms, tags don't use the # symbol and can include spaces. The first 5 tags are indexed for search and most important.++Effective Tumblr tag strategies use a mix of broad and specific tags. Include fandom tags, content type, aesthetic descriptors, and relevant topics. The best approach balances popular tags with niche community tags that connect you to your target audience.`,+ hashtagStrategies: [+ "Fandom/Community",+ "Aesthetic/Style",+ "Content Type",+ "Popular/Trending",+ "Niche Interest",+ "Mixed Strategy",+ ],+ },+};++export const hashtagGeneratorPlatformList = Object.values(+ hashtagGeneratorPlatformConfigs+);diff --git a/docs/src/app/(home)/tools/page.tsx b/docs/src/app/(home)/tools/page.tsxindex 74b02b1c4..cbd6b760a 100644--- a/docs/src/app/(home)/tools/page.tsx+++ b/docs/src/app/(home)/tools/page.tsx@@ -27,6 +27,7 @@ import { commentPlatformList } from "./components/comment-platform-configs";import { pageNamePlatformList } from "./components/page-name-platform-configs";import { postGeneratorPlatformList } from "./components/post-generator-platform-configs";import { usernameGeneratorPlatformList } from "./components/username-generator-platform-configs";+import { hashtagGeneratorPlatformList } from "./components/hashtag-generator-platform-configs";import {SiDiscord,SiX,@@ -52,6 +53,7 @@ import {SiSubstack,SiSnapchat,SiSteam,+ SiTumblr,} from "@icons-pack/react-simple-icons";export const metadata = {@@ -237,6 +239,7 @@ const platformIconMap: Record<string, any> = {substack: SiSubstack,snapchat: SiSnapchat,steam: SiSteam,+ tumblr: SiTumblr,};const fontGeneratorTools = platformList.map(platform => ({@@ -274,12 +277,20 @@ const usernameGeneratorTools = usernameGeneratorPlatformList.map(platform => ({description: `Generate creative usernames for ${platform.name} with AI.`,}));+const hashtagGeneratorTools = hashtagGeneratorPlatformList.map(platform => ({+ href: `/tools/${platform.id}-hashtag-generator`,+ icon: platformIconMap[platform.id],+ title: platform.displayName,+ description: `Generate strategic hashtags for ${platform.name} to boost discoverability.`,+}));+const socialMediaTools = [...fontGeneratorTools,...commentGeneratorTools,...pageNameGeneratorTools,...postGeneratorTools,...usernameGeneratorTools,+ ...hashtagGeneratorTools,];function ToolCard({ tool }: { tool: { href: string; icon: any; title: string; description: string } }) {diff --git a/docs/src/app/api/tools/generate-hashtag/route.ts b/docs/src/app/api/tools/generate-hashtag/route.tsnew file mode 100644index 000000000..9c3e76f47--- /dev/null+++ b/docs/src/app/api/tools/generate-hashtag/route.ts@@ -0,0 +1,142 @@+import { callOpenRouter } from "@/lib/openrouter";+import { getClientIP, rateLimit } from "@/lib/rate-limit";+import { NextRequest, NextResponse } from "next/server";+import { z } from "zod";++const requestSchema = z.object({+ topic: z.string().max(500),+ strategy: z.string(),+ keywords: z.string().max(200).optional(),+ platform: z.string(),+ maxHashtags: z.number().optional(),+ characterLimit: z.number().optional(),+});++export async function POST(request: NextRequest) {+ try {+ // Rate limiting - 5 requests per minute+ const ip = getClientIP(request);+ const rateLimitResult = rateLimit(+ `hashtag-generator:${ip}`,+ 5,+ 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 keywordsText = validatedData.keywords+ ? `\nNiche/Keywords: ${validatedData.keywords}`+ : "";++ const maxHashtagsText = validatedData.maxHashtags+ ? `\n- Platform limit: Maximum ${validatedData.maxHashtags} hashtags`+ : "";+ const characterLimitText = validatedData.characterLimit+ ? `\n- Total character limit for all hashtags: ${validatedData.characterLimit} characters`+ : "";++ // Call OpenRouter to generate hashtags+ const prompt = `You are a social media hashtag expert specializing in ${validatedData.platform}. Generate 3 unique sets of hashtags based on:++Topic/Content: ${validatedData.topic}${keywordsText}+Strategy: ${validatedData.strategy}++Requirements:${maxHashtagsText}${characterLimitText}+- All hashtags must start with # symbol+- Hashtags should be relevant, trending-aware, and strategic+- Mix popular and niche hashtags for maximum reach and engagement+- Use proper capitalization for readability (e.g., #SocialMedia not #socialmedia)+- Avoid banned or spam-associated hashtags+- Each set should take a slightly different strategic approach to the topic+- Optimize for ${validatedData.platform} best practices+- Ensure hashtags are appropriate for the platform's audience and culture++Return ONLY a JSON array of 3 hashtag set strings in this exact format:+["#Hashtag1 #Hashtag2 #Hashtag3", "#Hashtag4 #Hashtag5 #Hashtag6", "#Hashtag7 #Hashtag8 #Hashtag9"]++Each string should be a complete set of hashtags separated by spaces. Do not include any markdown formatting, explanation, or additional text - just the raw JSON array of 3 strings.`;++ const response = await callOpenRouter([+ {+ role: "user",+ content: prompt,+ },+ ]);++ // Parse JSON response+ let hashtags: string[];+ try {+ // Extract JSON from response+ const jsonMatch = response.match(/\[[\s\S]*\]/);+ if (!jsonMatch) {+ throw new Error("No JSON array found in response");+ }+ hashtags = JSON.parse(jsonMatch[0]);++ // Validate it's an array of strings+ if (+ !Array.isArray(hashtags) ||+ !hashtags.every((h) => typeof h === "string")+ ) {+ throw new Error("Invalid hashtag format");+ }++ // Filter out hashtag sets that exceed limits if specified+ if (validatedData.maxHashtags) {+ hashtags = hashtags.filter((hashtagSet) => {+ const count = hashtagSet.split(/\s+/).filter(Boolean).length;+ return count <= validatedData.maxHashtags!;+ });+ }++ if (validatedData.characterLimit) {+ hashtags = hashtags.filter(+ (hashtagSet) => hashtagSet.length <= validatedData.characterLimit!+ );+ }++ // If we filtered out too many, we might have fewer than 3 sets+ if (hashtags.length === 0) {+ throw new Error(+ "Generated hashtags didn't meet platform requirements. Please try again."+ );+ }+ } catch (error) {+ console.error("Parse error:", error);+ return NextResponse.json(+ { error: "Failed to parse generated hashtags. Please try again." },+ { status: 500, headers }+ );+ }++ return NextResponse.json({ hashtags }, { headers });+ } catch (error) {+ if (error instanceof z.ZodError) {+ return NextResponse.json(+ { error: "Invalid request data", details: z.treeifyError(error) },+ { status: 400 }+ );+ }++ console.error("Hashtag generation error:", error);+ return NextResponse.json(+ { error: "Failed to generate hashtags. Please try again." },+ { status: 500 }+ );+ }+}diff --git a/docs/src/components/RelatedTools.tsx b/docs/src/components/RelatedTools.tsxindex 1e36aafda..214485993 100644--- a/docs/src/components/RelatedTools.tsx+++ b/docs/src/components/RelatedTools.tsx@@ -609,6 +609,60 @@ const allTools: Tool[] = [href: "/tools/substack-username-generator",category: "social-media",},+ {+ name: "Instagram Hashtag Generator",+ description: "Generate strategic Instagram hashtags to boost discoverability",+ href: "/tools/instagram-hashtag-generator",+ category: "social-media",+ },+ {+ name: "TikTok Hashtag Generator",+ description: "Generate trending TikTok hashtags to increase visibility",+ href: "/tools/tiktok-hashtag-generator",+ category: "social-media",+ },+ {+ name: "X (Twitter) Hashtag Generator",+ description: "Generate impactful X hashtags to join conversations",+ href: "/tools/x-hashtag-generator",+ category: "social-media",+ },+ {+ name: "LinkedIn Hashtag Generator",+ description: "Generate professional LinkedIn hashtags for networking",+ href: "/tools/linkedin-hashtag-generator",+ category: "social-media",+ },+ {+ name: "Facebook Hashtag Generator",+ description: "Generate effective Facebook hashtags for reach",+ href: "/tools/facebook-hashtag-generator",+ category: "social-media",+ },+ {+ name: "YouTube Hashtag Generator",+ description: "Generate SEO-optimized YouTube hashtags for videos",+ href: "/tools/youtube-hashtag-generator",+ category: "social-media",+ },+ {+ name: "Pinterest Hashtag Generator",+ description: "Generate Pinterest hashtags to improve pin discoverability",+ href: "/tools/pinterest-hashtag-generator",+ category: "social-media",+ },+ {+ name: "Threads Hashtag Generator",+ description: "Generate engaging Threads hashtags for conversations",+ href: "/tools/threads-hashtag-generator",+ category: "social-media",+ },+ {+ name: "Tumblr Tag Generator",+ description: "Generate creative Tumblr tags for community discovery",+ href: "/tools/tumblr-hashtag-generator",+ category: "social-media",+ },];interface RelatedToolsProps {