umbraco-repository-pattern

Implement Umbraco backoffice repositories with generated OpenAPI clients for CRUD operations.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill umbraco-repository-pattern-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: umbraco-repository-pattern
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/umbraco-repository-pattern
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill umbraco-repository-pattern-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Umbraco backoffice custom data operations can become tightly coupled to data access details, making them harder to maintain, test, and evolve.

Core Features & Use Cases

  • Repository as a Backoffice Entry Point: Centralize CRUD-like operations behind a stable API so UI/contexts don’t depend on where data comes from.
  • Separation of Concerns: Split what the backoffice does (repository) from how it does it (data source) and how it caches state (store).
  • Safe API Authentication: Prevent 401 Unauthorized errors by using the generated OpenAPI client (not raw fetch) with Umbraco auth context.
  • Seamless Integration Scenarios: Implement repository + context flows for loading lists, creating entities, deleting entities, and working with tree-structured data.

Quick Start

Ask an AI agent to implement an Umbraco backoffice repository and its data source using the generated OpenAPI client, then wire it into a context so the UI can load and update items reliably.

Frequently Asked Questions about umbraco-repository-pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement the repository pattern in the Umbraco backoffice?

To implement the repository pattern in the Umbraco backoffice, use Umb controller and context base classes to abstract data access. Register the repository in the umbExtensionsRegistry to enable consistent CRUD operations and separate what the backoffice does from how it fetches data.

Why am I getting 401 Unauthorized errors during Umbraco backoffice data access?

You get 401 Unauthorized errors during Umbraco backoffice data access when using raw fetch instead of the generated OpenAPI client. You must use the OpenAPI client integrated with the Umbraco auth context to ensure safe API authentication for your repository.

What is the best way to structure Umbraco backoffice extensions for list and tree data?

The best way to structure Umbraco backoffice extensions for list and tree data is building repository, view-model, and context flows. This separates data retrieval from state caching, supporting list, single-item, create/update/delete, and tree repository scenarios reliably.

Do I need TypeScript to build Umbraco backoffice repositories?

Yes, you need TypeScript to build Umbraco backoffice repositories effectively. TypeScript enables you to define strongly typed data sources, stores, and repository contracts that wire cleanly into Umb controller base classes and the umbExtensionsRegistry.

How does an Umbraco repository interact with a data source and store?

An Umbraco repository interacts with a data source and store by acting as a stable entry point for the UI. The repository delegates data fetching to the data source via the OpenAPI client and manages cached state through the store, ensuring clean separation of concerns.