Back to Blog
January 5, 20267 min readHow to convert

How to convert UI/UX video to a Full-Stack Angular App with NestJS and Replay

R
Replay Team
Developer Advocates

TL;DR: Learn how to convert a UI/UX video recording into a functional Angular frontend and NestJS backend application using Replay's behavior-driven code generation.

Turning UI/UX designs into functional code is traditionally a slow, manual process. Prototypes often live in design tools, disconnected from the actual codebase. Screenshot-to-code tools offer some help, but they lack the understanding of user behavior – the core of a great application. This is where Replay changes the game. Replay analyzes video recordings of user interactions, understands the intended behavior, and generates full-stack code that reflects that intent. In this guide, we'll walk through converting a UI/UX video into a working Angular frontend with a NestJS backend.

From Video to Angular & NestJS: A Behavior-Driven Approach#

The problem with traditional UI development is the disconnect between design and implementation. Designers create prototypes, and developers then painstakingly translate those prototypes into code. This process is prone to errors, misinterpretations, and wasted time. Replay addresses this by using video as the source of truth, capturing not just the visual design but also the behavior of the application.

Step 1: Capturing the UI/UX Video#

The first step is to record a video of the desired UI/UX flow. This video should clearly demonstrate the user interactions, navigation, and data inputs. The more detail captured in the video, the better Replay can understand the intended behavior.

💡 Pro Tip: Narrate your actions while recording. This provides Replay with additional context and improves accuracy.

Step 2: Uploading and Processing the Video with Replay#

Once you have your video, upload it to Replay. Replay's engine uses Gemini to analyze the video, identify UI elements, and understand the relationships between them. It then generates code for both the frontend (Angular) and the backend (NestJS), based on the observed behavior.

📝 Note: The processing time depends on the length and complexity of the video.

Step 3: Reviewing and Refining the Generated Code#

After processing, Replay presents you with the generated code. This code is structured, well-commented, and ready to be integrated into your existing project. You can review and refine the code as needed, making any necessary adjustments to match your specific requirements.

Step 4: Setting up the Angular Frontend#

Replay generates an Angular project structure, complete with components, services, and modules. To get the frontend running, follow these steps:

  1. Install Dependencies: Navigate to the frontend directory and run
    text
    npm install
    or
    text
    yarn install
    .
  2. Serve the Application: Run
    text
    ng serve
    to start the Angular development server.
  3. Access the Application: Open your browser and navigate to
    text
    http://localhost:4200
    to see the generated UI.
bash
cd frontend npm install ng serve

Step 5: Implementing the NestJS Backend#

Replay also generates a NestJS backend to handle data persistence and API endpoints. To set up the backend:

  1. Install Dependencies: Navigate to the backend directory and run
    text
    npm install
    or
    text
    yarn install
    .
  2. Configure the Database: Replay often integrates with Supabase. Configure your Supabase credentials in the
    text
    env
    file.
  3. Run Migrations (if necessary): If your backend includes database migrations, run them using
    text
    npm run migrate
    .
  4. Start the Server: Run
    text
    npm run start:dev
    to start the NestJS development server.
bash
cd backend npm install npm run start:dev

Step 6: Connecting Frontend and Backend#

With both the frontend and backend running, you need to connect them. Replay generates API calls in the Angular frontend that point to the NestJS backend endpoints. Ensure that the API endpoints are correctly configured and that the frontend can communicate with the backend.

typescript
// Example Angular service calling the NestJS API import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class DataService { private apiUrl = 'http://localhost:3000/api/data'; // Adjust URL if needed constructor(private http: HttpClient) {} getData(): Observable<any> { return this.http.get(this.apiUrl); } }

Step 7: Integrating with Supabase#

Replay's Supabase integration allows you to quickly set up a database and authentication for your application.

  1. Create a Supabase Project: If you don't already have one, create a new Supabase project.
  2. Configure Environment Variables: Set the Supabase URL and API key in your NestJS backend's
    text
    .env
    file.
  3. Define Database Schema: Replay generates the necessary database schema based on the data interactions in the video. Review and adjust the schema as needed.
  4. Implement Authentication: Replay can also generate authentication logic using Supabase Auth. Implement the necessary components in your Angular frontend.

⚠️ Warning: Always protect your Supabase API keys and other sensitive information. Use environment variables and avoid committing them to your code repository.

Replay's Unique Advantages#

Replay stands out from other code generation tools due to its behavior-driven approach and video analysis capabilities. Here's a comparison:

FeatureScreenshot-to-CodeLow-Code PlatformsReplay
InputScreenshotsDrag-and-Drop UIVideo
Behavior AnalysisLimitedLimited
Full-Stack GenerationPartial
Code CustomizationLimitedLimitedHigh
Supabase IntegrationPartial
Multi-Page GenerationPartial
Style InjectionLimitedLimited
Product Flow Maps

Benefits of Using Replay:#

  • Faster Development: Significantly reduces the time required to convert UI/UX designs into functional code.
  • Improved Accuracy: Captures user behavior and intent, resulting in more accurate and user-friendly applications.
  • Reduced Errors: Automates the code generation process, minimizing the risk of manual errors.
  • Enhanced Collaboration: Provides a common language between designers and developers, improving collaboration.
  • Behavior-Driven Reconstruction: Creates code that accurately reflects user intentions.

Addressing Common Concerns#

Code Quality#

One common concern is the quality of the generated code. Replay generates clean, well-structured code that adheres to industry best practices. However, it's always recommended to review and refine the code as needed.

Customization#

Another concern is the level of customization allowed. Replay provides a high degree of customization, allowing you to modify the generated code to meet your specific requirements. You can also inject custom styles and logic into the generated components.

Complexity#

Some users may be concerned about the complexity of using Replay. Replay is designed to be user-friendly and intuitive. The process of uploading a video, reviewing the generated code, and integrating it into your project is straightforward.

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?#

While both Replay and v0.dev aim to accelerate UI development, Replay focuses on behavior-driven code generation from video, understanding user intent and flows, whereas v0.dev primarily generates code snippets from text prompts. Replay also offers full-stack generation, Supabase integration, style injection, and product flow maps, features not found in v0.dev.

What type of videos does Replay support?#

Replay supports a variety of video formats, including MP4, MOV, and AVI. The video should be clear and well-lit, with minimal background noise.

Can I use Replay with other backend frameworks?#

While this guide focuses on NestJS, Replay can be adapted to work with other backend frameworks. The generated code can be modified to integrate with your preferred backend technology.


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