Back to Blog
January 5, 20268 min readHow to Convert

How to Convert A Web App Video to a Serverless SolidJS App Using Replay AI for better UI

R
Replay Team
Developer Advocates

TL;DR: Replay AI lets you convert web app videos into fully functional serverless SolidJS applications, leveraging behavior-driven reconstruction for accurate UI and logic generation.

The age of manually coding UI from scratch is rapidly fading. Imagine being able to record a video of your desired web app behavior and have a fully functional, serverless application generated automatically. This is now a reality with Replay AI.

The Problem: From Idea to Working Code is Too Slow#

Developing a UI is often a tedious process. You iterate through designs, write code, test, and repeat. Existing screenshot-to-code tools can offer a starting point, but they often fail to capture the dynamic behavior and underlying logic that makes a UI truly functional. They see the "what," not the "why."

This is where Replay steps in, offering a groundbreaking approach based on Behavior-Driven Reconstruction. Instead of relying on static screenshots, Replay analyzes videos of user interactions to understand the intent behind the UI.

Replay: Video as the Source of Truth#

Replay leverages the power of Gemini to reconstruct working UI from screen recordings. This means you can simply record yourself using a web app, and Replay will generate the corresponding code, capturing not just the visual appearance, but also the interactive behavior.

Here’s how Replay stacks up against traditional and more recent UI generation tools:

FeatureScreenshot-to-Codev0.devReplay
Video Input
Behavior AnalysisPartial
Multi-Page GenerationLimitedLimited
Supabase IntegrationRequires manual setupRequires manual setup
Style InjectionLimitedLimited
Product Flow Maps
Serverless DeploymentManualManualConfigurable
SolidJS SupportLimitedLimited

As you can see, Replay distinguishes itself through its video-centric approach, behavior analysis, and comprehensive feature set tailored for modern web development.

Building a Serverless SolidJS App from a Video: A Step-by-Step Guide#

Let's walk through the process of converting a web app video into a serverless SolidJS application using Replay. For this example, we'll assume you have a video recording of a simple to-do list application being used. The video should demonstrate adding tasks, marking them as complete, and deleting them.

Step 1: Preparing Your Video#

The quality of your video is crucial for accurate reconstruction. Here are some tips:

  • Clear and Stable Recording: Ensure the video is clear, well-lit, and free from excessive shaking.
  • Focus on User Interactions: Clearly demonstrate all the key user interactions you want to capture.
  • Avoid Distractions: Minimize distractions in the background and on the screen.

💡 Pro Tip: A short, focused video is better than a long, rambling one. Aim for a video that clearly showcases the core functionality you want to replicate.

