Back to Blog
January 6, 20269 min readReplay vs DhiWise

Replay vs DhiWise for UI Development: Which AI Handles API Integrations Better?

R
Replay Team
Developer Advocates

TL;DR: Replay offers a more robust and intuitive solution for UI development with API integrations by leveraging video analysis for behavior-driven reconstruction, surpassing DhiWise's static, template-based approach.

The promise of AI-powered UI development is here, but not all solutions are created equal. When choosing between tools like Replay and DhiWise, understanding their core functionalities and how they handle API integrations is crucial. While both aim to accelerate UI creation, their methodologies and capabilities differ significantly. This article explores the strengths and weaknesses of each, focusing on their ability to seamlessly integrate with APIs and adapt to real-world user behavior.

Understanding the Core Differences#

DhiWise focuses on generating code from design files (Figma, Adobe XD) and pre-built templates. It's a low-code platform that simplifies development for common UI patterns. Replay, on the other hand, takes a radical approach: it analyzes video recordings of user interactions to reconstruct working UI, complete with API integrations and dynamic behavior. This "Behavior-Driven Reconstruction" provides a more accurate and adaptable solution, as it understands the intent behind user actions, not just the visual representation.

Let's break down the key differentiators in a comparison table:

FeatureDhiWiseReplay
Input SourceDesign files (Figma, Adobe XD), TemplatesVideo recordings of user interactions
API Integration ApproachManual configuration, pre-built connectorsAutomated detection and reconstruction based on user behavior
Behavior AnalysisLimited to design specificationsDeep analysis of user interactions and intent
Code GenerationTemplate-based, static codeDynamic, behavior-driven code
Supabase IntegrationAvailableSeamless, automated integration
Multi-page GenerationLimited, requires manual linkingFully automated, understands page flow
Style InjectionLimited, relies on design file stylesFlexible, allows custom styling and theming
Product Flow MapsNot AvailableAutomatically generated from video analysis
Adaptability to ChangesRequires design file updates and code modificationsAdapts automatically based on new video recordings

API Integration: A Deeper Dive#

The ability to seamlessly integrate with APIs is a cornerstone of modern UI development. Let's examine how DhiWise and Replay approach this critical aspect.

DhiWise: Template-Driven API Connections#

DhiWise offers a range of pre-built API connectors and allows developers to manually configure API endpoints and data mappings. This approach can be effective for simple use cases, but it often requires significant manual effort and can become cumbersome for complex applications with numerous API interactions.

Here's an example of how you might configure an API call in DhiWise:

  1. Select a pre-built API connector (e.g., REST API).
  2. Enter the API endpoint URL.
  3. Define the request method (GET, POST, PUT, DELETE).
  4. Specify the request headers and body.
  5. Map the API response data to UI elements.

This process requires a thorough understanding of the API's documentation and can be time-consuming, especially when dealing with complex data structures.

Replay: Behavior-Driven API Reconstruction#

Replay takes a completely different approach. By analyzing video recordings of user interactions, Replay can automatically detect API calls, understand their purpose, and reconstruct the necessary code to replicate the behavior. This is particularly powerful when dealing with complex user flows involving multiple API interactions.

For example, imagine a user signing up for an account, which involves:

  1. Submitting a registration form.
  2. Verifying their email address.
  3. Setting a password.

Replay can observe this entire flow from a video recording and automatically generate the code to handle each API call, including data validation, error handling, and UI updates.

Here's a simplified example of the kind of code Replay might generate after analyzing a video of a user submitting a form:

typescript
// Reconstructed API call from video analysis const handleSubmit = async (formData: any) => { try { const response = await fetch('/api/register', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(formData), }); if (!response.ok) { throw new Error('Registration failed'); } const data = await response.json(); console.log('Registration successful:', data); // Update UI to reflect successful registration } catch (error) { console.error('Error during registration:', error); // Display error message to the user } };

💡 Pro Tip: Replay's ability to infer API calls from user behavior dramatically reduces the manual effort required for API integration, especially in complex applications.

The Power of Video Analysis#

The key advantage of Replay lies in its ability to analyze video recordings. This allows it to capture the nuances of user behavior that are often missed by static design files or templates.

