SEO Generator is a Next.js-based application designed to create and preview SEO metadata with real-time platform previews and copy-ready HTML meta tag generation.
The tool enables developers and content creators to:
- Input and validate SEO metadata (title, description, URL, images)
- Preview content across major platforms (Google, Twitter/X, Facebook, Slack, LinkedIn, Pinterest)
- Generate production-ready HTML meta tags including Open Graph and Twitter Card markup
- Upload and manage SEO images with drag-and-drop support
- Maintain real-time synchronization between form inputs and platform previews
SEO Generator provides an end-to-end workflow for SEO optimization:
- Metadata Input β Define titles, descriptions, URLs, and images.
- Live Previews β Instantly see how content appears on multiple platforms.
- Meta Tag Generation β Produce HTML tags ready for production use.
- Image Management β Upload, validate, and preview SEO images.
The application follows a hub-and-spoke architecture:
SeoFormserves as the central data input system.- Shared state management (via Zustand) propagates input data to:
- Preview components (Google, Twitter, etc.)
- Meta tag generation module.
SEO Generator uses Zustand for centralized state management.
Flow:
- User inputs SEO data in
SeoForm. - State updates propagate reactively to preview components.
- Meta tag generation consumes the same state to produce HTML tags.
- SeoForm β Collects and validates user input.
- Preview Components β Render platform-specific previews in real time.
- GenerateTagsModal β Generates copyable HTML meta tags.
- CopyButton β Provides one-click copy functionality.
| Category | Technology | Purpose | Key Files |
|---|---|---|---|
| Framework | Next.js 15.5.2 | React framework with SSR support | app/page.tsx, app/layout.tsx |
| State Management | Zustand 5.0.8 | Lightweight global store | store/use-seo-form-store.ts |
| Form Handling | React Hook Form 7.62.0 | Form state & validation | app/_components/seo-form/index.tsx |
| Schema Validation | Zod 4.1.5 | Type-safe schema validation | app/_components/seo-form/index.tsx |
| UI Components | Radix UI | Accessible UI primitives | components/ui/dialog.tsx |
| Styling | Tailwind CSS 4 | Utility-first CSS framework | app/globals.css |
| File Upload | Custom Hook | Drag-and-drop image handling | hooks/use-file-upload.ts |
| Icons | Lucide React | Icon library | Preview components |
| Code Highlighting | Shiki | Syntax highlighting | lib/highlight-code.ts |
The project follows the Next.js 13+ app directory structure, ensuring modular and maintainable organization:
app/
βββ \_components/
β βββ seo-form/
β βββ preview/
β βββ generate-tags/
β βββ ...
βββ layout.tsx
βββ page.tsx
βββ globals.css
store/
βββ use-seo-form-store.ts
βββ use-meta-tags-store.ts
βββ use-settings-store.ts
hooks/
βββ use-file-upload.ts
components/
βββ ui/
βββ copy-button.tsx
lib/
βββ highlight-code.tsSEO Generator uses three primary Zustand stores:
| Store | Purpose | Key State | Consumers |
|---|---|---|---|
useSeoFormStore |
Core SEO data management | title, description, url, imageFile |
SeoForm, Previews, GenerateTagsModal |
useMetaTagsStore |
Stores generated HTML tag code | code |
GenerateTagsModal, CopyButton |
useSettingsStore |
Validation and configuration settings | titleMaxLength, descriptionMaxLength |
SeoForm |
State Flow Pattern:
- Input updates β
useSeoFormStore - Previews render β Consume
useSeoFormStore - Meta tags generated β Written to
useMetaTagsStore - Validation rules β Provided by
useSettingsStore
The preview system provides real-time representations of how SEO content appears across platforms.
Pattern:
- Import platform-specific icons
- Consume SEO data from
useSeoFormStore - Render platform-specific HTML structure
- Handle fallbacks (e.g.,
/placeholder.jpg)
Preview Components:
google-preview.tsxtwitter-preview.tsxfacebook-preview.tsxslack-preview.tsxlinkedin-preview.tsxpinterest-preview.tsx
app/page.tsxapp/_components/seo-form/index.tsxapp/_components/preview/*app/_components/generate-tags/*store/use-seo-form-store.tsstore/use-meta-tags-store.tshooks/use-file-upload.tslib/highlight-code.ts
This document provides a technical overview of the SEO Generator architecture, data flow, and component relationships.
For implementation details, refer to:
- [SEO Form Input System]
- [Platform Preview System]
- [Meta Tag Generation]
- [Architecture & Implementation]
