README.md# Winx[](https://winx.gallop.software)A modern, AI-built blog and publishing template for writers, journalists, and content creators. Keep WordPress as your editor and authoring backend, then ship a blazing-fast headless Next.js front end that publishes at the speed of thought, outshines the competition, and ranks #1 on Google.**π Demo:** [winx.gallop.software](https://winx.gallop.software)**π¨ Template:** [gallop.software/templates](https://gallop.software/templates)**π¦ Repository:** [github.com/gallop-software/winx-pro](https://github.com/gallop-software/winx-pro)**π·οΈ Category:** Headless WordPress Blog Template---## Why Use Gallop Templates?Keep the WordPress editor you already know β but escape the slow themes, plugin sprawl, and clunky front end. Winx goes **headless**: WordPress (or the AI editor) handles authoring, and a modern Next.js front end handles the experience your readers actually see. Just chat with AI inside your code editor, describe the post, layout, or feature you want, and AI writes the code. Build beautiful article layouts, add smooth reading animations, configure your SEO and AI discoverability instantly, expand endlessly, and get prompting tips from our [Gallop community](https://gallop-software.slack.com/). Go live in minutes.[](https://gallop.software/#learn-more)---## Features- π **Next.js 16.2** with App Router- βοΈ **React 19** for cutting-edge performance- π¨ **Tailwind CSS 4.2** for pixel-perfect design- π **Headless WordPress** - Keep WordPress as your authoring backend and serve a fast, decoupled Next.js front end- βοΈ **TSX-powered posts** - Articles authored in WordPress and exported as TSX components for full design control- π **Rich blog archives** - Category, tag, author, and year pages built in- πΊοΈ **Auto-generated sitemaps** for posts, authors, categories, and tags- πΌοΈ **Image processing** with automatic optimization via Sharp- π **Built-in search** powered by FlexSearch with Algolia Autocomplete- π¦ **Lightbox galleries** for post images and media- ποΈ **Swiper carousels** for image galleries and sliders- π¬ **Share counts** powered by Prisma and Vercel KV cache- β€οΈ **Post likes & reactions** with persistent storage- π§ **Newsletter subscribe/unsubscribe** API endpoints- π **Form submission** API for contact and lead capture- π± **Fully responsive** and mobile-optimized for readers- β‘ **Lightning-fast** page loads for long-form content- π **Framer Motion** animations- π― **SEO and AI optimized** with article structured data- π€ **AI-friendly** codebase structure- π‘οΈ **Gallop Canon** - AI guardrails for consistent, reliable code- π¨ **Iconify icons** (Heroicons, Lucide, Material Design, Simple Icons)- π **Vercel Analytics** integration---## Getting StartedNew to this? No problem. You'll have AI guiding you the entire way. Choose your editor below and follow the steps.### Choose Your EditorWe recommend the **Gallop AI Editor** for the best experience with Gallop templates β whether you're a first-time blogger or an advanced Next.js developer who wants AI-assisted writing and development. It was purpose-built for this workflow and requires zero configuration. VS Code is also a fine choice if you prefer to work without AI assistance.| | Gallop AI Editor | VS Code ||---|---|---|| **Best for** | Writers, non-programmers, junior and advanced programmers | Advanced programmers || **AI built in** | Yes β Claude AI ready to go | No (optional extensions available) || **AI setup requirement** | Enter Claude API keys | Install extensions manually || **Template browser** | Built-in marketplace | Download ZIP from GitHub || **Media manager** | Built-in Studio with CDN sync | Manual file management || **Font manager** | Built-in Studio with WOFF2 font generation | No support || **SEO Audit** | Analyze SEO & Structured Data | No support || **Git** | Better Git UI with modal diff viewer | Default Git UI || **Node.js** | Built-in installer and version manager | Install Node.js separately |---### Option A: Gallop AI Editor (Recommended)The Gallop AI Editor is a desktop app built specifically for AI-powered web development for Next.js. It includes everything you need β code editor, AI assistant, Git, terminal, media manager, font manager, SEO & structured data scanner, and a template marketplace β all in one window with nothing to configure.[](https://gallop.software/)Available for Mac and Windows.#### Step 1: Install Gallop AI Editor1. Go to [gallop.software](https://gallop.software/) and download the installer for your platform2. Open the installer and follow the prompts3. Launch the Gallop AI Editor4. If prompted, the editor will walk you through installing Node.js automatically β just follow the on-screen steps#### Step 2: Open This Template**From the built-in template marketplace:**1. Click the **Templates** tab in the sidebar2. Find **Winx** and click **Clone**3. Choose a folder on your computer (like your Desktop)4. The editor will download and set up the project for you**Or from a ZIP download:**1. Click the green **Code** button at the top of this GitHub page, then click **Download ZIP**2. Unzip the folder somewhere easy to find (like your Desktop)3. In the Gallop AI Editor, click **Open Project** and select the unzipped `winx` folder#### Step 3: Start the Dev Server1. Click the **Terminal** tab at the bottom of the editor2. Click **Install** to install dependencies, then click **Start** to run the dev server3. Open [http://localhost:3000](http://localhost:3000) in your browser to see your blog#### Step 4: Chat with AIClick the **AI Chat** panel (or press `Cmd+E` on Mac / `Ctrl+E` on Windows) to open the AI assistant. Now just ask:```I'm new to this. Help me customize this blog for my niche.```The AI assistant can read and edit your project files, run commands, and explain anything you're confused about. Just describe what you want in plain English:```Write a new blog post about sourdough baking and add it to the blog``````Make the accent color a warm terracotta``````Add a new category called Travel``````Optimize the SEO and article structured data on my latest post```**Tip:** Press `Cmd+Ctrl+3` (Mac) to take a screenshot of your running blog and attach it to the chat. The AI can see exactly what you see and suggest changes visually.---### Option B: VS CodeVS Code is a good choice if you prefer to work without AI assistance. You'll need to install a few things manually.[](https://code.visualstudio.com)#### Step 1: Install Prerequisites1. Install [VS Code](https://code.visualstudio.com)2. Install [Node.js](https://nodejs.org) (version 20 or higher)3. Install [Git](https://git-scm.com)#### Step 2: Download This TemplateClick the green **Code** button at the top of this GitHub page, then click **Download ZIP**. Unzip the folder somewhere easy to find (like your Desktop).#### Step 3: Open in VS Code1. Open VS Code2. Click **File β Open Folder**3. Select the unzipped `winx` folder4. Click **Open**#### Step 4: Install and RunOpen the terminal in VS Code (`Ctrl+`` ` on Mac/Windows) and run:```bashnpm installnpm run dev```Open [http://localhost:3000](http://localhost:3000) to see your blog. Press `Ctrl+C` to stop the server.#### Step 5: Start WritingAdd new posts as TSX files in `src/blog/`, then run `npm run blog` to regenerate metadata. Refer to the [Project Structure](#project-structure) and [Available Scripts](#available-scripts) sections below for guidance.---### Join the CommunityConnect with other Gallop users on Slack. Share your progress, swap AI prompting tips, and see how non-programmers are launching blogs that once required a full editorial team.[](https://gallop-software.slack.com/)---## Put Your Blog OnlineWhen you're ready to share your blog with the world, you'll need a free [GitHub](https://github.com) account to store your code and a free [Vercel](https://vercel.com) account to host your site.### The Easy WayJust ask your AI assistant:```Help me create a GitHub account, push this project to GitHub, and deploy to Vercel```The AI will walk you through every step. When you're done, your blog will be live with a URL you can share.### For Technical UsersIf you're comfortable with Git:#### Step 1: Create Your Repository[](https://github.com/gallop-software/winx-pro/generate)#### Step 2: Clone Your RepositoryAsk your AI assistant:```Help me clone my new GitHub repository and run it locally```Or run these commands in your terminal:```bashgit clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.gitcd YOUR-REPO-NAMEnpm installnpm run dev```Open [http://localhost:3000](http://localhost:3000) to view your blog. Press `Ctrl+C` to stop the server. When ready to test production, run `npm run build` then `npm start`.#### Step 3: Deploy to Vercel[](https://vercel.com/new/clone?demo-title=Winx&demo-description=A%20modern%20blog%20and%20publishing%20template%20for%20writers%2C%20journalists%2C%20and%20content%20creators%20who%20want%20to%20launch%20at%20the%20speed%20of%20thought%20with%20AI%2C%20publish%20more%20polished%20posts%20than%20the%20competition%2C%20and%20rank%20%231%20on%20Google.&demo-url=https%3A%2F%2Fwinx.gallop.software&demo-image=https%3A%2F%2Fwinx.gallop.software%2Fimages%2Fscreenshot-md.jpg&from=templates&project-name=winx-pro&repository-name=winx-pro&repository-url=https%3A%2F%2Fgithub.com%2Fgallop-software%2Fwinx-pro)Select your repository, and Vercel will automatically deploy whenever you push changes.Congratulations! Your blog is now live to the world. Share your new URL and start growing your readership. Ready for a custom domain? See [Vercel's domain setup guide](https://vercel.com/docs/projects/domains).### Winx ProWant access to all premium blocks and post layouts? [Purchase Winx Pro](https://gallop.software/code/winx/blocks#pricing) and clone from the Pro repository, which includes all Pro blocks ready to use.---## About Gallop TemplatesWinx is part of the [Gallop](https://gallop.software) template ecosystem. Gallop templates are designed to be built with AI β just describe what you want in plain English and watch your blog come to life.### Gallop AI EditorThe [Gallop AI Editor](https://gallop.software/) is a desktop code editor built specifically for AI-powered web development. It combines a full code editor, Claude AI assistant, visual Git interface, integrated terminal, media manager, and template marketplace into one app. Everything is preconfigured to work with Gallop templates out of the box β no extensions, no plugins, no setup.**Key highlights:**- **Claude AI built in** β Chat with Claude to write posts, debug issues, and learn as you go. Supports Opus 4.6, Sonnet 4.6, and Haiku 4.5 models- **Agent and Plan modes** β Agent mode lets AI apply changes automatically. Plan mode shows you what AI wants to do before it does it, so you stay in control- **Screenshot capture** β Press `Cmd+Ctrl+3` to screenshot your running blog and share it with AI for visual feedback- **Built-in template marketplace** β Browse and clone Gallop templates without leaving the editor- **Visual Git** β Stage, commit, and merge with a 3-column visual interface. No command line required- **Studio media manager** β Manage post images, fonts, and assets with thumbnail previews and CDN sync- **Node.js manager** β Install and switch Node.js versions without touching the terminal- **Auto-updates** β The editor keeps itself up to date automatically### Gallop Canon: AI GuardrailsEvery Gallop template includes `@gallop.software/canon`, a system of ESLint rules and AI instructions that keep your AI assistant on track. Canon ensures:- **Consistent architecture** - AI follows the same patterns across your entire codebase- **No breaking changes** - Guardrails prevent AI from introducing common mistakes- **Faster writing and publishing** - AI already knows the project structure, components, and conventions- **Quality code** - Enforced best practices for performance, SEO, AI discoverability, and maintainabilityThink of Canon as training wheels that never come off. AI stays within proven patterns, so you get reliable results every time.**Canon Commands:**- `npm run check` - Run ESLint and TypeScript checks together- `npm run audit` - Audit the codebase for Canon compliance- `npm run unused` - Detect unused files and exports with Knip### Headless WordPress with Gallop WPAlready invested in WordPress? Keep it. Winx pairs with the free [Gallop WP](https://gallop.software/headless-wordpress) plugin to turn your WordPress site into a headless authoring backend for this Next.js front end β so editors keep the admin they know while readers get a fast, modern, decoupled experience.Gallop WP exposes a purpose-built REST API (`/wp-json/gallop/v1`) shaped for Next.js, so your front end stays simple:- **One request per page** β resolve a front-end URI straight to a post or category and get the post body, SEO block, and site data back in a single round trip, instead of chaining multiple core WordPress REST calls- **Built-in authentication** β cookie-based login, session, and logout endpoints with out-of-the-box brute-force rate limiting, so you can build membership and gated content without wiring up a JWT layer- **UI-driven custom post types** β register REST-enabled custom post types from the WordPress admin with no `register_post_type()` boilerplate- **Yoast SEO integration** β when Yoast is active, canonical URLs, meta descriptions, OpenGraph fields, and robots flags flow straight into the API response- **Optional front-end redirect** β point Gallop at your production Next.js URL and it 301-redirects public WordPress requests to the matching headless path, while leaving the admin, REST API, and previews untouchedPrefer to skip WordPress entirely? You can. Winx also authors posts directly as TSX in `src/blog/` β headless WordPress is an option, not a requirement.### Built for SEO and AI DiscoverabilityThis template was crafted from the ground up to get your articles ranked #1 on Google and cited by AI assistants like ChatGPT and Google's Gemini. The software architecture, semantic HTML structure, article metadata system, and structured data are optimized for both search engine crawlers and AI models that surface content to readers.AI citations are becoming more important than traditional SEO. When someone asks an AI assistant a question, you want your post to be the source it quotes. Gallop templates ship with the Article, BlogPosting, and Author structured data that AI models rely on to understand and surface your writing. Writers using this template are already ranking on Google and getting discovered by AI assistants.### What You Can Build- **Publish with AI** - Let AI draft, edit, and format posts while you provide the ideas and voice- **Skip the boring work** - Let AI help with SEO, image optimization, tags, and tedious metadata updates- **Pixel-perfect article design** - TailwindCSS integration for rapid styling without leaving component files- **Automate workflows** - AI-powered scripts for sitewide SEO improvements, search indexing, RSS feeds, and image regeneration- **Get found online** - Battle-tested foundation with article structured data for search engines and AI assistants- **Deploy instantly** - Next.js architecture on Vercel for cheap, fast hosting### Built by Industry VeteransThe [team](https://webplant.media) behind Gallop has decades of combined experience building websites, apps, and web applications for top global brands. We've helped publishers achieve #1 Google rankings in competitive markets and understand what it takes to build world class editorial sites. That expertise is baked into every template, every component, and every line of code.---## Project Structure```winx/βββ src/β βββ app/ # Next.js App Routerβ β βββ (default)/ # Default layout route groupβ β β βββ layout.tsxβ β β βββ page.tsx # Blog home / latest postsβ β β βββ _blocks/ # Home page blocksβ β β βββ [year]/ # Yearly archive pagesβ β β βββ author/ # Author archive pagesβ β β β βββ [slug]/β β β βββ category/ # Category archive pagesβ β β β βββ [slug]/β β β βββ tag/ # Tag archive pagesβ β β β βββ [slug]/β β β βββ search/ # Search results pageβ β β βββ contact/β β β βββ .../ # Other routes with _blocks/β β βββ api/ # API routes (likes, share counts, etc.)β β βββ global-error.tsx # Error boundaryβ β βββ global-not-found.tsx # 404 pageβ β βββ layout.tsx # Root layoutβ β βββ metadata.tsx # Site metadataβ β βββ robots.ts # Robots.txt configβ β βββ *-sitemap.xml # Generated sitemaps (post, author, category, tag)β β βββ BLOCKS.md # Auto-generated blocks catalogβ β βββ LAYOUTS.md # Auto-generated layouts catalogβ β βββ *.png, *.ico # App icons and faviconβ βββ blog/ # Blog post content (TSX files)β βββ components/ # React componentsβ β βββ blog/ # Blog post componentsβ β βββ footer/ # Footer config and componentsβ β βββ form/ # Form componentsβ β βββ lightbox/ # Lightbox gallery for post imagesβ β βββ search/ # Search componentsβ β βββ sidebar-stack/ # Sidebar panel stackβ β βββ navigation.tsx # Main navigationβ β βββ page-wrapper.tsx # Page wrapper with structured dataβ β βββ button.tsxβ β βββ card-testimonial.tsxβ β βββ gallery.tsxβ β βββ heading.tsxβ β βββ image.tsxβ β βββ section.tsxβ β βββ ...β βββ fonts/ # Font configuration filesβ βββ hooks/ # Custom React hooksβ βββ styles/ # Global stylesβ β βββ tailwind.css # Tailwind CSS entryβ βββ tools/ # Utility toolsβ βββ utils/ # Helper functionsβ βββ state.ts # Global state managementβββ prisma/ # Prisma schema (share counts, etc.)βββ public/β βββ favicon.png # Faviconβ βββ images/ # Processed imagesβ βββ screenshot.jpg # Featured imageβ βββ search-index.json # FlexSearch indexβββ _fonts/ # Font source files (managed by Studio)βββ _data/ # Generated metadataβ βββ _blog.json # Blog post metadataβ βββ _studio.json # Studio/image metadataβββ _scripts/ # Build scriptsβ βββ generate-blog-metadata.mjsβ βββ generate-search.mjsβ βββ ...βββ next.config.mjs # Next.js configurationβββ tsconfig.json # TypeScript configβββ postcss.config.js # PostCSS configβββ package.json # Dependencies & scriptsβββ knip.config.js # Unused file detection configβββ eslint.config.mjs # ESLint configβββ .prettierrc # Prettier config```---## Available Scripts### Development- **`npm run dev`** - Start development server at http://localhost:3000- **`npm run build`** - Build for production (runs blog metadata first)- **`npm run start`** - Start production server- **`npm run lint`** - Run ESLint on all source files- **`npm run lint:file`** - Run ESLint on a specific file- **`npm run lint:gallop`** - Run Gallop Canon lint rules on blocks- **`npm run ts`** - TypeScript type checking without emitting- **`npm run prettier`** - Format all files with Prettier- **`npm run check`** - Run lint and TypeScript checks### Gallop Canon- **`npm run audit`** - Audit codebase with Gallop Canon- **`npm run audit:strict`** - Strict audit mode- **`npm run audit:json`** - Output audit results as JSON### Content & Assets- **`npm run blog`** - Generate blog post metadata to `_data/_blog.json` β [docs](./_scripts/generate-blog-metadata.md)- **`npm run search`** - Build FlexSearch index for site search β [docs](./_scripts/generate-search.md)- **`npm run bust:kv`** - Bust the KV cache for likes and share counts- **`npm run blocks`** - Generate blocks catalog (`src/app/BLOCKS.md`)- **`npm run blocks:screenshots`** - Force regenerate all block screenshots- **`npm run blocks:sort`** - Sort the blocks catalog- **`npm run layouts`** - Generate layouts catalog (`src/app/LAYOUTS.md`)- **`npm run layouts:screenshots`** - Force regenerate all layout screenshots- **`npm run layouts:sort`** - Sort the layouts catalog### Environment- **`npm run env`** - Push `.env.production` to Vercel β [docs](./_scripts/push-env-to-vercel.md)- **`npm run env:prod`** - Push to production environment- **`npm run env:prev`** - Push to preview environment### Package Management- **`npm run update:check`** - Check for package updates- **`npm run update:patch`** - Update to latest patch versions- **`npm run update:minor`** - Update to latest minor versions- **`npm run update:major`** - Update to latest major versions- **`npm run update:interactive`** - Interactively choose updates- **`npm run update:doctor`** - Update and test changes incrementally### Database- **`npm run db:generate`** - Regenerate the Prisma client- **`npm run db:migrate`** - Run Prisma migrations in development### Maintenance- **`npm run unused`** - Find unused files and exports with Knip- **`npm run refresh`** - Remove node_modules and .next, then reinstall- **`npm run clean`** - Remove node_modules, .next, and package-lock.json, then reinstall---## Technologies### Frontend (Runtime)Every dependency is battle-tested in production and chosen for stability, performance, and long-term maintainability.- **Next.js** `16.2.4` - React framework with App Router- **React** `19.2.5` - UI library- **Tailwind CSS** `4.2.2` - Utility-first CSS framework- **Headless UI** `2.2.10` - Unstyled accessible components- **Prisma** `7.2.0` - Database ORM for share counts and dynamic data- **Vercel KV** `3.0.0` - Edge cache for likes and share counts- **Valtio** `2.3.1` - State management- **Swiper** `12.1.4` - Modern slider/carousel for post galleries- **Yet Another React Lightbox** `3.31.0` - Image gallery for post media- **FlexSearch** `0.8.212` - Full-text post search- **Algolia Autocomplete** `1.19.8` - Search autocomplete- **Framer Motion** `12.38.0` - Animation library- **Luxon** `3.7.2` - DateTime library for post dates- **React Intersection Observer** `10.0.3` - Scroll-based animations and lazy loading- **React Highlight Words** `0.21.0` - Search result highlighting- **html-react-parser** `6.0.1` - HTML-to-React parsing for rich content- **Iconify Icons** - Icon sets (Heroicons, Lucide, Material Design, Simple Icons)- **clsx** `2.1.1` - Conditional className utility- **Vercel Analytics** `1.6.1` - Analytics integration- **Next Third Parties** `16.2.4` - Third-party script optimization### DevelopmentTools for building and developing the blog:- **TypeScript** `5` - Type safety and IntelliSense- **ESLint** `9` - Code linting- **Prettier** `3.8.1` - Code formatting- **Prettier Plugin Organize Imports** `4.3.0` - Auto-organize imports- **Prettier Plugin Tailwindcss** `0.7.2` - Sort Tailwind classes- **PostCSS** `8.5.8` - CSS transformations- **Gallop Canon** - ESLint rules and AI rules generator### Scripts & ProcessingBuild-time tools for content and asset generation:- **Sharp** `0.34.5` - Image processing and optimization for post images- **Puppeteer** `24.40.0` - Screenshot generation (featured images)- **jsdom** `27.4.0` - DOM parsing for search index generation- **@sindresorhus/slugify** `3.0.0` - URL-friendly slugs for posts, tags, and authors---## Support & Community- **Documentation:** [gallop.software](https://gallop.software)- **Issues:** [GitHub Issues](https://github.com/gallop-software/winx-pro/issues)- **Slack:** [Join Community](https://join.slack.com/t/gallop-software/shared_invite/zt-358q3rdrp-H6kKvKzpR2qgB5xJviAOcw)- **Professional Services:** [Web Plant Media, LLC](https://webplant.media)---## LicenseMIT License - see [LICENSE](./LICENSE) for details---## Credits**Contributors:**- [Chris Baldelomar](https://github.com/webplantmedia)- [Niel Wostan](https://github.com/NielWostan)- [Rabpreet Singh](https://github.com/Rabpreet1233)Built with β€οΈ by the team at [Gallop](https://gallop.software)---## Learn More- [Gallop AI Editor](https://gallop.software/)- [Gallop Templates](https://gallop.software/templates)- [Next.js Documentation](https://nextjs.org/docs)- [Tailwind CSS Documentation](https://tailwindcss.com/docs)- [React Documentation](https://react.dev)