# Fun Fact: I Built the Custom CMS Powering This Website

**Published:** 2026-05-11  
**Author:** Michael Janzen  
**Categories:** Web Development  
**Tags:** ai-native, system-architecture, open-source, cms  
**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

---

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.

---

> 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.

---

## Fun fact

This 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).

## What it is

Pugmill 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.

Plugins extend the core without forking it: an MCP server, outbound webhooks, and AI-powered content generation when a provider is connected.

## Why I built it

I 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.

Features work without an AI provider configured. Connecting one adds generation and automation on top.

## Native AEO

Answer engine optimization is built into the core, not bolted on through plugins or third-party services. Pugmill ships with:

- An auto-generated `llms.txt` file that exposes site structure to AI crawlers
- Per-post Q&A metadata for direct question answering
- Bot analytics that separate AI crawler traffic from human and search engine visits
- Structured data output for posts, pages, and authors
- Canonical URLs and sitemap generation aligned with AEO conventions

The goal is to make content legible to language models without extra configuration.

## Integration features

- **MCP server plugin:** Exposes content operations over the Model Context Protocol, letting agents read, create, and update posts through a typed interface.
- **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.
- **API key management:** Per-key scopes, expiration dates, and revocation. Keys are hashed at rest and shown once at creation.

## Stack highlights

- Next.js 15, TypeScript 5, React server components
- PostgreSQL 16 with Drizzle ORM
- NextAuth v5 (credentials and OAuth)
- Tailwind CSS 3, Tiptap 3 editor
- S3-compatible storage abstraction
- Public REST API with CORS and pagination
- Revision snapshots on every save
- Pre-commit secret scanning

The site you're reading is the proof. Every post, page, and pixel runs through code I created.

---

## Frequently Asked 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.

---

## Citations

- [grab the code on Github](https://github.com/pugmillcms/pugmill)

---

## Key Entities

- **Pugmill** (SoftwareApplication) — An open-source headless-ready CMS built on Next.js, PostgreSQL, Drizzle ORM, and TypeScript with native AEO support.
- **Next.js** (SoftwareApplication) — React-based web framework used as the foundation for Pugmill. <https://en.wikipedia.org/wiki/Next.js>
- **PostgreSQL** (SoftwareApplication) — Open-source relational database used by Pugmill. <https://en.wikipedia.org/wiki/PostgreSQL>
- **Drizzle ORM** (SoftwareApplication) — TypeScript ORM used by Pugmill for database access.
- **TypeScript** (SoftwareApplication) — Typed superset of JavaScript used throughout Pugmill. <https://en.wikipedia.org/wiki/TypeScript>
- **Claude Code** (SoftwareApplication) — AI coding agent environment Pugmill is tested against.
- **Model Context Protocol** (CreativeWork) — Protocol used by Pugmill's MCP server plugin to expose content operations to AI agents.
- **Tiptap** (SoftwareApplication) — Rich-text editor framework used in Pugmill.
- **NextAuth** (SoftwareApplication) — Authentication library used by Pugmill for credentials and OAuth.
- **Tailwind CSS** (SoftwareApplication) — Utility-first CSS framework used in Pugmill. <https://en.wikipedia.org/wiki/Tailwind_CSS>
