# tencent/hippy architecture

> Architecture diagram of the GitHub repository tencent/hippy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tencent/hippy
- Repository: https://github.com/tencent/hippy

## Overview

Hippy is a cross-platform application framework: developers build React/Vue-style apps, which a host engine loads and runs through a JavaScript runtime, shared UI APIs, DOM/layout, and platform rendering. The graph also preserves documented web support and the DevTools product, plus native resource loading and debugging integrations visible in the tree. Evidence is uneven: sampled Android manager and JS-engine excerpts show parts of initialization and bundle execution; other runtime connections are marked unverified where the excerpts do not establish their calls.

Main entry points: [`framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java`](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java) (Engine Manager), [`dom/include/dom/dom_manager.h`](https://github.com/tencent/hippy/blob/main/dom/include/dom/dom_manager.h) (DOM Manager), [`driver/js/src/engine.cc`](https://github.com/tencent/hippy/blob/main/driver/js/src/engine.cc) (JS Engine), [`framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngine.java`](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngine.java) (Engine API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Engine and Platform Host"]
  node_engine_api["Engine API<br/>[HippyEngine.java]"]
  node_engine_manager["Engine Manager"]
  node_engine_context["Engine Context"]
  node_bundle_loader["Bundle Loading"]
  node_vfs["Virtual Filesystem"]
  node_bridge["Native Bridge"]
end

subgraph group_runtime["JavaScript Runtime"]
  node_js_engine["JS Engine<br/>[engine.cc]"]
  node_js_vm["JS VM<br/>[engine.h]"]
  node_js_apis["Shared JS APIs<br/>[Storage.js]"]
end

subgraph group_ui["UI and Rendering"]
  node_dom["DOM Manager<br/>[dom_manager.h]"]
  node_root_tree["Root Node<br/>[root_node.h]"]
  node_layout["Flex Layout"]
  node_animation["Animations"]
  node_renderer["Platform Renderer"]
  node_web_renderer["Web Renderer<br/>[engine.ts]"]
  node_web_components["Web Components<br/>[view.tsx]"]
end

subgraph group_tools["Debugging and Inspection"]
  node_devtools["DevTools Backend"]
  node_devtools_integration["DevTools Integration"]
end

node_app(("Cross-platform App"))
node_debugger(("Developer"))

node_app -.->|"starts"| node_engine_api
node_engine_api -.->|"configures"| node_engine_manager
node_engine_manager -->|"loads bundle"| node_bundle_loader
node_engine_manager -->|"manages"| node_engine_context
node_engine_manager -->|"runs bundle"| node_bridge
node_bridge -.->|"dispatches to"| node_js_engine
node_js_engine -->|"creates VM"| node_js_vm
node_js_engine -.->|"exposes APIs"| node_js_apis
node_js_apis -.->|"requests UI"| node_dom
node_dom -.->|"updates tree"| node_root_tree
node_dom -.->|"uses layout"| node_layout
node_dom -->|"coordinates"| node_animation
node_dom -.->|"hands off rendering"| node_renderer
node_app -.->|"runs on web"| node_web_renderer
node_web_renderer -.->|"renders components"| node_web_components
node_debugger -.->|"inspects"| node_devtools
node_devtools_integration -.->|"adapts runtime data"| node_devtools
node_engine_manager -.->|"integrates"| node_devtools_integration
node_engine_context -.->|"provides resources"| node_vfs
node_bundle_loader -.->|"resolves resources"| node_vfs

click node_engine_api "https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngine.java"
click node_engine_manager "https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java"
click node_engine_context "https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java"
click node_bundle_loader "https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/bridge/bundleloader/HippyBundleLoader.java"
click node_vfs "https://github.com/tencent/hippy/blob/main/modules/vfs/ohos/src/vfs_manager_napi.cc"
click node_bridge "https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java"
click node_js_engine "https://github.com/tencent/hippy/blob/main/driver/js/src/engine.cc"
click node_js_vm "https://github.com/tencent/hippy/blob/main/driver/js/include/driver/engine.h"
click node_js_apis "https://github.com/tencent/hippy/blob/main/driver/js/lib/global/Storage.js"
click node_dom "https://github.com/tencent/hippy/blob/main/dom/include/dom/dom_manager.h"
click node_root_tree "https://github.com/tencent/hippy/blob/main/dom/include/dom/root_node.h"
click node_layout "https://github.com/tencent/hippy/blob/main/dom/src/dom/taitank_layout_node.cc"
click node_animation "https://github.com/tencent/hippy/blob/main/dom/src/dom/animation/animation_manager.cc"
click node_renderer "https://github.com/tencent/hippy/blob/main/renderer/native/android/src/main/cpp/src/renderer/native_render_manager.cc"
click node_web_renderer "https://github.com/tencent/hippy/blob/main/driver/js/packages/hippy-web-renderer/src/base/engine.ts"
click node_web_components "https://github.com/tencent/hippy/blob/main/driver/js/packages/hippy-react-web/src/components/view.tsx"
click node_devtools "https://github.com/tencent/hippy/blob/main/devtools/devtools-backend/src/api/devtools_backend_service.cc"
click node_devtools_integration "https://github.com/tencent/hippy/blob/main/devtools/devtools-integration/native/src/devtools_data_source.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_engine_api,node_engine_manager,node_engine_context,node_bundle_loader,node_vfs,node_bridge toneBlue
class node_js_engine,node_js_vm,node_js_apis toneAmber
class node_dom,node_root_tree,node_layout,node_animation,node_renderer,node_web_renderer,node_web_components toneMint
class node_devtools,node_devtools_integration toneRose
class node_app,node_debugger toneIndigo
```

## Components

### Engine and Platform Host

- [Engine API](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngine.java): `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngine.java`
- [Engine Manager](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java): `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java`
- [Engine Context](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java): `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java`
- [Bundle Loading](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/bridge/bundleloader/HippyBundleLoader.java): `framework/android/src/main/java/com/tencent/mtt/hippy/bridge/bundleloader/HippyBundleLoader.java`
- [Virtual Filesystem](https://github.com/tencent/hippy/blob/main/modules/vfs/ohos/src/vfs_manager_napi.cc): `modules/vfs/ohos/src/vfs_manager_napi.cc`
- [Native Bridge](https://github.com/tencent/hippy/blob/main/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java): `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java`

### JavaScript Runtime

- [JS Engine](https://github.com/tencent/hippy/blob/main/driver/js/src/engine.cc): `driver/js/src/engine.cc`
- [JS VM](https://github.com/tencent/hippy/blob/main/driver/js/include/driver/engine.h): `driver/js/include/driver/engine.h`
- [Shared JS APIs](https://github.com/tencent/hippy/blob/main/driver/js/lib/global/Storage.js): `driver/js/lib/global/Storage.js`

### UI and Rendering

- [DOM Manager](https://github.com/tencent/hippy/blob/main/dom/include/dom/dom_manager.h): `dom/include/dom/dom_manager.h`
- [Root Node](https://github.com/tencent/hippy/blob/main/dom/include/dom/root_node.h): `dom/include/dom/root_node.h`
- [Flex Layout](https://github.com/tencent/hippy/blob/main/dom/src/dom/taitank_layout_node.cc): `dom/src/dom/taitank_layout_node.cc`
- [Animations](https://github.com/tencent/hippy/blob/main/dom/src/dom/animation/animation_manager.cc): `dom/src/dom/animation/animation_manager.cc`
- [Platform Renderer](https://github.com/tencent/hippy/blob/main/renderer/native/android/src/main/cpp/src/renderer/native_render_manager.cc): `renderer/native/android/src/main/cpp/src/renderer/native_render_manager.cc`
- [Web Renderer](https://github.com/tencent/hippy/blob/main/driver/js/packages/hippy-web-renderer/src/base/engine.ts): `driver/js/packages/hippy-web-renderer/src/base/engine.ts`
- [Web Components](https://github.com/tencent/hippy/blob/main/driver/js/packages/hippy-react-web/src/components/view.tsx): `driver/js/packages/hippy-react-web/src/components/view.tsx`

### Debugging and Inspection

- [DevTools Backend](https://github.com/tencent/hippy/blob/main/devtools/devtools-backend/src/api/devtools_backend_service.cc): `devtools/devtools-backend/src/api/devtools_backend_service.cc`
- [DevTools Integration](https://github.com/tencent/hippy/blob/main/devtools/devtools-integration/native/src/devtools_data_source.cc): `devtools/devtools-integration/native/src/devtools_data_source.cc`

### Other components

- **Cross-platform App**
- **Developer**

## Connections

- Cross-platform App → Engine API: starts
- Engine API → Engine Manager: configures
- Engine Manager → Bundle Loading: loads bundle (evidence: `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java`)
- Engine Manager → Engine Context: manages (evidence: `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineContext.java`)
- Engine Manager → Native Bridge: runs bundle (evidence: `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java`)
- Native Bridge → JS Engine: dispatches to
- JS Engine → JS VM: creates VM (evidence: `driver/js/src/engine.cc`)
- JS Engine → Shared JS APIs: exposes APIs
- Shared JS APIs → DOM Manager: requests UI
- DOM Manager → Root Node: updates tree
- DOM Manager → Flex Layout: uses layout
- DOM Manager → Animations: coordinates (evidence: `dom/include/dom/dom_manager.h`)
- DOM Manager → Platform Renderer: hands off rendering
- Cross-platform App → Web Renderer: runs on web
- Web Renderer → Web Components: renders components
- Developer → DevTools Backend: inspects
- DevTools Integration → DevTools Backend: adapts runtime data
- Engine Manager → DevTools Integration: integrates (evidence: `framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java`)
- Engine Context → Virtual Filesystem: provides resources
- Bundle Loading → Virtual Filesystem: resolves resources
