Role-based admin panel

Build an operator workspace with permission-aware navigation and editable records.

Customize the recipe

0/1500 characters
Workflow boosters

Prompt preview

# Role-based admin panel

Build an operator workspace with permission-aware navigation and editable records.

## Deliverable
A working admin panel with fixtures for both roles, editable records, and a documented permission matrix.

## Stack and visual direction
- Recommended starting stack: Next.js, TypeScript and shadcn/ui. Use local fixtures for development and a database for records that must persist across users.
- Bento grid: Arrange content in purposeful modules whose sizes communicate priority. Preserve logical reading and keyboard order when modules reflow. Apply this direction to the interface while keeping data and controls easy to read.

- Inspect the workspace first. Adapt to its stack when it contains a project, or use the recommended starting stack in a new workspace.

## Tools and setup · Universal
Use the receiving agent’s documented skill and tool mechanisms. Match setup to the agent and workspace you actually have.

Check available tools first. Propose documented project-level setup only when it materially helps and follow the host's permission prompts. If a tool or integration is unavailable, continue with the workflow below using existing tools, local fixtures or a manual check. Keep secrets in the intended configuration environment.

- [shadcn/ui Skill](https://ui.shadcn.com/docs/skills) (Skill) — Inspect the project's component registry and assemble accessible UI primitives.
  Project with compatible React and styling configuration. Follow the skill's agent-specific setup. Fallback: Reuse established controls in the project, or start with semantic native controls and test keyboard and error states.
- [shadcn/ui](https://github.com/shadcn-ui/ui) (Repository) — Use and adapt relevant component source with established keyboard behavior.
- [TanStack Table](https://github.com/TanStack/table) (Repository) — Implement headless sorting, filtering and pagination while owning accessible table markup.
- [Supabase](https://github.com/supabase/supabase) (Repository) — Consider PostgreSQL persistence, authentication and row-level permissions for shared applications.
  Use a local stack or configure an authorized project for integration checks.
- [Web Design Guidelines](https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines) (Skill) — Review frontend UI against usability and accessibility guidance.
  Access to the current upstream guidelines for the skill's full review. Fallback: Perform the recipe's keyboard, focus, responsive and feedback checks manually.

### Optional workflow boosters
- [Playwright CLI](https://github.com/microsoft/playwright-cli) (Skill) — Walk real browser interactions and collect screenshots or evidence for regressions.
  Node.js and supported browser binaries. Use a local build or authorized test environment. [Official setup](https://github.com/microsoft/playwright-cli#readme). Fallback: Walk the same primary journey in a local browser and record the viewport, actions and outcomes.

## Workflow
1. Define viewer and administrator permissions, build a searchable records table and detail editor, enforce authorization on server reads and writes, and log meaningful mutations.
2. Use the simplest implementation that delivers the stated outcome. Follow the user's project constraints and treat the starting stack as a default. Reuse existing work and ask for essential input only when it would change the result. Use realistic labeled sample data when real inputs are unavailable.
3. Run the applicable checks and report what actually passed along with any checks you could not run.

## Acceptance checks
- [ ] A viewer can read records and receives a denial from the server when attempting a mutation.
- [ ] A successful edit persists after reload and appears in the audit trail.
- [ ] Table, dialog and confirmation actions work by keyboard.
- [ ] Walk the primary journey with keyboard only. Check visible focus, logical order, accessible names, readable contrast, zoom and reduced motion. Use axe where available and manually check behavior that automation cannot assess.
- [ ] Verify real actions and persisted data where required. Exercise relevant loading, empty, invalid, pending, failure and success states. Provide a clear recovery path.
- [ ] Use fixtures to verify core flows, including a narrow-screen layout and any applicable permission boundaries.

Recipe resources

Source, setup, and compatibility details.