Back to Blog
January 5, 20267 min readHow to Convert

How to Convert UX/UI Video to a Full-Stack Angular App With NestJS and better UI Replay

R
Replay Team
Developer Advocates

TL;DR: Learn how to leverage Replay to automatically generate a full-stack Angular application with a NestJS backend directly from a UX/UI video recording, significantly accelerating your development process.

The age of painstakingly hand-coding UIs based on static mockups is over. We now have the power to extract fully functional code directly from video recordings of user flows. This isn't just about visual similarity; it's about understanding user intent and translating it into a working application. Let's dive into how you can convert a UX/UI video into a full-stack Angular app with a NestJS backend, powered by Replay.

The Problem: Bridging the Gap Between Design and Code#

Traditionally, the process of translating a UX/UI design into code is fraught with challenges:

  • Misinterpretation: Designers and developers may have different understandings of the intended functionality.
  • Manual Effort: Manually coding each component and interaction is time-consuming and error-prone.
  • Communication Overhead: Constant back-and-forth communication is needed to clarify design specifications.
  • Static Mockups: Mockups don't capture dynamic user behavior or complex interactions.

Screenshot-to-code tools offer a partial solution, but they often fall short in understanding the behavior behind the UI. They can reproduce the visual appearance but struggle with dynamic interactions and state management. This is where Replay shines.

Replay: Behavior-Driven Reconstruction#

Replay takes a fundamentally different approach. Instead of relying on static screenshots, Replay analyzes video recordings of user flows. This allows Replay to understand:

  • User interactions (clicks, scrolls, form inputs)
  • State transitions
  • Data flow

This "Behavior-Driven Reconstruction" allows Replay to generate code that accurately reflects the intended functionality of the UI.

FeatureScreenshot-to-CodeReplay
Input TypeStatic ImagesVideo Recordings
Behavior AnalysisLimitedComprehensive
Dynamic InteractionsPoor SupportExcellent Support
Multi-Page GenerationLimited
State ManagementBasicAdvanced
Code QualityVariableHigh

Building a Full-Stack Angular App with NestJS from Video: A Step-by-Step Guide#

Let's walk through the process of converting a UX/UI video into a functional Angular app with a NestJS backend using Replay. For this example, imagine we have a video recording of a user interacting with a simple to-do list application.

Step 1: Record Your UX/UI Flow#

The first step is to record a video of the desired user flow. This video should clearly demonstrate all the interactions and state transitions of the UI.

💡 Pro Tip: Ensure the video is of high quality and captures all relevant details, including mouse movements, keyboard inputs, and screen transitions.

Step 2: Upload Your Video to Replay#

Navigate to the Replay platform and upload your video recording. Replay will begin analyzing the video and reconstructing the UI.

Step 3: Configure Your Project#

During the reconstruction process, Replay will prompt you to configure your project settings. This includes:

  • Framework: Select Angular for the frontend and NestJS for the backend.
  • Styling: Choose your preferred styling library (e.g., CSS Modules, Styled Components, Tailwind CSS). Replay supports style injection, allowing you to seamlessly integrate your existing styles.
  • Data Storage: Configure your database connection. Replay offers seamless integration with Supabase, allowing you to quickly set up a backend database.

📝 Note: While Supabase integration is streamlined, you can also configure Replay to work with other databases such as PostgreSQL, MongoDB, or MySQL.

Step 4: Review and Refine the Generated Code#

Once the reconstruction is complete, Replay will present you with the generated Angular and NestJS code. Review the code to ensure it accurately reflects the intended functionality.

⚠️ Warning: While Replay strives for accuracy, it's essential to review the generated code and make any necessary adjustments.

Step 5: Customize the Angular Frontend#

The generated Angular code will consist of components, services, and modules. You can customize these components to further refine the UI and add additional functionality.

For example, the following code snippet shows a generated Angular component for displaying a to-do item:

