UI UX Design and Prototyping

Turn Your Backend API Into a Working UI Prototype

A backend developer can make an invitation screen respond to clicks and still have no idea whether anyone understands it. I would start with one browser-based task, a deliberately fake outcome, and a repeatable observation plan—not a design system or a live invitation API. That order keeps the first prototype cheap to change and makes its failures visible before they become implementation decisions.

One invitation task gives the prototype a reason to exist

Choose a task narrow enough to finish in one sitting: “Invite a teammate by email, then tell me whether the invitation went through.” Write that sentence before opening an editor. The participant’s goal is to interpret the result, not merely to press a button. Your success condition is equally concrete: they enter an address, submit it, and correctly describe the confirmation. An error-path task asks them to recover after a failed request.

Build Your First Testable UI Prototype From Scratch is a useful screen-building starting point, but I would define the task first because a working screen without an observable outcome gives you little basis for changing it. Put the task and success condition in a short README. Add the exact prompts you will read aloud, and avoid coaching the participant toward the button or the message.

For this first pass, sketch only three states: an untouched form, a request in progress, and a result. The result needs both success and failure variants. A backend developer may be tempted to model every server response immediately; I would not do that, because extra states increase the amount of UI you must explain before you have learned whether the basic invitation flow makes sense. Keep an explicit note that the prototype does not send email.

Set a provisional 90-second task cutoff for your first sessions, then change it if the pilot shows that reading the prompt consumes too much of it. This is a local observation limit, not a universal usability threshold. Record whether people complete the task and what they believe happened; elapsed time matters only alongside those observations. Someone who submits quickly but thinks the email was delivered when the interface says “queued” has exposed a more useful problem than a slow click.

A fake outcome is the right dependency for the first runnable screen

Use Node.js 24 LTS, npm, and Vite’s vanilla JavaScript template so the prototype has a local server and an ordinary DOM. Run npm create vite@latest invite-prototype — –template vanilla, change into the new directory, and run npm install. Keep Vite’s generated index.html, replace src/main.js with the code below, and run npm run dev. Open the local address Vite prints. The exact package versions belong in package-lock.json, so commit that file with the prototype.

const root = document.querySelector('#app');
root.innerHTML = `<main><h1>Invite a teammate</h1><form><label for="email">Email address</label><input id="email" name="email" type="text"><button>Send invite</button></form><p role="status"></p></main>`;
const form = root.querySelector('form');
const status = root.querySelector('[role="status"]');
form.addEventListener('submit', async (event) => {
  event.preventDefault();
  const email = String(new FormData(form).get('email')).trim();
  if (!email.includes('@')) { status.textContent = 'Enter an email address.'; return; }
  status.textContent = 'Preview: sending invitation…';
  await new Promise((resolve) => setTimeout(resolve, 350));
  status.textContent = email.endsWith('@example.invalid')
    ? 'Preview: request failed. Change address and retry.'
    : `Preview: invitation queued for ${email}.`;
});

The 350-millisecond pause is an adjustable simulation value, not a measurement of your eventual API. An address ending in @example.invalid produces the failure state; another address produces a queued state. The reserved .invalid domain makes the failure trigger easy to share without implying that an invitation was delivered. The email check is intentionally crude because this prototype tests comprehension of the flow, not production-grade address validation.

This is also where the choice between Figma and Vite becomes practical. Figma wins when a team needs to compare layout directions rapidly: moving a label costs less than editing and reviewing code. Its cost here is that a clickable frame does not exercise HTML form behavior or a live status message. Vite with vanilla JavaScript wins when you need to watch someone use a real input, button, and keyboard; its cost is writing and maintaining even this small amount of interface code. For a backend developer’s first invitation test, I would pay the Vite cost because the browser behavior is part of the question.

