Template
Relayon
A settings page where a workspace admin reviews and configures the automated AI agents attached to a content project. Each agent appears as a compact card showing its role, the workflow it runs, its current step and its configuration, with an on/off switch, so admins can audit and adjust automation without leaving settings.
AI agent configuration page inside grouped project settings · App screen: integrations · Small tools and apps · full-stack app (auth + DB)
A mock-up of the screen, drawn from its layout, palette and typefaces. A build follows the full prompt below.
Start from this screenRead the build prompt
Typefaces
The catalog's own faces. A screen composed into a template is drawn in that template's typefaces.
- InterHeadings: Inter 600, 18px page title, 20px agent name, -0.01em tracking
- InterBody: Inter 400, 16px body and nav, line-height 1.5; 13px labels in 500 weight
Patterns
- icon rail plus secondary settings nav
- grouped settings sub-navigation with section icons
- underline tabs
- hired-agent summary card
- inline enable toggle in card header
- status pill and seat chip
- two-column detail panel inside card
- environment-tinted project switcher bar
- collapsible secondary nav
States it is designed for
- loading: two skeleton agent cards with shimmer bars
- empty: 'No agents yet' with short explanation and Add agent button
- disabled agent: card dims to 60% text contrast-safe grey, pill reads Paused
- saving toggle: switch shows spinner, card not interactive
- error on toggle: inline error line in the card with Retry
- permission-denied: viewer role sees switches disabled with a tooltip explaining why
- seat limit reached: Add agent disabled with a link to billing
- long agent names truncate with tooltip
Who it is for
- workspace admins of a headless content platform
- content operations leads
- localisation managers
Layout
- top bar: project switcher on a pale green environment strip, global search with two icon actions, assistant button, help, messages, notifications, avatar
- left icon-and-label rail (~130px): Home, Schema, Content, Assets, API explorer
- secondary settings column (~160px) with grouped links (General, Access, Team, AI) and a collapse chevron on its edge
- main: page title with subtitle, primary 'Add agent' button right, underline tabs (Agents, Metrics)
- main body: 'Active agents' label then a max-width ~490px stack of agent cards
- below 1024px the settings column collapses into a select above the page title; below 640px the rail becomes a bottom sheet menu and card detail stacks to one column
Palette
Tidy, technical, low-noise; the page feels like a control room where one toggle does one clear thing.
- bg
#ffffff - canvas
#f9fafc - inset
#f4f5f9 - text
#1f2130 - muted
#6b6f85 - primary
#5b5fd6 - env
#ecfaf3 - success
#1d804f - border
#8f92b4 - tag
#3e5bd8
Every checked pair, measured again
| Sample | Where | Ratio | Needs |
|---|---|---|---|
| Aa | body text | 15.93:1 | 4.5:1 |
| Aa | muted text on canvas | 4.75:1 | 4.5:1 |
| Aa | primary button label | 5.18:1 | 4.5:1 |
| Aa | active tab / link text | 5.18:1 | 4.5:1 |
| Aa | enabled pill text | 4.59:1 | 4.5:1 |
| Aa | tag text on inset | 5.22:1 | 4.5:1 |
| input and card border | 3.03:1 | 3:1 | |
| focus ring | 5.18:1 | 3:1 |
As vibld’s tokens
The palette on the fifteen colour tokens vibld styles a project with, each text colour on the fill it is read on. Marked tokens are solved from the palette, because no swatch held that role at 4.5:1.
- background
- card
- muted
- primary
- secondary
- accent
- destructive *
Type scale
- Display
- Inter 600, 18px page title, 20px agent name, -0.01em tracking
- Body
- Inter 400, 16px body and nav, line-height 1.5; 13px labels in 500 weight
Settings group labels are 12px uppercase with 0.06em tracking and a small leading icon. Use tabular numerals for step counters.
Spacing and imagery
Density: Comfortable, calm admin density. Grid: 4px base; nav rows 36px; card padding 16-20px. Container: main content max 960px with 48px left padding; cards max 520px. Radius: 8px cards, 6px buttons, full pills for status and tags. Shadows: Cards use a 1px border plus a very soft 0 1px 2px shadow; menus use a medium shadow.
Line icons at 16px for nav and detail rows; a round tinted avatar glyph for each agent; no photos or illustrations.
Components
- ProjectSwitcher with environment badge
- SettingsNav (grouped, 'New' pill)
- PageHeader with Add agent button
- Tabs (Agents, Metrics)
- AgentCard (avatar, name, Enabled pill, seat chip, Recent activity link, edit icon button, overflow menu, Switch)
- AgentDetailPanel (role, workflow, step progress, configuration tags)
- AddAgentDialog
- ActivityDrawer
- ConfirmDisableDialog
Interactions
- Toggling the switch updates optimistically, shows a toast with Undo, and rolls back on error
- Recent activity opens a right drawer with a timeline of the agent's last 20 runs
- Edit opens a dialog with role, workflow select and multi-select language tags
- Overflow menu: Duplicate, Pause for 24h, Remove (confirmation required)
- Secondary nav collapse chevron hides the settings column and remembers the choice per user
- Tabs are URL-driven (?tab=agents|metrics) and arrow-key navigable
Data
Agent{id, project_id, name, role (translator|reviewer|tagger|summariser), status (enabled|paused), seats, workflow_id, config jsonb, created_by, updated_at}Workflow{id, project_id, name, step_count}AgentRun{id, agent_id, step, status (queued|running|done|failed), started_at, finished_at}ProjectMember{project_id, user_id, role (owner|admin|editor|viewer)}
Guardrails
Experience
- Keep one agent per card; the switch in the header is the only way to enable or pause it
- Always show the workflow step as 'Step n of m' in text, not only an icon
- Put destructive Remove behind the overflow menu and a confirmation dialog
- Show the current environment name in the top bar at all times so admins never edit the wrong one
- Keep 'New' pills to at most two nav items and remove them after first visit
Accessibility
- Switch uses role=switch with aria-checked and a label that includes the agent name
- Settings nav is a nav landmark with aria-current=page on the active link
- Tabs follow the Radix tabs pattern with arrow-key support
- Status is conveyed by text (Enabled / Paused), never colour alone
- Icon buttons (edit, overflow) have aria-labels naming the agent
- Visible 2px focus ring in the primary colour with 2px offset
Security
- RLS on agents, workflows and agent_runs: select for project members; insert/update/delete only for owner or admin roles
- Validate agent config with zod on the client and again in the Edge Function that saves it
- Write an audit_log row for every enable, pause, edit and remove
- Agent credentials or API tokens never reach the browser; the Edge Function reads them from secrets
Build prompt
The baseline every prompt in the catalog assumes, then this design’s own ten sections, from goal to guardrails.
The baseline
### How to use these prompts Paste an entry's build prompt into your coding agent as the first message. Each prompt names its own stack, tokens and acceptance criteria; the rules below apply to all of them and can be prepended once per project. ### Engineering baseline - TypeScript strict mode, no `any`, small typed components, feature folders, and one source of truth for design tokens (CSS variables consumed by Tailwind). - Validate every input with a shared zod schema on the client and again on the server or edge function. Never trust client-side checks alone. - Show loading, empty and error states for every async view. Surface errors in plain language with a retry, and log details to the console in development only. - Keep secrets out of the bundle. Only publishable keys (for example a Supabase anon key) belong in client code; service-role keys, API keys and webhooks live in server or edge-function environment variables. ### Data and auth baseline (full-stack entries) - Enable Row Level Security on every table before inserting data. Default-deny, then add owner-scoped policies (`auth.uid() = user_id`) and explicit role checks for admin views. - Store roles in a separate table checked by a security-definer function, never in a user-editable profile field. - Upload files to private storage buckets with size and MIME limits, and serve them through signed URLs. - Rate-limit public endpoints (forms, auth, AI calls) and add a honeypot field or captcha to anonymous forms. - Take payments through a hosted checkout and verify webhooks by signature. Never handle raw card data. ### Accessibility and UX baseline - Target WCAG 2.2 AA: 4.5:1 contrast for normal text and 3:1 for large text, input borders, focus rings and meaningful icons or chart lines. Every palette in this catalog lists its verified pairs; re-check with a contrast tool after any colour change. - Keep body text at 16px or larger with 1.5 line height, nothing below 12px, no light weights under 24px, and uppercase only for short labels. - Give every interactive element a visible focus ring, full keyboard support, semantic landmarks, labelled form fields, and alt text on meaningful images. - Respect `prefers-reduced-motion` for every animation. Give drag-and-drop and carousels keyboard and button alternatives. - Build mobile-first and test at 375px, 768px and 1280px. ### Content guardrails - Use original copy, fictional sample data and placeholder or licensed imagery. Do not reuse another product's name, logo, screenshots or marketing text. - Label demo testimonials and metrics as samples. Collect the minimum personal data the feature needs. ### SaaS screen baseline - Design every screen for its full set of states: first-run empty, loading skeleton, partial data, error with retry, permission-denied, and success feedback. Each entry lists the states its screen needs. - Keep destructive actions (delete, revoke, downgrade, remove member) behind a confirmation that names the object, and prefer undo over a second dialog where the action is reversible. - Enforce authorisation on the server for every action a screen exposes. Hiding a button is not access control; check the role again in the API or RLS policy. - Never show secrets (API keys, tokens) in full after creation. Show them once, then mask them, and offer rotate and revoke. - Keep the app shell (navigation, workspace switcher, account menu) consistent across screens, and preserve filters, sort and scroll position when the user navigates back.
### Goal
Build **Relayon**, the AI agents page of a content platform's project settings. Admins land here to see which automated agents are hired for the current project and environment, what each one is doing right now, and to switch them on or off. Build the page, its minimal app shell (top bar, icon rail, grouped settings nav) and realistic mock data for three agents.
### Stack
React 18 + TypeScript + Vite, Tailwind CSS, shadcn/ui on Radix primitives and lucide-react icons. TanStack Query for server state, react-hook-form + zod for every form, date-fns for relative times. Supabase for Auth, Postgres with row-level security and Edge Functions for anything that needs a secret.
### Pages & layout
1. **App shell**: top bar with project switcher (square monogram, project name, environment chip on a pale green strip), search field with two icon buttons, assistant button, help, messages, notifications with unread dot and avatar. Left rail with five primary destinations.
2. **Settings column**: grouped links -- General (Project, Environments, Backups, Audit log, Stages, Locales, Billing, Labs), Access (Endpoints, Content API, Tokens), Team (Roles, Members, Workflows), AI (Agents). Collapse chevron on the column edge.
3. **Agents page**: title 'AI agents' with one-line subtitle, 'Add agent' primary button top-right, tabs Agents / Metrics, then an 'Active agents' label and the card stack.
4. **Metrics tab**: three small stat tiles (runs this week, success rate, average duration) and a simple bar chart; keep it minimal.
Responsive: at <1024px replace the settings column with a select; at <640px stack the card's detail columns.
### Design system
- Colors: `--bg: #ffffff` (cards and main surface), `--canvas: #f9fafc` (settings column and card inset), `--inset: #f4f5f9` (selected nav item and card detail panel), `--text: #1f2130` (primary text), `--muted: #6b6f85` (descriptions, group labels), `--primary: #5b5fd6` (primary button, active tab, toggle on), `--env: #ecfaf3` (environment strip and enabled pill fill), `--success: #1d804f` (enabled pill text), `--border: #8f92b4` (card and input borders), `--tag: #3e5bd8` (language tag text and outline).
- Fonts: Inter 600, 18px page title, 20px agent name, -0.01em tracking for headings; Inter 400, 16px body and nav, line-height 1.5; 13px labels in 500 weight for body. Settings group labels are 12px uppercase with 0.06em tracking and a small leading icon. Use tabular numerals for step counters.
- Spacing: Comfortable, calm admin density. 4px base; nav rows 36px; card padding 16-20px. Container: main content max 960px with 48px left padding; cards max 520px.
- Radius: 8px cards, 6px buttons, full pills for status and tags.
- Shadows: Cards use a 1px border plus a very soft 0 1px 2px shadow; menus use a medium shadow.
- Motion: 150ms colour and background transitions; toggle thumb slides 120ms; cards fade in with 40ms stagger; respect prefers-reduced-motion.
### Components & interactions
Build AgentCard as the centrepiece: header row with round avatar glyph, agent name (20px semibold), an 'Enabled' success pill and a '1 seat' neutral chip, then on the right a 'Recent activity' text link with history icon, an edit icon button, an overflow button and a Switch. Below, an inset panel in two columns: left lists role, workflow (with a branching icon) and current step with a small progress ring; right shows 'Configuration' with a label and outlined tags (e.g. two target languages).
- Toggling the switch updates optimistically, shows a toast with Undo, and rolls back on error
- Recent activity opens a right drawer with a timeline of the agent's last 20 runs
- Edit opens a dialog with role, workflow select and multi-select language tags
- Overflow menu: Duplicate, Pause for 24h, Remove (confirmation required)
- Secondary nav collapse chevron hides the settings column and remembers the choice per user
- Tabs are URL-driven (?tab=agents|metrics) and arrow-key navigable
### Data & state
Seed three agents: a translator (enabled, step 1 of 4, two languages), a metadata tagger (paused) and a summariser (enabled, step 3 of 3). Server state via TanStack Query keyed by project and environment; active tab and collapsed-nav state in the URL and local preferences. Toggle mutations are optimistic with rollback.
Entities: `Agent{id, project_id, name, role (translator|reviewer|tagger|summariser), status (enabled|paused), seats, workflow_id, config jsonb, created_by, updated_at}`; `Workflow{id, project_id, name, step_count}`; `AgentRun{id, agent_id, step, status (queued|running|done|failed), started_at, finished_at}`; `ProjectMember{project_id, user_id, role (owner|admin|editor|viewer)}`.
States to build and show in a dev-only state switcher:
- loading: two skeleton agent cards with shimmer bars
- empty: 'No agents yet' with short explanation and Add agent button
- disabled agent: card dims to 60% text contrast-safe grey, pill reads Paused
- saving toggle: switch shows spinner, card not interactive
- error on toggle: inline error line in the card with Retry
- permission-denied: viewer role sees switches disabled with a tooltip explaining why
- seat limit reached: Add agent disabled with a link to billing
- long agent names truncate with tooltip
### Accessibility
- Switch uses role=switch with aria-checked and a label that includes the agent name
- Settings nav is a nav landmark with aria-current=page on the active link
- Tabs follow the Radix tabs pattern with arrow-key support
- Status is conveyed by text (Enabled / Paused), never colour alone
- Icon buttons (edit, overflow) have aria-labels naming the agent
- Visible 2px focus ring in the primary colour with 2px offset
Verified contrast: body text: #1f2130 on #ffffff = 15.93:1; muted text on canvas: #6b6f85 on #f9fafc = 4.75:1; primary button label: #ffffff on #5b5fd6 = 5.18:1; active tab / link text: #5b5fd6 on #ffffff = 5.18:1; enabled pill text: #1d804f on #ecfaf3 = 4.59:1; tag text on inset: #3e5bd8 on #f4f5f9 = 5.22:1; input and card border: #8f92b4 on #ffffff = 3.03:1; focus ring: #5b5fd6 on #ffffff = 5.18:1.
### Security
- RLS on agents, workflows and agent_runs: select for project members; insert/update/delete only for owner or admin roles
- Validate agent config with zod on the client and again in the Edge Function that saves it
- Write an audit_log row for every enable, pause, edit and remove
- Agent credentials or API tokens never reach the browser; the Edge Function reads them from secrets
RLS detail: `agents` select where the user is in `project_members` for that project; write where their role is owner or admin. `agent_runs` is insert-only from the service role. `audit_log` is insert-only and readable by admins.
### Performance & SEO
Lazy-load the Metrics tab chart. Prefetch agent runs on hover of 'Recent activity'. The page is behind auth: noindex, no public metadata. Keep the initial JS for the settings route under 150KB gzipped.
### Guardrails
- Keep one agent per card; the switch in the header is the only way to enable or pause it
- Always show the workflow step as 'Step n of m' in text, not only an icon
- Put destructive Remove behind the overflow menu and a confirmation dialog
- Show the current environment name in the top bar at all times so admins never edit the wrong one
- Keep 'New' pills to at most two nav items and remove them after first visit
- Write fresh, generic copy and invented sample data; no real brands, logos, product names or people.
- Keep components small and typed (no `any`); surface every error visibly with a way to recover.
Acceptance criteria:
- Enabling or pausing an agent persists, updates the pill and writes an audit row
- Viewer role cannot toggle and sees why
- Empty, loading and error states render from the state switcher
- Keyboard-only users can reach and operate every control in the card
- RLS blocks reading agents from a project the user is not a member of