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

R
Replay Team
Developer Advocates

TL;DR: Convert any web app screen recording into a fully functional, serverless SolidJS application using Replay's AI-powered video-to-code engine.

Stop manually transcribing user flows and struggling to recreate complex UI interactions. Replay offers a revolutionary approach: behavior-driven reconstruction. Instead of relying on static screenshots, Replay analyzes video recordings of your web app in action and uses Gemini to generate clean, functional code. This means you can go from a video demo to a working SolidJS application in a fraction of the time.

Understanding Behavior-Driven Reconstruction#

Traditional screenshot-to-code tools only capture visual elements. They don't understand user intent or the underlying logic driving the UI. Replay, on the other hand, employs behavior-driven reconstruction. It analyzes the video to understand:

  • User clicks and interactions
  • Data flow and state changes
  • Navigation patterns
  • Dynamic content updates

This deeper understanding allows Replay to generate code that accurately reflects the intended functionality of the web app.

Why SolidJS?#

SolidJS is a declarative JavaScript library for building user interfaces. It's known for its performance, simplicity, and reactivity. SolidJS is a perfect choice for building modern, efficient web applications. Its fine-grained reactivity system ensures that only the necessary parts of the UI are updated when data changes, leading to faster rendering and a smoother user experience.

Building a Serverless SolidJS App from Video with Replay#

Here's how you can leverage Replay to transform a web app video into a serverless SolidJS application:

Step 1: Record Your Web App in Action#

The first step is to create a clear video recording of your web app's functionality. Focus on capturing the key user flows and interactions you want to recreate in your SolidJS app. Make sure the video is well-lit and the UI elements are clearly visible. The better the video quality, the more accurate the generated code will be.

💡 Pro Tip: Narrate the video while recording. This provides valuable context for Replay's AI engine and can further improve the accuracy of the generated code.

Step 2: Upload the Video to Replay#

Once you have your video, upload it to the Replay platform. Replay supports various video formats and resolutions.

Step 3: Configure Replay Settings#

After uploading the video, you'll need to configure a few settings to optimize the code generation process. These settings include:

  • Framework: Select "SolidJS" as the target framework.
  • Serverless Provider: Choose your preferred serverless provider (e.g., Netlify, Vercel, AWS Lambda).
  • Supabase Integration: If your app uses Supabase, configure the integration to automatically connect your SolidJS app to your Supabase database.
  • Style Injection: Choose how you want styles to be handled (e.g., CSS modules, styled components).

Step 4: Generate the Code#

With the settings configured, click the "Generate Code" button. Replay will analyze the video and generate the SolidJS code for your application. This process may take a few minutes, depending on the length and complexity of the video.

Step 5: Review and Refine the Code#

Once the code generation is complete, you'll be presented with a preview of the generated SolidJS code. Carefully review the code to ensure it accurately reflects the intended functionality of your web app.

📝 Note: While Replay strives for 100% accuracy, some manual adjustments may be necessary to fine-tune the code and address any edge cases.

Here's a snippet of what the generated SolidJS code might look like:

typescript
// src/components/TodoItem.tsx import { createSignal } from 'solid-js'; interface TodoItemProps { id: number; text: string; completed: boolean; onToggle: (id: number) => void; onDelete: (id: number) => void; } const TodoItem = (props: TodoItemProps) => { const [isCompleted, setIsCompleted] = createSignal(props.completed); const toggleComplete = () => { props.onToggle(props.id); setIsCompleted(!isCompleted()); }; const deleteTodo = () => { props.onDelete(props.id); }; return ( <li> <input type="checkbox" checked={isCompleted()} onChange={toggleComplete} /> <span>{props.text}</span> <button onClick={deleteTodo}>Delete</button> </li> ); }; export default TodoItem;

Step 6: Deploy to Your Serverless Provider#

After reviewing and refining the code, you can deploy your SolidJS app to your chosen serverless provider. Follow the deployment instructions provided by your provider.

Key Features of Replay#

  • Multi-Page Generation: Replay can generate code for multi-page applications, accurately capturing navigation flows and data transfer between pages.
  • Supabase Integration: Seamlessly integrate your SolidJS app with Supabase for backend functionality, including authentication, database management, and real-time updates.
  • Style Injection: Replay supports various styling methods, including CSS modules, styled components, and inline styles, allowing you to customize the look and feel of your app.
  • Product Flow Maps: Visualize the user flows captured in the video with automatically generated product flow maps, providing valuable insights into user behavior.

