BoilerPrompt
Windsurf

Windsurf prompt to build an admin panel

An admin panel assembled from the components your repo already owns, not a bolted-on UI kit. Cascade inventories what exists, builds the record table, edit drawer, and audit view against your live endpoints, then clicks through create, edit, and delete in Windsurf to surface any API gaps.

Last updated

Prompt
Build an internal admin panel under /admin. Views: a searchable table of {{resource}} records with column sorting and pagination, backed by the existing {{resource}} endpoints, a detail drawer that edits one record with optimistic updates and rollback on failure, and a read-only audit log. Gate the whole route tree behind an isAdmin check, redirecting anonymous users to login; no per-component guards. Destructive actions require a typed-confirmation modal, and bulk actions must report partial failures row by row. Do not add a UI kit: inventory the components this repo already exports and compose those. Boot the app from the Windsurf terminal, click through create, edit, and delete on a seeded record, and summarize any endpoint gaps the panel exposed, like missing filters or absent audit events.

Customize it

Runs in your browser. Nothing you type here is sent anywhere.

Your customized prompt
Build an internal admin panel under /admin. Views: a searchable table of users records with column sorting and pagination, backed by the existing users endpoints, a detail drawer that edits one record with optimistic updates and rollback on failure, and a read-only audit log. Gate the whole route tree behind an isAdmin check, redirecting anonymous users to login; no per-component guards. Destructive actions require a typed-confirmation modal, and bulk actions must report partial failures row by row. Do not add a UI kit: inventory the components this repo already exports and compose those. Boot the app from the Windsurf terminal, click through create, edit, and delete on a seeded record, and summarize any endpoint gaps the panel exposed, like missing filters or absent audit events.

Same task in other tools

Questions about this prompt

What does the component inventory step actually do?

Cascade lists the tables, buttons, and modals your repo already exports and composes those instead of generating parallel ones. The panel stays on your design language and the diff stays much smaller.

How do I change the set of views?

Name each view and its backing endpoint in the prompt, marked read-only or editable. The route-level isAdmin gate and the typed-confirmation rule for destructive actions should survive any variation.

Optimistic edits leave stale rows after a failure. What is the fix?

The rollback restores the row but never invalidates the query cache, so the next refetch reintroduces the failed value. Ask Cascade to trace the update path end to end and add a test that forces a 500 mid-edit.

Related prompts