typescript
// src/app/components/todo-item/todo-item.component.ts import { Component, Input } from '@angular/core'; @Component({ selector: 'app-todo-item', template: ` <li class="todo-item" [class.completed]="todo.completed"> <input type="checkbox" [checked]="todo.completed" (change)="toggleComplete()"> <span>{{ todo.title }}</span> <button (click)="deleteTodo()">Delete</button> </li> `, styleUrls: ['./todo-item.component.css'] }) export class TodoItemComponent { @Input() todo: any; // Assuming a Todo interface toggleComplete() { // Implement logic to toggle the completion status } deleteTodo() { // Implement logic to delete the todo item } }

This component can be further customized to add features such as:

  • Editing the to-do item
  • Adding due dates
  • Prioritizing to-do items

Step 6: Customize the NestJS Backend#

The generated NestJS code will provide API endpoints for interacting with the database. You can customize these endpoints to add additional business logic.

For example, the following code snippet shows a generated NestJS controller for managing to-do items:

typescript
// src/todos/todos.controller.ts import { Controller, Get, Post, Body, Param, Delete, Patch } from '@nestjs/common'; import { TodosService } from './todos.service'; @Controller('todos') export class TodosController { constructor(private readonly todosService: TodosService) {} @Post() async create(@Body() createTodoDto: any) { // Assuming a CreateTodoDto return this.todosService.create(createTodoDto); } @Get() async findAll() { return this.todosService.findAll(); } @Get(':id') async findOne(@Param('id') id: string) { return this.todosService.findOne(id); } @Patch(':id') async update(@Param('id') id: string, @Body() updateTodoDto: any) { // Assuming an UpdateTodoDto return this.todosService.update(id, updateTodoDto); } @Delete(':id') async remove(@Param('id') id: string) { return this.todosService.remove(id); } }

This controller can be further customized to add features such as:

  • User authentication
  • Data validation
  • Error handling

Step 7: Connect the Frontend and Backend#

Finally, connect the Angular frontend to the NestJS backend by making HTTP requests to the API endpoints. This will allow the frontend to display data from the backend and update the database.

For example, you can use the

text
HttpClient
module in Angular to make a POST request to the
text
/todos
endpoint to create a new to-do item:

typescript
// src/app/services/todo.service.ts import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class TodoService { private apiUrl = '/api/todos'; // Adjust based on your NestJS configuration constructor(private http: HttpClient) {} createTodo(todoData: any) { return this.http.post(this.apiUrl, todoData); } getTodos() { return this.http.get(this.apiUrl); } }

Benefits of Using Replay#

  • Increased Development Speed: Replay significantly reduces the time and effort required to translate UX/UI designs into code.
  • Improved Accuracy: By analyzing video recordings, Replay captures the intended functionality of the UI more accurately than screenshot-to-code tools.
  • Reduced Communication Overhead: Replay minimizes the need for constant communication between designers and developers.
  • Enhanced Collaboration: Replay facilitates collaboration by providing a common understanding of the UI's intended behavior.
  • Full-Stack Generation: Replay generates both the frontend (Angular) and backend (NestJS) code, providing a complete solution.
  • Supabase Integration: Seamless integration with Supabase simplifies database setup and management.

Product Flow Maps#

Replay also automatically generates product flow maps from your video. These maps visualize the user journey, highlighting key interactions and state transitions. This provides valuable insights for optimizing the user experience and identifying potential bottlenecks.

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

Replay analyzes video recordings to understand user behavior, while v0.dev typically relies on text prompts. Replay's behavior-driven approach allows it to generate more accurate and functional code. Replay also offers full-stack capabilities with NestJS and integrates seamlessly with Supabase.

Can I use Replay with other frameworks besides Angular and NestJS?#

Currently, Replay primarily supports Angular for the frontend and NestJS for the backend. However, support for other frameworks is planned for future releases.

How accurate is the generated code?#

Replay strives for high accuracy, but it's essential to review the generated code and make any necessary adjustments. The accuracy depends on the quality of the video recording and the complexity of the UI.

What kind of videos work best with Replay?#

Videos that clearly demonstrate the user flow, including all interactions and state transitions, work best with Replay. Ensure the video is of high quality and captures all relevant details.


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