Replay vs. Traditional Screenshot-to-Code Tools#

FeatureScreenshot-to-Code ToolsReplay
InputStatic ScreenshotsVideo Recordings
Behavior Analysis
User IntentIgnoredAnalyzed and Replicated
Dynamic ContentNot SupportedFully Supported
Multi-Page AppsLimited Support
Code AccuracyLowerHigher due to behavior-driven reconstruction
Serverless SupportOften LimitedExcellent, optimized for serverless deployments

⚠️ Warning: Replay requires a clear and well-recorded video to generate accurate code. Poor video quality can result in inaccurate or incomplete code.

Addressing Common Concerns#

  • Code Quality: Replay generates clean, well-structured code that adheres to industry best practices. However, it's important to review and refine the code to ensure it meets your specific requirements.
  • Accuracy: Replay's behavior-driven reconstruction significantly improves code accuracy compared to screenshot-to-code tools. However, manual adjustments may still be necessary to address edge cases and fine-tune the functionality.
  • Security: Replay prioritizes security and ensures that your data is protected throughout the code generation process.

Benefits of Using Replay#

  • Faster Development: Accelerate your development process by automatically generating code from video recordings.
  • Improved Accuracy: Capture user intent and dynamic behavior for more accurate code generation.
  • Reduced Manual Effort: Minimize manual coding and transcription, freeing up your time to focus on higher-level tasks.
  • Enhanced Collaboration: Share video recordings and generated code with your team for improved collaboration and knowledge sharing.
  • Rapid Prototyping: Quickly prototype new features and functionalities by recording video demos and generating code with Replay.

Here's another code snippet illustrating how Replay might generate code for handling form submissions in SolidJS with Supabase integration:

typescript
// src/components/ContactForm.tsx import { createSignal } from 'solid-js'; import { createClient } from '@supabase/supabase-js'; const supabaseUrl = import.meta.env.VITE_SUPABASE_URL; const supabaseKey = import.meta.env.VITE_SUPABASE_ANON_KEY; const supabase = createClient(supabaseUrl, supabaseKey); const ContactForm = () => { const [name, setName] = createSignal(''); const [email, setEmail] = createSignal(''); const [message, setMessage] = createSignal(''); const [isSubmitting, setIsSubmitting] = createSignal(false); const [submissionError, setSubmissionError] = createSignal<string | null>(null); const [submissionSuccess, setSubmissionSuccess] = createSignal(false); const handleSubmit = async (event: Event) => { event.preventDefault(); setIsSubmitting(true); setSubmissionError(null); try { const { data, error } = await supabase .from('contacts') .insert([{ name: name(), email: email(), message: message() }]); if (error) { throw new Error(error.message); } setSubmissionSuccess(true); setName(''); setEmail(''); setMessage(''); } catch (error: any) { setSubmissionError(error.message); } finally { setIsSubmitting(false); } }; return ( <form onSubmit={handleSubmit}> {submissionSuccess() && <p>Thank you! Your message has been sent.</p>} {submissionError() && <p>Error: {submissionError()}</p>} <div> <label htmlFor="name">Name:</label> <input type="text" id="name" value={name()} onChange={(e) => setName(e.target.value)} required /> </div> <div> <label htmlFor="email">Email:</label> <input type="email" id="email" value={email()} onChange={(e) => setEmail(e.target.value)} required /> </div> <div> <label htmlFor="message">Message:</label> <textarea id="message" value={message()} onChange={(e) => setMessage(e.target.value)} required></textarea> </div> <button type="submit" disabled={isSubmitting()}> {isSubmitting() ? 'Submitting...' : 'Send Message'} </button> </form> ); }; export default ContactForm;

Frequently Asked Questions#

Is Replay free to use?#

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

How is Replay different from v0.dev?#

While both Replay and v0.dev aim to accelerate UI development, they differ significantly in their approach. v0.dev uses AI to generate UI components based on text prompts. Replay, on the other hand, analyzes video recordings to reconstruct entire applications, capturing user behavior and dynamic interactions. Replay focuses on understanding how the app is used, not just what it looks like.

What types of web apps can Replay handle?#

Replay can handle a wide range of web apps, from simple landing pages to complex e-commerce platforms. It supports various UI frameworks and libraries, including React, Vue.js, and SolidJS.


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