Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .local/img.png
Binary file not shown.
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
```
docs/developer-docs/6.0.x/
├── admin/ # Admin area customization (whitelabeling)
├── webiny-api/ # API customization (custom domain, extend GraphQL schema, universal API keys)
├── cli/ # CLI commands reference (deploy, destroy, watch, etc.)
├── core-concepts/ # Foundational knowledge: architecture, applications, project structure, DI, Result pattern, multi-tenancy, local dev, env vars
├── get-started/ # Welcome, installation, upgrade to Business
Expand All @@ -49,7 +50,7 @@ docs/developer-docs/6.0.x/
├── reference/ # Auto-generated API reference (extensions, admin, API)
├── tasks/ # Background task system (about, reference, management)
├── tenant-manager/ # Multi-tenancy management (GraphQL API, model extension)
└── website-builder/ # Website Builder extensibility (Next.js setup, theming, custom components)
└── website-builder/ # Website Builder extensibility (Next.js setup, multi-tenant setup, theming, custom components)
```

### Key Patterns
Expand Down Expand Up @@ -151,7 +152,7 @@ import type { CmsEntry } from "webiny/api";
- **Bold** for key labels: `**Naming Convention:**`, `**Key Point:**`
- Bullet lists use `-`, not numbered lists (even for sequential steps)
- No emojis in prose
- Inline links use standard markdown: `[text](/docs/path)`
- Inline links use standard markdown: `[text](/{version}/path)`
- "Webiny" always capitalized