Step 2: Uploading to Replay#

  1. Go to the Replay platform (https://replay.build).
  2. Create an account or log in.
  3. Upload your video file. Replay supports various video formats (MP4, MOV, etc.).

Step 3: Configuring the Reconstruction#

After uploading, Replay will process the video and present you with configuration options. This is where you can fine-tune the reconstruction process:

  • Select Target Framework: Choose SolidJS as your target framework.
  • Define Pages: If your video demonstrates multiple pages or views, define the boundaries between them. Replay's multi-page generation feature will create separate components for each page.
  • Supabase Integration: If your app uses Supabase for backend services, provide your Supabase credentials. Replay will automatically generate the necessary code for data fetching and persistence.
  • Style Injection: Choose your preferred styling method (CSS modules, Tailwind CSS, etc.). Replay will inject the appropriate styles into the generated components.

Step 4: Generating the Code#

Once you've configured the reconstruction, click the "Generate Code" button. Replay will analyze the video, identify UI elements, understand user interactions, and generate the SolidJS code. This process may take a few minutes, depending on the length and complexity of the video.

Step 5: Reviewing and Refining the Code#

After the code generation is complete, Replay will present you with a preview of the generated application. Review the code and make any necessary adjustments.

  • Component Structure: Verify that the generated components are logically structured and well-organized.
  • Event Handlers: Check that event handlers (e.g.,
    text
    onClick
    ,
    text
    onChange
    ) are correctly wired up.
  • Data Binding: Ensure that data binding is working as expected.

📝 Note: While Replay strives for perfect accuracy, manual refinement may be necessary, especially for complex UIs.

Step 6: Deploying to a Serverless Environment#

Replay is designed to generate code that is easily deployable to serverless environments like Vercel or Netlify. Here's an example of how to deploy to Vercel:

  1. Initialize a Git Repository: Create a new Git repository for your project.
    bash
    git init
  2. Commit the Code: Commit the generated code to the repository.
    bash
    git add . git commit -m "Initial commit from Replay"
  3. Create a Vercel Project: Create a new project on Vercel and connect it to your Git repository.
  4. Configure Deployment Settings: Configure the deployment settings on Vercel, such as the build command and output directory. For a SolidJS project, the build command is typically
    text
    npm run build
    or
    text
    yarn build
    , and the output directory is
    text
    dist
    .
  5. Deploy: Deploy your project to Vercel. Vercel will automatically build and deploy your application.

Example Code Snippet (Generated by Replay)#

Here's an example of a SolidJS component generated by Replay for our to-do list application:

typescript
import { createSignal, For } from 'solid-js'; interface Todo { id: number; text: string; completed: boolean; } const TodoList = () => { const [todos, setTodos] = createSignal<Todo[]>([ { id: 1, text: 'Learn SolidJS', completed: false }, { id: 2, text: 'Build a Replay demo', completed: true }, ]); const [newTodo, setNewTodo] = createSignal(''); const addTodo = () => { if (newTodo().trim() !== '') { setTodos([...todos(), { id: Date.now(), text: newTodo(), completed: false }]); setNewTodo(''); } }; const toggleComplete = (id: number) => { setTodos(todos().map(todo => todo.id === id ? { ...todo, completed: !todo.completed } : todo )); }; const deleteTodo = (id: number) => { setTodos(todos().filter(todo => todo.id !== id)); }; return ( <div> <h1>Todo List</h1> <input type="text" value={newTodo()} onChange={e => setNewTodo(e.target.value)} onKeyDown={e => e.key === 'Enter' ? addTodo() : null} /> <button onClick={addTodo}>Add</button> <ul> <For each={todos()}> {todo => ( <li> <input type="checkbox" checked={todo.completed} onChange={() => toggleComplete(todo.id)} /> <span style={{ textDecoration: todo.completed ? 'line-through' : 'none' }}> {todo.text} </span> <button onClick={() => deleteTodo(todo.id)}>Delete</button> </li> )} </For> </ul> </div> ); }; export default TodoList;

This code snippet demonstrates how Replay can generate functional SolidJS components with state management, event handling, and data binding.

Benefits of Using Replay#

  • Faster Development: Significantly reduce the time it takes to build UIs.
  • Improved Accuracy: Capture dynamic behavior and underlying logic.
  • Reduced Manual Coding: Minimize the amount of code you need to write manually.
  • Enhanced Collaboration: Easily share and iterate on UI designs.
  • Behavior-Driven Development: Focus on user behavior and intent.

⚠️ Warning: Replay is a powerful tool, but it's not a replacement for skilled developers. It's designed to augment your workflow and accelerate the development process, not to eliminate the need for human expertise.

Frequently Asked Questions#

Is Replay free to use?#

Replay offers a free tier with limited usage. Paid plans are available for higher usage and access to advanced features. Check the Replay website for the latest pricing information.

How is Replay different from v0.dev?#

While both tools aim to accelerate UI development, Replay distinguishes itself through its video-centric approach and behavior analysis. v0.dev primarily relies on text prompts and generates code based on those prompts. Replay, on the other hand, analyzes videos of user interactions to understand the intent behind the UI, resulting in more accurate and functional code. Replay also offers tighter integrations with backend services like Supabase, and can generate multi-page applications directly from a single video.

What frameworks does Replay support?#

Currently, Replay supports React, Vue.js, and SolidJS. Support for other frameworks is planned for future releases.

What types of applications can I build with Replay?#

Replay is suitable for building a wide range of web applications, from simple landing pages to complex dashboards. The key is to have a clear video demonstrating the desired user interactions.


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