The CWA is in heavy development
The CWA is still in alpha and not ready for production - some code and implementations are likely to change. If you would like to try out the CWA, please enjoy what we have provided and feel free to provide feedback, or get involved on GitHub.
DraftCwa Layer

Admin Panel

The built-in CWA admin — pages, edit mode, the resource manager, and how to extend it with custom manager tabs.

The CWA admin panel is shipped as part of the layer and requires no setup. It becomes accessible at /_cwa for any user with ROLE_ADMIN.

Admin Routes

RoutePurpose
/_cwaRedirects to /_cwa/pages
/_cwa/pagesBrowse, create, and edit page records
/_cwa/layoutsBrowse and edit layout records
/_cwa/routesManage routes — path, redirects, and visibility (live, scheduled or not live; see Visibility)
/_cwa/dataBrowse any resource by type; drill into individual records
/_cwa/data/[type]List view for a specific resource type
/_cwa/data/[type]/[iri]Edit view for a single resource
/_cwa/settingsSite config, SEO settings, maintenance mode, robots
/_cwa/orphanedThe last orphaned resource report: view and delete orphaned components, positions and groups. Opened from site settings, which can also start a scan. See Orphaned Resources. Added in @cwa/nuxt 2.0.0-alpha.3. Builds after it add a Files report of orphaned, unknown and missing files, see Orphaned files
/_cwa/usersList and manage user accounts
/_cwa/users/[iri]Edit an individual user. A pending email change shows Resend email verification (disabled with a countdown while throttled) and Cancel change, which clears the pending address so its emailed link stops working

All /_cwa routes are client-only (SSR disabled). Every /_cwa page uses the layer's cwa-admin route middleware, set on the /_cwa parent page and inherited by each admin page: a signed-out visitor is sent to /login?redirect=… and returned after sign-in, and a signed-in non-admin is sent to /. Signing out while on an admin route sends you back to /. To guard your own admin-only pages, use the same middleware — see Protecting Your Own Pages.

The middleware guard needs @cwa/nuxt 2.0.0-alpha.4 or later. Earlier releases only checked once the admin page had mounted, and sent every non-admin to /, including signed-out visitors.

Edit Mode

When an admin visits a content page, an edit bar appears at the top of the page (rendered by <CwaAdminHeader>). Clicking "Edit" toggles edit mode:

const cwa = useCwa()

cwa.admin.isEditing        // whether edit mode is active (a reactive boolean, not a ref)
cwa.admin.toggleEdit()     // open/close edit mode

In edit mode, every rendered component gains a selection overlay. Clicking a component opens its resource manager panel (<CwaAdminResourceManager>).

The Resource Manager

The resource manager is a panel that slides in when a component is selected. It shows tabs for editing the component's data fields. The standard tabs (resource info, UI styles, publish, ordering) ship with the Nuxt module. Custom tabs are added using useCwaResourceManagerTab.

Custom Manager Tab

Create a Vue component in app/cwa/components/[ComponentName]/admin/[TabName].vue. Use useCwaResourceManagerTab to register it:

<!-- app/cwa/components/Title/admin/SEO.vue -->
<template>
    <div class="p-4 space-y-4">
        <CwaUiFormLabelWrapper label="Meta Title">
            <CwaUiFormInput
                v-model="metaTitleModel"
                placeholder="Override page title for search engines"
            />
        </CwaUiFormLabelWrapper>
    </div>
</template>

<script setup lang="ts">
import { useCwaResourceManagerTab, useCwaResourceModel } from '#imports'

const { exposeMeta, iri } = useCwaResourceManagerTab({ name: 'SEO', order: 10 }) 
const { model: metaTitleModel } = useCwaResourceModel<string>(iri, 'metaTitle')

defineExpose(exposeMeta) </script>
defineExpose(exposeMeta) is required — without it the tab has no name and won't be ordered. The composable also returns the currently-selected iri, so the tab needs no iri prop of its own.

The tab appears in the resource manager whenever a Title component is selected.

cwa.admin API

MemberTypeDescription
isEditingbooleanWhether edit mode is active. Reactive — reads inside a computed or template track correctly — but not a ref, so no .value
toggleEdit(state?)(boolean?) => voidToggle or set edit mode
emptyStack()() => voidDeselect the current component
emitRedraw()() => voidForce re-render of all component overlays
setNavigationGuardDisabled(disabled)(boolean) => voidTurn the edit-mode navigation block on/off
navigationGuardDisabledbooleanWhether the block has been manually disabled

The guard's effective state is cwa.navigationDisabled — on the root cwa object, not cwa.admin.

While edit mode is active, the admin navigation guard blocks programmatic route changes (router.push, back, and friends) so an in-progress edit isn't lost. It aborts the navigation silently — there is no confirmation dialog. Add ?cwa_force=true to the target route to bypass it.

The guard removes cwa_force from the URL with one redirect, whatever its value. Only cwa_force=true bypasses the block.

Upgrading to @cwa/nuxt 2.0.0-alpha.4: up to 2.0.0-alpha.3, the guard only removed cwa_force when it was true. Any other value, an empty one or a repeated parameter made the server render redirect to itself forever, so a single anonymous request could keep an SSR process busy until its liveness probe restarted it (cwa-nuxt-module#366). Upgrade, and keep cwa_force out of any cache query allowlist (see Query parameters on pages).

To disable the guard programmatically (e.g. after a save):

cwa.admin.setNavigationGuardDisabled(true)

Separately, navigating away while a component is mid-add triggers a discard-confirmation dialog.