Back to Blog
January 4, 20267 min readHow to Recreate

How to Recreate a Modern Travel Booking Platform from Video to Next.js with Replay (2026)

R
Replay Team
Developer Advocates

TL;DR: Recreate a fully functional, multi-page Next.js travel booking platform from a simple screen recording using Replay's video-to-code engine, leveraging behavior-driven reconstruction and Supabase integration.

The age of static, screenshot-driven code generation is over. We're entering an era where behavior dictates the code, not just the visual representation. If you're still manually coding UI based on design mockups, you're operating at a severe disadvantage. I'm going to show you how to build a complex application, a travel booking platform, from a simple video using Replay.

The Problem: Static Design vs. Dynamic Behavior#

Traditional UI development is inherently flawed. We start with static designs (Figma, Sketch, etc.) and painstakingly translate them into code. This process is:

  • Time-consuming: Manually coding each component and interaction.
  • Error-prone: Discrepancies between design and implementation are inevitable.
  • Inflexible: Adapting to user feedback requires significant rework.
  • Lacks Context: Designs don't capture the user's intent or the flow of interactions.

Screenshot-to-code tools attempt to solve this, but they fundamentally misunderstand the problem. They only capture the visual state, not the behavioral state. They don't understand the why behind the user's actions.

The Solution: Behavior-Driven Reconstruction with Replay#

Replay takes a fundamentally different approach. Instead of analyzing screenshots, it analyzes video. This allows it to understand:

  • User flows across multiple pages
  • Input field interactions and data entry
  • Button clicks and their resulting actions
  • Animations and transitions

Replay then uses this behavioral data to reconstruct a fully functional UI, complete with:

  • Multi-page navigation
  • Working form elements
  • Database integrations (e.g., Supabase)
  • Styling (CSS-in-JS, Tailwind, etc.)

This is "Behavior-Driven Reconstruction" – the video becomes the single source of truth, ensuring that the code accurately reflects the intended user experience.

FeatureScreenshot-to-CodeReplay
Input SourceStatic ScreenshotsDynamic Video
Behavior Analysis
Multi-Page SupportLimitedFull
Database IntegrationManualAutomated (Supabase)
Style InjectionLimitedFull
Product Flow Maps

Recreating a Travel Booking Platform: Step-by-Step#

Let's recreate a modern travel booking platform using Replay, starting with a video recording of a user interacting with a hypothetical platform. This video should demonstrate key features:

  • Searching for flights/hotels
  • Selecting dates and number of travelers
  • Viewing search results
  • Selecting a specific flight/hotel
  • Entering passenger details
  • Proceeding to checkout

Here's how to transform that video into a working Next.js application:

Step 1: Upload and Analyze the Video#

Upload your video recording to the Replay platform. Replay will automatically analyze the video, identifying UI elements, user interactions, and page transitions. This process typically takes a few minutes, depending on the length and complexity of the video.

💡 Pro Tip: Ensure your video is clear and stable. Avoid excessive mouse movements or distractions. The cleaner the video, the better the results.

Step 2: Configure Project Settings#

Once the analysis is complete, you'll be prompted to configure project settings:

  • Framework: Select Next.js.
  • Styling: Choose your preferred styling solution (e.g., CSS-in-JS, Tailwind CSS).
  • Database: Connect your Supabase instance. Replay will automatically generate database schemas and API endpoints based on the data entered in the video.
  • Authentication: Configure authentication using Supabase Auth.

Step 3: Review and Refine the Generated Code#

Replay will generate a complete Next.js project, including:

  • Page components for each screen in the video
  • React components for UI elements (buttons, forms, etc.)
  • API routes for data fetching and manipulation
  • Supabase database schema and functions
  • Styling based on your chosen solution

Review the generated code and make any necessary refinements. Replay provides a visual editor that allows you to easily modify UI elements, adjust styling, and fine-tune interactions.

📝 Note: While Replay strives for pixel-perfect accuracy, some manual adjustments may be required, especially for complex animations or custom UI elements.

Step 4: Integrate Supabase and Implement Dynamic Data#

Replay automatically integrates with your Supabase instance, creating the necessary database tables and API endpoints. For our travel booking platform, this might include tables for:

  • text
    flights
  • text
    hotels
  • text
    bookings
  • text
    users

Replay also generates Supabase functions to handle data fetching and manipulation. Here's an example of a generated function for fetching available flights:

typescript
// Generated by Replay import { createClient } from '@supabase/supabase-js'; const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL; const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY; const supabase = createClient(supabaseUrl, supabaseKey); export const getFlights = async (destination: string, date: string) => { const { data, error } = await supabase .from('flights') .select('*') .eq('destination', destination) .eq('date', date); if (error) { console.error('Error fetching flights:', error); return []; } return data; };

This function can be easily integrated into your Next.js components to display dynamic flight data.

Step 5: Implement User Authentication and Booking Logic#

Replay's Supabase integration simplifies user authentication. You can use Supabase Auth to handle user registration, login, and session management.

To implement booking logic, you'll need to create API endpoints to handle booking requests. Replay can generate basic API endpoints, which you can then customize to implement more complex logic, such as:

  • Payment processing
  • Confirmation emails
  • Booking management

⚠️ Warning: Always validate user input and sanitize data to prevent security vulnerabilities.

Step 6: Deploy and Iterate#

Once you're satisfied with the application, deploy it to a hosting platform like Vercel or Netlify. Continuously monitor user feedback and iterate on the design and functionality. With Replay, you can easily update the application based on new video recordings, ensuring that it always reflects the intended user experience.

Benefits of Behavior-Driven Development with Replay#

  • Faster Development: Generate working code in minutes, not days.
  • Reduced Errors: Ensure consistency between design and implementation.
  • Increased Flexibility: Easily adapt to user feedback and iterate on the design.
  • Improved User Experience: Create applications that are truly user-centered.
  • Better Understanding of User Intent: Replay captures the 'why' behind user actions, leading to more intuitive UI.

Why This is the Future#

The traditional design-to-code workflow is fundamentally broken. It's slow, error-prone, and inflexible. Replay offers a better way – a way that puts the user at the center of the development process. By analyzing video recordings of user interactions, Replay can generate working code that accurately reflects the intended user experience.

This is not just about saving time. It's about building better applications – applications that are more user-friendly, more intuitive, and more effective. It's about shifting the focus from static designs to dynamic behavior.

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 usage. Check the Replay website for current pricing.

How is Replay different from v0.dev?#

v0.dev focuses on AI-powered component generation from text prompts. Replay focuses on reconstructing entire applications from video recordings, capturing user behavior and flow. Replay excels at understanding multi-page applications and complex interactions, while v0.dev is better for generating individual components.

What types of videos can Replay process?#

Replay can process screen recordings of web applications, mobile applications, and even desktop applications. The video should be clear and stable, with minimal distractions.

What if the generated code isn't perfect?#

Replay strives for pixel-perfect accuracy, but some manual adjustments may be required, especially for complex animations or custom UI elements. Replay provides a visual editor that allows you to easily modify the generated code.

Does Replay support other databases besides Supabase?#

Currently, Replay has native integration with Supabase. Support for other databases is planned for future releases. However, you can always customize the generated code to integrate with any database.


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