{"title":"Fun Fact: I Built the Custom CMS Powering This Website","slug":"i-built-the-custom-cms-powering-this-website","type":"post","excerpt":"Pugmill is an open source CMS I built on Next.js 15, PostgreSQL, and TypeScript, with native answer engine optimization and an MCP server plugin.","content":"## Fun fact\r\n\r\nThis website runs on a CMS I built from scratch. It's called Pugmill, and it's open source. You can [grab the code on Github](https://github.com/pugmillcms/pugmill).\r\n\r\n## What it is\r\n\r\nPugmill is a headless-ready CMS built on Next.js 15, PostgreSQL, Drizzle ORM, and TypeScript. It ships with a native theme system, a plugin architecture, Markdown-first editing, and built-in answer engine optimization.\r\n\r\nPlugins extend the core without forking it: an MCP server, outbound webhooks, and AI-powered content generation when a provider is connected.\r\n\r\n## Why I built it\r\n\r\nI wanted a modern stack CMS without the weight of WordPress or the rigidity of typical headless platforms. Pugmill assumes a workflow pairing one human with one AI agent, tested against Claude Code and similar environments. The human sets direction; the agent handles context and execution.\r\n\r\nFeatures work without an AI provider configured. Connecting one adds generation and automation on top.\r\n\r\n## Native AEO\r\n\r\nAnswer engine optimization is built into the core, not bolted on through plugins or third-party services. Pugmill ships with:\r\n\r\n- An auto-generated `llms.txt` file that exposes site structure to AI crawlers\r\n- Per-post Q&A metadata for direct question answering\r\n- Bot analytics that separate AI crawler traffic from human and search engine visits\r\n- Structured data output for posts, pages, and authors\r\n- Canonical URLs and sitemap generation aligned with AEO conventions\r\n\r\nThe goal is to make content legible to language models without extra configuration.\r\n\r\n## Integration features\r\n\r\n- **MCP server plugin:** Exposes content operations over the Model Context Protocol, letting agents read, create, and update posts through a typed interface.\r\n- **Outbound webhooks:** Fire on content events (publish, update, delete) with HMAC-signed payloads. Useful for triggering builds, syncing to other systems, or notifying downstream services.\r\n- **API key management:** Per-key scopes, expiration dates, and revocation. Keys are hashed at rest and shown once at creation.\r\n\r\n## Stack highlights\r\n\r\n- Next.js 15, TypeScript 5, React server components\r\n- PostgreSQL 16 with Drizzle ORM\r\n- NextAuth v5 (credentials and OAuth)\r\n- Tailwind CSS 3, Tiptap 3 editor\r\n- S3-compatible storage abstraction\r\n- Public REST API with CORS and pagination\r\n- Revision snapshots on every save\r\n- Pre-commit secret scanning\r\n\r\nThe site you're reading is the proof. Every post, page, and pixel runs through code I created.","publishedAt":"2026-05-11T15:03:00.000Z","updatedAt":"2026-05-11T15:05:21.531Z","author":{"name":"Michael Janzen"},"categories":[{"name":"Web Development","slug":"web-development"}],"tags":[{"name":"ai-native","slug":"ai-native"},{"name":"system-architecture","slug":"system-architecture"},{"name":"open-source","slug":"open-source"},{"name":"cms","slug":"cms"}],"featuredImageUrl":"https://xqbrqyp8c9smsddf.public.blob.vercel-storage.com/uploads/1776716238390-the-tower-bridge.jpg","aeo":{"summary":"Pugmill is an open-source headless-ready CMS built on Next.js 15, PostgreSQL, Drizzle ORM, and TypeScript, designed for a workflow pairing one human with one AI agent. It features native answer engine optimization, a plugin architecture including an MCP server and outbound webhooks, and Markdown-first editing. It targets developers who want a modern-stack alternative to WordPress or rigid headless platforms.","questions":[{"q":"What is Pugmill CMS?","a":"Pugmill is an open-source headless-ready CMS built on Next.js 15, PostgreSQL, Drizzle ORM, and TypeScript, with a native theme system, plugin architecture, Markdown-first editing, and built-in answer engine optimization."},{"q":"How does Pugmill handle answer engine optimization?","a":"Pugmill builds AEO into the core with an auto-generated llms.txt file, per-post Q&A metadata, bot analytics that separate AI crawler traffic, structured data output for posts, pages, and authors, and canonical URLs with sitemap generation aligned with AEO conventions."},{"q":"Does Pugmill require an AI provider to work?","a":"No, all features work without an AI provider configured; connecting one adds AI-powered content generation and automation on top of the existing functionality."},{"q":"What integrations does Pugmill support?","a":"Pugmill supports an MCP server plugin that exposes content operations over the Model Context Protocol, outbound webhooks with HMAC-signed payloads that fire on content events, and per-key scoped API key management with expiration and revocation."},{"q":"What technology stack does Pugmill use?","a":"Pugmill uses Next.js 15, TypeScript 5, React server components, PostgreSQL 16 with Drizzle ORM, NextAuth v5, Tailwind CSS 3, Tiptap 3 editor, and an S3-compatible storage abstraction."}],"entities":[{"type":"SoftwareApplication","name":"Pugmill","description":"An open-source headless-ready CMS built on Next.js, PostgreSQL, Drizzle ORM, and TypeScript with native AEO support."},{"type":"SoftwareApplication","name":"Next.js","description":"React-based web framework used as the foundation for Pugmill.","sameAs":"https://en.wikipedia.org/wiki/Next.js"},{"type":"SoftwareApplication","name":"PostgreSQL","description":"Open-source relational database used by Pugmill.","sameAs":"https://en.wikipedia.org/wiki/PostgreSQL"},{"type":"SoftwareApplication","name":"Drizzle ORM","description":"TypeScript ORM used by Pugmill for database access."},{"type":"SoftwareApplication","name":"TypeScript","description":"Typed superset of JavaScript used throughout Pugmill.","sameAs":"https://en.wikipedia.org/wiki/TypeScript"},{"type":"SoftwareApplication","name":"Claude Code","description":"AI coding agent environment Pugmill is tested against."},{"type":"CreativeWork","name":"Model Context Protocol","description":"Protocol used by Pugmill's MCP server plugin to expose content operations to AI agents."},{"type":"SoftwareApplication","name":"Tiptap","description":"Rich-text editor framework used in Pugmill."},{"type":"SoftwareApplication","name":"NextAuth","description":"Authentication library used by Pugmill for credentials and OAuth."},{"type":"SoftwareApplication","name":"Tailwind CSS","description":"Utility-first CSS framework used in Pugmill.","sameAs":"https://en.wikipedia.org/wiki/Tailwind_CSS"}],"keywords":["Pugmill CMS","headless CMS Next.js 15","custom CMS development","answer engine optimization","MCP server plugin","Drizzle ORM PostgreSQL","llms.txt","AI crawler analytics","TypeScript headless CMS","outbound webhooks HMAC"]},"site":{"name":"Janzen Works","url":"https://janzenworks.com/"},"_links":{"canonical":"https://janzenworks.com//post/i-built-the-custom-cms-powering-this-website","markdown":"https://janzenworks.com//post/i-built-the-custom-cms-powering-this-website/llm.txt","json":"https://janzenworks.com//post/i-built-the-custom-cms-powering-this-website/data.json"}}