17c804472Sopenharmony_ci# Previewer
27c804472Sopenharmony_ci
37c804472Sopenharmony_ci## Introduction
47c804472Sopenharmony_ci
57c804472Sopenharmony_ciThe Previewer is a component that empowers the DevEco Studio Previewer to leverage the ArkUI rendering engine for real-time rendering and preview. To be specific, with the Previewer component, the DevEco Studio Previewer can send commands through the named pipe to instruct the ArkUI rendering engine to implement real-time rendering and receive the resultant images for preview presentation. The Previewer component supports ArkTS and JS applications on Windows or macOS.
67c804472Sopenharmony_ci
77c804472Sopenharmony_ci**Figure 1** Previewer component architecture<a name="fig2606133765017"></a> 
87c804472Sopenharmony_ci
97c804472Sopenharmony_ci![](figures/Previewer-Component-Architecture.PNG "Previewer Component Architecture")
107c804472Sopenharmony_ci
117c804472Sopenharmony_ciTo start with, the DevEco Studio Previewer launches the Previewer component through the command line and passes to it startup parameters such as the ArkTS build product path and preview specifications. When starting up, the Previewer component launches the ArkUI rendering engine, which then renders pages based on the startup parameters and delivers preview images for the DevEco Studio Previewer. When page information changes, the DevEco Studio Previewer sends page refresh commands through the named pipe to the Previewer component. Based on the received commands, the Previewer component calls the ArkUI processing APIs to refresh and render the pages and deliver the images.
127c804472Sopenharmony_ci## Directory Structure
137c804472Sopenharmony_ci
147c804472Sopenharmony_ciThe source code of the Previewer component is stored in **/ide_previewer**. The following shows the directory structure.
157c804472Sopenharmony_ci
167c804472Sopenharmony_ci```
177c804472Sopenharmony_ci/ide_previewer
187c804472Sopenharmony_ci├── cli                       # Command processing
197c804472Sopenharmony_ci├── gn                        # Build dependencies and toolchain configuration
207c804472Sopenharmony_ci├── jsapp                     # Rendering engine invoking
217c804472Sopenharmony_ci├── mock                      # Code of the interaction layer
227c804472Sopenharmony_ci├── util                      # Utility
237c804472Sopenharmony_ci```
247c804472Sopenharmony_ci
257c804472Sopenharmony_ci## Application Scenarios
267c804472Sopenharmony_ci
277c804472Sopenharmony_ciThe Previewer component is built and released with the OpenHarmony SDK. You can use it to enable the DevEco Studio Previewer to leverage the ArkUI rendering engine for page rendering.
287c804472Sopenharmony_ci
297c804472Sopenharmony_ci## Building and Compilation
307c804472Sopenharmony_ci
317c804472Sopenharmony_ciFor details, see the README in the [build](https://gitee.com/openharmony/build) repository.
327c804472Sopenharmony_ci
337c804472Sopenharmony_ci## Repositories Involved
347c804472Sopenharmony_ci
357c804472Sopenharmony_ci**ide_previewer**
367c804472Sopenharmony_ci
377c804472Sopenharmony_ci[arkui\_ace\_engine\_lite](https://gitee.com/openharmony/arkui_ace_engine_lite)
387c804472Sopenharmony_ci
397c804472Sopenharmony_ci[arkui\_ace\_engine](https://gitee.com/openharmony/arkui_ace_engine)
407c804472Sopenharmony_ci
417c804472Sopenharmony_ci## How to Contribute
427c804472Sopenharmony_ci
437c804472Sopenharmony_ciFor details about how to contribute, see [Contribution Guide](https://gitee.com/openharmony/docs/blob/master/en/contribute/Readme-EN.md).
44