Consider these scenarios:

  • Dynamic data updates: A user filters a list of products based on various criteria. Replay can capture the API calls triggered by each filter selection and reconstruct the logic to update the UI accordingly.
  • Error handling: A user encounters an error while submitting a form. Replay can capture the error message displayed to the user and reconstruct the code to handle similar errors in the future.
  • A/B testing: You're testing different versions of a UI element. Replay can analyze video recordings of users interacting with each version and identify the version that leads to the best user experience.

📝 Note: By understanding the context of user actions, Replay can generate more accurate and adaptable code than traditional code generation tools.

Supabase Integration: A Case Study#

Supabase is a popular open-source Firebase alternative that provides a comprehensive backend-as-a-service solution. Both DhiWise and Replay offer integration with Supabase, but their approaches differ significantly.

DhiWise typically requires manual configuration of Supabase API endpoints and data mappings. Replay, on the other hand, can automatically detect Supabase API calls and reconstruct the necessary code to interact with your Supabase database. This includes:

  • Authentication: Replay can automatically detect user authentication flows and generate the code to handle user login, registration, and password management.
  • Data storage: Replay can automatically detect data storage operations and generate the code to create, read, update, and delete data in your Supabase database.
  • Real-time updates: Replay can automatically detect real-time data updates and generate the code to update the UI in real-time.

⚠️ Warning: While Replay automates a lot of the Supabase integration, always review the generated code to ensure it aligns with your security best practices.

Step-by-Step Example: Reconstructing a Login Flow with Replay#

Let's walk through a simplified example of how Replay can reconstruct a login flow from a video recording:

Step 1: Record the Login Flow#

Record a video of a user logging into your application. Make sure the video captures all the steps involved, including:

  1. Entering their username and password.
  2. Clicking the "Login" button.
  3. The UI updating to reflect the successful login.

Step 2: Upload the Video to Replay#

Upload the video recording to the Replay platform.

Step 3: Replay Analyzes the Video#

Replay will analyze the video and identify the key interactions, including:

  • The API call to authenticate the user.
  • The data submitted in the login form.
  • The UI updates that occur after successful login.

Step 4: Replay Generates the Code#

Replay will generate the code to replicate the login flow, including:

typescript
// Reconstructed login function from video analysis const handleLogin = async (username: string, password: string) => { try { const response = await fetch('/api/login', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ username, password }), }); if (!response.ok) { throw new Error('Login failed'); } const data = await response.json(); localStorage.setItem('token', data.token); // Store the token // Redirect to the dashboard or update the UI } catch (error) { console.error('Error during login:', error); // Display error message to the user } };

Step 5: Review and Customize the Code#

Review the generated code and customize it as needed. You can adjust the styling, add error handling, or modify the API calls to fit your specific requirements.

Benefit: Replay significantly accelerates the development process by automating the reconstruction of complex UI flows, including API integrations.

Replay vs. DhiWise: Which is Right for You?#

The choice between Replay and DhiWise depends on your specific needs and priorities.

Choose DhiWise if:

  • You have a well-defined design file and need to quickly generate code for common UI patterns.
  • You're comfortable with manual API configuration and data mapping.
  • You prefer a low-code platform with a visual interface.

Choose Replay if:

  • You want to capture the nuances of user behavior and create more dynamic and adaptable UIs.
  • You want to automate the process of API integration and data mapping.
  • You prioritize a behavior-driven approach to UI development.
  • You need to quickly reconstruct existing UIs from video recordings.

Frequently Asked Questions#

Is Replay free to use?#

Replay offers a free tier with limited features. Paid plans are available for more advanced features and higher usage limits.

How is Replay different from v0.dev?#

v0.dev focuses on generating UI components from text prompts. Replay analyzes video recordings to reconstruct entire UI flows, including API integrations and dynamic behavior. Replay understands user intent, while v0.dev focuses on visual output based on textual descriptions.

Can Replay handle complex authentication flows?#

Yes, Replay can analyze video recordings of complex authentication flows, including multi-factor authentication, and generate the code to replicate the behavior.

What types of videos can Replay analyze?#

Replay can analyze any video recording of a user interacting with a UI, including screen recordings, webcam recordings, and mobile app recordings.


Ready to try behavior-driven code generation? Get started with Replay - transform any video into working code in seconds.

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free