Template
Nubrio
Inside an automation platform, a Connect page documents the run API: a list of endpoints on the left, the selected endpoint's description, query params, headers and request body in the centre, and a copyable code example on the right bound to a chosen workflow and version.
API endpoint reference with code example panel · App screen: details · Small tools and apps · front-end app (local state)
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 22px endpoint title
- InterBody: Inter 400 16px / 1.5; tables 15px
Patterns
- three-pane API reference (endpoint list, docs, code sample)
- HTTP method badges colour-coded
- parameters table with type and default
- language selector over dark code block
- connect-to target and version selects
- spec download and interactive explorer buttons
States it is designed for
- no workflow selected (code uses placeholder target)
- loading spec
- endpoint deprecated banner
- spec fetch error
- long URLs wrap in code with horizontal scroll
- dark theme
Who it is for
- developers integrating workflow automations
- solutions engineers
Layout
- App sidebar: trigger, runs, reviews, monitoring; agent section; workflow section; developer section (webhooks, API keys, connect active); settings; docs link and theme switch
- Top bar: workspace switcher / Connect
- Endpoint list (~140px): method badge + name + path per endpoint, selected highlighted
- Doc pane: title, description, method + full URL; REQUEST sections: query params table, headers (with API keys button), request body schema table with required markers and descriptions
- Right pane: Connect to (workflow select) and Version select, buttons for OpenAPI spec download and interactive explorer; Code example card with language select and dark code block
- Below 1100px the code pane moves under the docs; below 768px the endpoint list becomes a select
Palette
Developer-grade, orderly and practical; colour is reserved for method badges.
- page
#ffffff - panel
#f7f7f7 - text
#18181b - muted text
#6b6f73 - get badge bg
#e0ecff - get badge text
#1d4ed8 - post badge bg
#dcfce7 - post badge text
#166534 - put badge text
#9a3412 - code bg
#1e2124 - code text
#e5e7eb - focus ring
#16a34a
Every checked pair, measured again
| Sample | Where | Ratio | Needs |
|---|---|---|---|
| Aa | body text on white | 17.72:1 | 4.5:1 |
| Aa | muted text on panel | 4.73:1 | 4.5:1 |
| Aa | GET badge | 5.62:1 | 4.5:1 |
| Aa | POST badge | 6.49:1 | 4.5:1 |
| Aa | PUT badge text on white | 7.31:1 | 4.5:1 |
| Aa | code on dark | 13.07:1 | 4.5:1 |
| focus ring on white | 3.30: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 22px endpoint title
- Body
- Inter 400 16px / 1.5; tables 15px
JetBrains Mono 15px for paths, params and code, badges 12px minimum; section labels uppercase 12px 600 with 0.06em tracking.
Spacing and imagery
Dense; 12px table cell padding, 24px section gap, panes separated by 1px borders; radius 8px cards and code block, 4px badges; no shadows.
None; icons for docs, spec and explorer buttons.
Components
- AppSidebar
- EndpointList with MethodBadge
- EndpointHeader (method + URL with copy)
- ParamsTable
- HeadersBlock
- BodySchemaTable (required marker, type, description)
- ConnectToSelect
- VersionSelect
- CodeExample (language select: cURL, JavaScript, Python) with copy
- SpecDownloadButton
Interactions
- Selecting an endpoint updates URL hash and scrolls doc pane to top
- Choosing a workflow fills the target field in the code example
- Language select swaps code; copy copies with the placeholder key
- Hovering a param row highlights the matching token in the code
- Keyboard: up/down in the endpoint list, Cmd/Ctrl+C in code copies
Data
Endpoint{id, method (GET|POST|PUT|DELETE), name, path, description, query_params[], headers[], body_schema[]}Param{name, type, required, default?, description}Workflow{id, slug, versions[]}
Guardrails
Experience
- Keep the example next to the docs for side-by-side reading
- Fill the example with the user's chosen workflow
- Show required markers and defaults in the tables
- Colour-code methods consistently
Accessibility
- Endpoint list is a listbox or nav with aria-current
- Method badges include the method as text, never colour alone
- Tables have headers and captions
- Code block is focusable with a labelled copy button
- Language select is a labelled combobox
Security
- Never embed a real key in samples; use a clearly fake placeholder
- Mask API key values if the user pastes one into a try-it box
- Escape all description text from the spec
- The API keys button links to key management rather than showing keys
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 **Nubrio**, the Connect (API reference) page of an automation platform with an endpoint list, doc pane and code example panel generated from a local OpenAPI file. Use fictional endpoints and workflows.
### Stack
Use React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui, Radix, lucide-react, react-hook-form, zod, TanStack Query. Parse a local OpenAPI JSON file to drive the list, tables and code samples. Keep everything in local state backed by a typed mock-data module and a fake async API (200-600 ms latency, a toggle to force errors) so every state can be demonstrated without a backend.
### Pages & layout
1. **/connect**: three-pane page.
2. **/connect#<endpoint-id>** deep links.
Regions, in order:
- App sidebar: trigger, runs, reviews, monitoring; agent section; workflow section; developer section (webhooks, API keys, connect active); settings; docs link and theme switch
- Top bar: workspace switcher / Connect
- Endpoint list (~140px): method badge + name + path per endpoint, selected highlighted
- Doc pane: title, description, method + full URL; REQUEST sections: query params table, headers (with API keys button), request body schema table with required markers and descriptions
- Right pane: Connect to (workflow select) and Version select, buttons for OpenAPI spec download and interactive explorer; Code example card with language select and dark code block
- Below 1100px the code pane moves under the docs; below 768px the endpoint list becomes a select
### Design system
- Colors: `--page: #ffffff` (page), `--panel: #f7f7f7` (panel), `--text: #18181b` (text), `--muted-text: #6b6f73` (muted text), `--get-badge-bg: #e0ecff` (get badge bg), `--get-badge-text: #1d4ed8` (get badge text), `--post-badge-bg: #dcfce7` (post badge bg), `--post-badge-text: #166534` (post badge text), `--put-badge-text: #9a3412` (put badge text), `--code-bg: #1e2124` (code bg), `--code-text: #e5e7eb` (code text), `--focus-ring: #16a34a` (focus ring).
- Fonts: Inter 600 22px endpoint title for headings; Inter 400 16px / 1.5; tables 15px for body. JetBrains Mono 15px for paths, params and code, badges 12px minimum; section labels uppercase 12px 600 with 0.06em tracking.
- Spacing, radius and shadows: Dense; 12px table cell padding, 24px section gap, panes separated by 1px borders; radius 8px cards and code block, 4px badges; no shadows.
- Motion: 150-200 ms ease-out for hover, focus and overlay transitions; overlays fade and scale from 98% to 100%; everything collapses to an instant change under prefers-reduced-motion.
- Mood: Developer-grade, orderly and practical; colour is reserved for method badges. Imagery: None; icons for docs, spec and explorer buttons.
### Components & interactions
Build these components: AppSidebar; EndpointList with MethodBadge; EndpointHeader (method + URL with copy); ParamsTable; HeadersBlock; BodySchemaTable (required marker, type, description); ConnectToSelect; VersionSelect; CodeExample (language select: cURL, JavaScript, Python) with copy; SpecDownloadButton.
- Selecting an endpoint updates URL hash and scrolls doc pane to top
- Choosing a workflow fills the target field in the code example
- Language select swaps code; copy copies with the placeholder key
- Hovering a param row highlights the matching token in the code
- Keyboard: up/down in the endpoint list, Cmd/Ctrl+C in code copies
### Data & state
Model: `Endpoint{id, method (GET|POST|PUT|DELETE), name, path, description, query_params[], headers[], body_schema[]}`; `Param{name, type, required, default?, description}`; `Workflow{id, slug, versions[]}`.
A pure `renderSample(endpoint, lang, workflow, version)` produces code. Selection lives in the URL hash; theme in localStorage (with try/catch).
States to implement and demo:
- no workflow selected (code uses placeholder target)
- loading spec
- endpoint deprecated banner
- spec fetch error
- long URLs wrap in code with horizontal scroll
- dark theme
### Accessibility
- Endpoint list is a listbox or nav with aria-current
- Method badges include the method as text, never colour alone
- Tables have headers and captions
- Code block is focusable with a labelled copy button
- Language select is a labelled combobox
- Body text is 16px with line-height 1.5 (15px only inside dense tables), nothing renders below 12px, weights of 300 or lighter appear only at 24px and above, and uppercase is limited to short labels with at least 0.05em tracking.
Verified contrast: body text on white: #18181b on #ffffff = 17.72:1; muted text on panel: #6b6f73 on #f7f7f7 = 4.73:1; GET badge: #1d4ed8 on #e0ecff = 5.62:1; POST badge: #166534 on #dcfce7 = 6.49:1; PUT badge text on white: #9a3412 on #ffffff = 7.31:1; code on dark: #e5e7eb on #1e2124 = 13.07:1; focus ring on white: #16a34a on #ffffff = 3.30:1.
### Security
- Never embed a real key in samples; use a clearly fake placeholder
- Mask API key values if the user pastes one into a try-it box
- Escape all description text from the spec
- The API keys button links to key management rather than showing keys
### Performance & SEO
Load the spec once and memoise; lazy-load syntax highlighting. Docs pages could be indexable if public; in-app route is noindex.
### Guardrails
- Keep the example next to the docs for side-by-side reading
- Fill the example with the user's chosen workflow
- Show required markers and defaults in the tables
- Colour-code methods consistently
- Use the product name Nubrio and fresh, generic copy throughout; all people, companies, amounts and IDs are invented, and no third-party brand, logo or wordmark appears.
- Keep components small and typed (no `any`), and surface every failure visibly instead of swallowing it.
Acceptance criteria:
- [ ] Endpoint switching and deep links work
- [ ] Code updates with workflow, version and language
- [ ] Tables render every param
- [ ] Responsive at 390px
- [ ] Contrast pairs pass