Do not connect the real invitation endpoint yet. A live service introduces credentials, email delivery, and data cleanup, while none of those dependencies helps determine whether “queued” is understood. If the next question becomes whether the UI handles actual HTTP responses, describe 202 Accepted and a failure response such as 503 Service Unavailable in an OpenAPI 3.1 contract, then use Mock Service Worker 2 to intercept requests. That is a deliberate second step: it replaces the inline simulation without requiring a production service.

Browser checks should protect the task, not dictate the design

Before inviting anyone to try the page, use the keyboard yourself. Tab to the email field and button, submit an empty value, and check that the message changes. The visible label gives the input an accessible name, and role=”status” makes result changes available as a polite announcement to assistive technology. Those choices follow the intent of WCAG 2.2, but they do not establish that the whole page conforms to it. Check the rendered page with Chrome DevTools as well; the code is short enough that an unexpected DOM state should be investigated, not ignored.

Install @playwright/test as a development dependency and install its Chromium browser with npx playwright install chromium. A first Playwright check should load the page, fill the field, click “Send invite,” and expect the queued text. A second should enter an address ending in @example.invalid and expect the failure text. Start Vite in one terminal and run npx playwright test in another. Playwright’s documented default test timeout is 30 seconds; that vendor-published limit prevents a stalled test from running indefinitely, but it says nothing about how long a person should need to understand the screen.

Add @axe-core/playwright when those checks run reliably. It can flag detectable issues such as missing names, but a passing automated accessibility scan cannot tell you whether “invitation queued” sounds like “email sent” to a participant. Likewise, a green Playwright test establishes that your chosen text appeared after a click; it cannot establish that the text answered the participant’s question. Keep those responsibilities separate so the tests protect the mechanics without freezing an unclear message in place.

For the observation itself, ask someone unfamiliar with the prototype to complete the README task. Do not explain the simulated outcome until the attempt ends. Note where they pause, what they say the result means, and whether they notice the failure message. Then ask them to try the failure address and recover by changing it. If your notes show three completed tasks out of five observed sessions, that is a measured result for those sessions—not an estimate of how all users will behave. Save the counts alongside the comments so an apparent improvement can be checked against what people actually did.

Observed confusion should decide when the contract becomes real

After each session, separate three kinds of finding. A task problem means the participant could not tell what action to take. A message problem means they acted correctly but misread “queued” or “failed.” A mechanical problem means focus, submission, or the status update did not behave as expected. This classification matters because each problem has a different fix: changing the API cannot repair an unclear label, and rewriting copy cannot repair a button that fails under keyboard use.

I would treat UI UX Prototyping for Software Projects: Best Practices as a review checklist after the first observed run rather than as a gate before it, because actual hesitation gives you a specific issue to review. If several participants mistake “queued” for “delivered,” change the message and rerun that task before adding another screen. If they understand the message but cannot recover from failure, make the recovery action clearer. Keep the old wording in the commit history so the reason for the change survives.

Only then promote the fake outcome into a mocked request. Make the contract state whether 202 Accepted means an invitation is queued, and decide what the UI says if a later delivery attempt fails. That distinction matters because an asynchronous backend cannot honestly promise delivery at submit time. Use Mock Service Worker to return the documented responses locally, and keep Playwright focused on what appears in the browser. When those cases are stable, point the prototype at a non-production service if you need to test integration. The mock remains useful as a reproducible failure case even after that switch.

Do not turn the prototype into the production frontend by default. Its purpose is to settle task language and interaction behavior; production authentication, validation, and service boundaries may demand a different implementation. Preserve the README prompts, response contract, observation notes, and browser checks. They explain which decisions were tested, while the small prototype remains replaceable.

Your first commit should contain a task someone else can run

Create the Vite project, paste in the form, and write the invitation prompt in the README before adjusting its appearance. Verify both outcomes yourself, then hand the prompt to one person without demonstrating the screen. Record their interpretation of “queued” verbatim. That first answer will tell you whether to edit the message, the interaction, or neither—and gives the next commit a reason beyond making the prototype look finished.