## Tone and Voice
Expand Down
53 changes: 45 additions & 8 deletions docs/developer-docs/6.x/headless-cms/content-models-via-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Alert } from "@/components/Alert";
- Why define content models via code?
- How to create a content model using the [`ModelFactory`](/{version}/reference/api/cms/model#model-factory) API?
- How to define reference fields and object fields?
- How to create single-entry and private models?
- How to register models as extensions?

</Alert>
Expand Down Expand Up @@ -98,14 +99,15 @@ export const Extensions = () => {

**Model configuration**

| Method | Description |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `.public({ modelId, name, group })` | Model is visible in the Admin sidebar and exposed via the Read, Preview, and Manage GraphQL endpoints |
| `.private({ modelId, name, group })` | Model is not visible in the Admin sidebar and not exposed via the public GraphQL endpoints; useful for internal or system-level models |
| `.description()` | Model description shown in the Admin |
| `.singularApiName()` / `.pluralApiName()` | GraphQL query names |
| `.layout()` | Defines how fields are arranged in rows in the Admin UI (`[["field1", "field2"], ["field3"]]`) |
| `.titleFieldId()` | Which field to use as the entry title in list views |
| Method | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `.public({ modelId, name, group })` | Model is visible in the Admin sidebar and exposed via the Read, Preview, and Manage GraphQL endpoints |
| `.private({ modelId, name, group })` | Model is not visible in the Admin sidebar and not exposed via the public GraphQL endpoints; access data via use cases in backend code |
| `.singleEntry()` | Only one entry of this model can exist; the Admin shows the entry form directly instead of a list view |
| `.description()` | Model description shown in the Admin |
| `.singularApiName()` / `.pluralApiName()` | GraphQL query names |
| `.layout()` | Defines how fields are arranged in rows in the Admin UI (`[["field1", "field2"], ["field3"]]`) |
| `.titleFieldId()` | Which field to use as the entry title in list views |

**Field types**

Expand Down Expand Up @@ -236,6 +238,41 @@ All renderer names are available via TypeScript autocomplete when calling `.rend
| Special | `dynamicZone`, `hidden`, `passthrough` |
| UI elements | `uiSeparator`, `uiAlert`, `uiTabs` |

## Single-Entry Models

A single-entry model allows only one entry to exist. Call `.singleEntry()` on the builder to enable this mode. It is useful for global site settings, per-tenant configuration, or any data that should have exactly one record.

```typescript extensions/siteSettingsModel.ts
import { ModelFactory } from "webiny/api/cms/model";

class SiteSettingsModelImpl implements ModelFactory.Interface {
async execute(builder: ModelFactory.Builder) {
return [
builder
.public({
modelId: "siteSettings",
name: "Site Settings",
group: "ungrouped"
})
.singleEntry()
.fields(fields => ({
googleAnalyticsId: fields.text().renderer("textInput").label("Google Analytics ID"),
facebookPixelId: fields.text().renderer("textInput").label("Facebook Pixel ID")
}))
.singularApiName("SiteSetting")
.pluralApiName("SiteSettings")
];
}
}

export default ModelFactory.createImplementation({
implementation: SiteSettingsModelImpl,
dependencies: []
});
```

The entry is available on both the Manage and Read GraphQL endpoints. The Admin shows the entry form directly — there is no list view.

## Deploying Changes

After creating or modifying a model extension, deploy the API:
Expand Down
102 changes: 17 additions & 85 deletions docs/developer-docs/6.x/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ export const Navigation = ({ children }: { children: React.ReactNode }) => {
<Page link={"core-concepts/debugging"} />
<Page link={"core-concepts/security"} />
</Group>
<Separator title={"Platform"} />
<Group title={"Admin"} icon={"/docs/menu-icons/admin.svg"} link={"admin/whitelabeling"}>
<Page link={"admin/whitelabeling"} />
<Page link={"admin/connect-custom-domain"} />
</Group>
<Group
title={"API"}
icon={"/docs/menu-icons/api.svg"}
link={"webiny-api/connect-custom-domain"}
>
<Page link={"webiny-api/connect-custom-domain"} />
<Page link={"webiny-api/extend-graphql-schema"} />
<Page link={"webiny-api/universal-api-keys"} />
</Group>
<Separator title={"Apps"} />
<Group
title={"Headless CMS"}
icon={"/docs/menu-icons/headless-cms.svg"}
Expand Down Expand Up @@ -89,17 +104,14 @@ export const Navigation = ({ children }: { children: React.ReactNode }) => {
{/* <Page link={"headless-cms/ui/field-renderer"} />*/}
{/*</Group>*/}
</Group>
<Group title={"Admin"} icon={"/docs/menu-icons/admin.svg"} link={"admin/whitelabeling"}>
<Page link={"admin/whitelabeling"} />
<Page link={"admin/connect-custom-domain"} />
</Group>
<Group
title={"Website Builder"}
icon={"/docs/menu-icons/page-builder.svg"}
link={"website-builder/how-it-works"}
>
<Page link={"website-builder/how-it-works"} title={"How It Works"} />
<Page link={"website-builder/setup-nextjs"} title={"Setup Next.js Project"} />
<Page link={"website-builder/multi-tenant-nextjs"} title={"Multi-Tenant Setup"} />
<Page link={"website-builder/theme"} title={"Configure Theme"} />
<Page link={"website-builder/custom-component"} title={"Create Custom Component"} />
<Page link={"website-builder/event-handlers"} title={"Event Handlers"} />
Expand Down Expand Up @@ -130,6 +142,7 @@ export const Navigation = ({ children }: { children: React.ReactNode }) => {
{/* <Page link={"tenant-manager/manage-tenants"} title={"Manage Tenants"} />*/}
{/* <Page link={"tenant-manager/extend-tenant-model"} title={"Extend Tenant Model"} />*/}
{/*</Group>*/}
<Separator title={"Operations"} />
<Group title={"CLI"} icon={"/docs/menu-icons/cli.svg"} link={"cli/deploy"}>
<Page link={"cli/deploy"} />
<Page link={"cli/destroy"} />
Expand Down Expand Up @@ -175,87 +188,6 @@ export const Navigation = ({ children }: { children: React.ReactNode }) => {
/>
</Group>
</Group>
<Group
title={"Reference"}
icon={"/docs/menu-icons/reference-manual.svg"}
link={"reference/extensions"}
>
{/* __REFERENCE_PAGES_START__ */}
<Page link={"reference/extensions"} />
<Group title={"Admin"} link={"reference/admin"}>
<Page link={"reference/admin"} title={"Root"} />
<Page link={"reference/admin/aco"} title={"ACO"} />
<Page link={"reference/admin/build-params"} title={"Build Params"} />
<Page link={"reference/admin/configs"} title={"Configs"} />
<Page link={"reference/admin/env-config"} title={"Env Config"} />
<Page link={"reference/admin/form"} title={"Form"} />
<Page link={"reference/admin/graphql-client"} title={"Graphql Client"} />
<Page link={"reference/admin/lexical"} title={"Lexical Editor"} />
<Page link={"reference/admin/local-storage"} title={"Local Storage"} />
<Page link={"reference/admin/router"} title={"Router"} />
<Page link={"reference/admin/tenancy"} title={"Tenancy"} />
<Page link={"reference/admin/ui"} title={"UI"} />
<Group title={"CMS"} link={"reference/admin/cms"}>
<Page link={"reference/admin/cms"} title={"Root"} />
<Page link={"reference/admin/cms/entry/editor"} title={"Editor"} />
<Page link={"reference/admin/cms/entry/list"} title={"List"} />
<Page
link={"reference/admin/cms/field-renderers/dynamic-zone"}
title={"Dynamic Zone"}
/>
<Page link={"reference/admin/cms/field-renderers/object"} title={"Object"} />
<Page link={"reference/admin/cms/lexical"} title={"Lexical Editor"} />
<Page link={"reference/admin/cms/model"} title={"Model"} />
</Group>
<Group title={"Website Builder"} link={"reference/admin/website-builder"}>
<Page link={"reference/admin/website-builder"} title={"Root"} />
<Page link={"reference/admin/website-builder/lexical"} title={"Lexical Editor"} />
<Page link={"reference/admin/website-builder/page/editor"} title={"Editor"} />
<Page link={"reference/admin/website-builder/page/list"} title={"List"} />
<Page link={"reference/admin/website-builder/redirect/list"} title={"List"} />
</Group>
</Group>
<Group title={"API"} link={"reference/api/cms/entry"}>
<Page link={"reference/api"} title={"Root"} />
<Page link={"reference/api/build-params"} title={"Build Params"} />
<Page link={"reference/api/event-publisher"} title={"Event Publisher"} />
<Page link={"reference/api/graphql"} title={"GraphQL"} />
<Page link={"reference/api/key-value-store"} title={"Key Value Store"} />
<Page link={"reference/api/logger"} title={"Logger"} />
<Page link={"reference/api/system"} title={"System"} />
<Page link={"reference/api/tasks"} title={"Tasks"} />
<Page link={"reference/api/tenancy"} title={"Tenancy"} />
<Page link={"reference/api/tenant-manager"} title={"Tenant Manager"} />
<Group title={"CMS"} link={"reference/api/cms/entry"}>
<Page link={"reference/api/cms/entry"} title={"Entry"} />
<Page link={"reference/api/cms/group"} title={"Group"} />
<Page link={"reference/api/cms/model"} title={"Model"} />
</Group>
<Group title={"Security"} link={"reference/api/security"}>
<Page link={"reference/api/security"} title={"Root"} />
<Page link={"reference/api/security/api-key"} title={"Api Key"} />
<Page link={"reference/api/security/authentication"} title={"Authentication"} />
<Page link={"reference/api/security/role"} title={"Role"} />
<Page link={"reference/api/security/user"} title={"User"} />
</Group>
<Group title={"Website Builder"} link={"reference/api/website-builder/page"}>
<Page link={"reference/api/website-builder/nextjs"} title={"Next.js"} />
<Page link={"reference/api/website-builder/page"} title={"Page"} />
<Page link={"reference/api/website-builder/redirect"} title={"Redirect"} />
</Group>
</Group>
<Group title={"CLI"} link={"reference/cli/overview"}>
<Page link={"reference/cli/overview"} title={"Root"} />
<Page link={"reference/cli/command"} title={"Command"} />
</Group>
<Group title={"Infrastructure"} link={"reference/infra/overview"}>
<Page link={"reference/infra/overview"} title={"Root"} />
<Page link={"reference/infra/admin"} title={"Admin"} />
<Page link={"reference/infra/api"} title={"API"} />
<Page link={"reference/infra/core"} title={"Core"} />
</Group>
{/* __REFERENCE_PAGES_END__ */}
</Group>
<Separator />
{children}
</NavigationRoot>
Expand Down
29 changes: 0 additions & 29 deletions docs/developer-docs/6.x/reference/admin.ai.txt

This file was deleted.

Loading