Frontend School

Product Configuration Wizard

Machine Coding
medium

Product Configuration Wizard

Medium
React
Forms
State Management
UI/UX
Conditional Rendering

Overview

As part of an e-commerce platform, users often need to configure complex products or services through a guided process. This problem asks you to build a multi-step "Product Configuration Wizard" that allows users to select options for a software package. This ensures a smooth, error-free user experience by breaking down choices into manageable steps.

What you need to do / Task

Your task is to implement a React component called ProductConfigurator that guides a user through a 3-step process:

  1. User Details: Collect the user's Name and Email address.
  2. Plan Selection: Allow the user to choose a subscription plan (e.g., Basic, Pro, Enterprise) and optionally select additional features/add-ons.
  3. Review & Confirm: Display a summary of all selections made in the previous steps. Provide a "Confirm" button to finalize the configuration.

You must implement the navigation between these steps ("Next" and "Previous" buttons) and basic validation.

UI/UX expectations

  • Step Indicator: Clearly display the current step (e.g., "Step 1 of 3").
  • Navigation Buttons: Provide "Next" and "Previous" buttons. The "Previous" button should be disabled on the first step. The "Next" button should be disabled if the current step's required fields are not filled or invalid.
  • Form Fields: Use appropriate HTML input types (text, email, radio, checkbox) for each step.
  • Review Summary: On the review step, clearly list all selected user details, plan, and add-ons.
  • Confirmation: After clicking "Confirm" on the review step, transition to a success message display, showing that the configuration has been submitted.
  • Basic Styling: Ensure the UI is readable and functional. Minimal styling is provided in styles.css; you may enhance it if time permits.

Acceptance criteria

  • The wizard correctly navigates forward through steps via the "Next" button.
  • The wizard correctly navigates backward through steps via the "Previous" button (except from step 1).
  • All form inputs (Name, Email, Plan, Add-ons) correctly update the application's state.
  • The "Next" button for Step 1 is disabled if Name or Email fields are empty.
  • The "Next" button for Step 2 is disabled if no plan is selected.
  • The Review step accurately displays the user's chosen name, email, plan, and selected add-ons.
  • Clicking "Confirm Configuration" on the Review step transitions the UI to a success message.
  • The application does not crash or show unhandled errors during interaction.

Constraints

Constraints & assumptions

  • You should use React functional components and hooks (useState, useReducer, etc.).
  • No external state management libraries (e.g., Redux, Zustand) are required.
  • Focus on core functionality; advanced accessibility (e.g., ARIA roles beyond standard form elements) and complex error handling (e.g., regex for email validation beyond type="email") are not required.
  • No API calls or data persistence (e.g., local storage, database) are needed.
  • The provided plans and addons mock data should be used.

Out of scope

  • Complex routing (e.g., using react-router-dom).
  • Server-side interactions or database integration.
  • Extensive visual design or animations.
  • Time-consuming optimizations.

What interviewers evaluate

  • React Fundamentals: Effective use of React state management for a multi-step form and controlled components.
  • Component Design: Logical decomposition of the UI into reusable or distinct components.
  • Conditional Rendering: Correct implementation of showing/hiding UI elements based on state (steps, validation, success).
  • Form Handling & Validation: Ability to manage form input changes and implement basic client-side validation logic.
  • Code Quality: Clean, readable, and maintainable code structure.

Loading editor...