All projects

PayloadCMS Template

The second generation of my own Next.js and Payload CMS starter template. It provides a foundation for new projects and an AI assistant for writing, translating, rephrasing and generating content blocks on demand.

Payload CMS Template Hero

Who it is for

Developers starting new web projects and editorial teams working with content in Payload CMS.

Results & impact

  • The template has been reused as the foundation for client projects.

  • An integrated AI assistant provides tools for creating and editing content within the solution.

A personal tool reused in client work

This template is the second iteration of my own foundation for web projects. Its purpose is to provide shared functionality that can be adapted to the next project’s requirements. The existing material confirms reuse across multiple client projects.

The challenge

Create a reusable foundation for new projects and extend the editorial environment with tools for creating and editing content.

The solution

The template combines Next.js 16, Payload CMS 3, TypeScript and PostgreSQL. Its integrated AI assistant supports writing, translation, rephrasing and on-demand content block generation.

AI within content management

The AI extension covers writing, translation, rephrasing and on-demand block generation. The project connects developer infrastructure with editorial tools. The stack also lists Playwright and Vitest; without test results, I make no coverage or quality guarantees.

My contribution

Developing the second generation of my own Next.js and Payload CMS starter template.

Extending the template with an integrated AI content assistant.

Reusing the template as the foundation for client projects.

A consistent contract for content operations

The example uses distinct types for assistant requests. Each operation carries the information it needs. Actual model integration, input validation and content persistence are not implemented here.

Illustrative example — this is not production code from the project. Replace it with your own excerpt before final publication.

illustrative-content-task.ts
type ContentTask =
  | { action: "compose"; brief: string }
  | { action: "translate"; text: string; locale: "sk" | "en" }
  | { action: "rephrase"; text: string }
  | { action: "generate-block"; brief: string; blockType: string };

function taskSource(task: ContentTask): string {
  switch (task.action) {
    case "compose":
    case "generate-block":
      return task.brief;
    case "translate":
    case "rephrase":
      return task.text;
  }
}