本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)8.1k · #12574

webiny-admin-architect

できること

このスキルは、Webinyの管理画面の機能を作るとき、AIを導きます。Webinyプラットフォームの拡張を書く開発者向けです。

使う場面

  • ✓ビジネスロジックと画面を含む、Webinyの管理パネルの機能を作っているとき。
  • ✓管理画面のコードを、機能、プレゼンター、コンポーネントに整理する必要があるとき。
  • ✓Webinyの拡張の機能を登録したり、管理画面のビルドパラメーターを設定したりしているとき。

スキルのリンク

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/admin-architect/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/admin-architect/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Webinyで注文の一覧を表示する新しい管理ページを作ってください。プラットフォームの機能とプレゼンターのパターンに従ってください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、層になった構造を説明します。ビジネスロジックはヘッドレスな機能の中に置き、画面はプレゼンターとフックを使います。また、各機能はインターフェースがそれを使えるよう、resolve関数を公開します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Admin Architecture Patterns

TL;DR

Admin extensions are React components that register headless features (business logic with no UI) and presentation features (MobX presenters, React hooks, components). Headless features live in admin/features/ and follow UseCase → Repository → Gateway layering. Presentation features live in admin/presentation/ and add a Presenter (MobX view model) layer on top. Both use createFeature and createAbstraction from webiny/admin.

All features — both headless and presentation — MUST provide a resolve function in createFeature. This is how the useFeature hook accesses resolved instances from the DI container. Without resolve, the feature cannot be consumed from React.

Working Context

This skill applies to both extension developers (working in extensions/) and core developers (working in packages/). The architecture patterns are identical — only imports differ.

Extensions (extensions/) Core (packages/)
Imports webiny/admin, webiny/admin/ui, webiny/admin/cms/entry/editor @webiny/app, @webiny/admin-ui, @webiny/app-headless-cms/...
Catalog paths Use the Import: path Use the Source: path
MobX wrapper createReactiveComponent from webiny/admin createReactiveComponent from @webiny/app-admin (never import observer from mobx-react-lite directly — the only exception is @webiny/app-admin itself, which is the source of the re-export)
Entry point React component as export default in a file targeted by <Admin.Extension src={...}> React component registered by the package initializer

Detect which context you're in by checking the file path: extensions/ → extension mode, packages/ → core mode.

Admin Directory Structure

admin/
├── Extension.tsx         # Admin entry point (React component)
├── features/             # Headless features (business logic, no UI)
│   └── EnableThing/
│       ├── abstractions.ts
│       ├── EnableThingUseCase.ts
│       ├── EnableThingRepository.ts
│       ├── EnableThingGateway.ts
│       └── feature.ts
└── presentation/         # Presentation layer (hooks, components, presenters)
    └── CurrentThing/
        ├── abstractions.ts   # Presenter + ViewModel interfaces
        ├── CurrentThingPresenter.ts    # MobX-based view model
        ├── useCurrentThing.ts          # React hook for consumers
        ├── feature.ts                  # createFeature registration
        └── components/                 # React UI components

Admin Extension Entry Point

The Admin entry point is a React component that registers features, providers, UI decorators, and config:

// src/admin/Extension.tsx
import React from "react";
import { AdminConfig, RegisterFeature } from "webiny/admin";
import { CurrentThingFeature } from "./presentation/CurrentThing/feature.js";
import { EnableThingFeature } from "./features/EnableThing/index.js";
import { CurrentThingProvider } from "./presentation/CurrentThing/CurrentThingProvider.js";
import { ThingListView } from "./presentation/ThingListView/ThingListView.js";

export const Extension = () => {
  return (
    <>
      {/* Register headless features (use cases, repositories, gateways) */}
      <RegisterFeature feature={EnableThingFeature} />

      
よくある質問

すべての機能にresolve関数が必要ですか?

はい。スキルは、インターフェースがそれらにアクセスできるように、すべての機能が提供すべきだとしています。

ヘッドレスな機能とプレゼンテーションの機能の違いは何ですか?

ヘッドレスな機能はインターフェースなしでビジネスロジックを持ち、プレゼンテーションの機能はプレゼンター、フック、コンポーネントを加えます。

外部の拡張にも当てはまりますか?

はい。パターンは拡張の開発者もコアの開発者も同じで、インポートだけが異なります。

詳細

作者による元の説明

Admin-side architecture patterns for Webiny extensions. Use this skill when building frontend features with headless features (UseCase/Repository/Gateway), presentation features (Presenter/ViewModel/hooks/components), MobX-based presenters, RegisterFeature, and Admin BuildParams. Covers the admin/ directory structure for both features/ and presentation/ layers.

repo: webiny/webiny-js

人気

GitHubのスター
8.1k
ランキング
#12574
ライセンス
—
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル