Software Engineer · TikTok Search · Singapore

I work one layer below.

Some behaviour only feels possible inside a big native app: hero transitions, waveform scrubbing, frame-accurate video editing, a Node runtime with no server. I build that behaviour one layer below where product code usually stops, and ship it as open source. About 326,000 installs a month depend on it.

Dive in

Scroll to go one layer down

325,828npm installs in the last month, across my packages
851GitHub stars on the repositories on this page
437GitHub followers
1,046,484article views across 88 posts on Viblo

As of November 16, 2026, from the public GitHub, npm and Viblo APIs.

L1 · TS · Lynx · React

Now: client performance for TikTok Search.

Since February 2024 I have worked on client performance for TikTok Search in Singapore: how fast the first screen appears, how smoothly results scroll, and what the image and video pipeline costs inside a very large iOS and Android app. I can describe the discipline; the numbers stay inside, which is why everything else on this page is my own code.

Day job · 2024 → now

TikTok Search

First-screen rendering, scroll and list smoothness, and the cost of media, measured on real devices rather than argued about in review.

Cross-platform UI

Lynx

A lot of my recent work sits on Lynx, the open-source cross-platform framework: TypeScript on top, native rendering underneath, and performance work that has to hold on both sides.

Android · iOS · JS

Cross-stack by default

A regression rarely lives in one layer. The job is following it from a component, across the bridge, into Kotlin or Swift, and down to the frame that dropped.

Workflow

AI-assisted delivery

I run AI agents like a small team: one plans, one builds, one reviews, one verifies on a device. The value is in the guardrails: small diffs, reproducible checks, and a human who signs off.

planbuildreviewverify
The loop, not the hype: every step leaves an artefact the next one can check.

Tools that live in this layer

konva-inspector

React DevTools for canvas apps: a scene-graph inspector, a draw profiler and a render heatmap showing which layers redraw most. Shipped through the Chrome, Firefox and Edge stores.

  • 45 stars
  • Chrome · Firefox · Edge

Boring and load-bearing

node-scp

A promise-based SCP client for Node.js. Six years old, still shipping, and on its own it out-downloads every React Native library I have written put together. A lot of deploy scripts would break without it.

159,127installs / month

L2 · Swift · Kotlin

Native modules: eleven of them, one discipline.

Swift and Kotlin on React Native’s New Architecture, with no animation on the JS thread. 166,662 installs a month between them, and all still maintained, which is the part most side projects fail. Four of them are rebuilt below for the web, so you can play instead of read.

Swift · Kotlin · FFmpeg

react-native-video-trim

137,892installs / month · 177 stars

The video editor tens of thousands of apps trust in production. When its FFmpeg dependency was abandoned I rebuilt the dependency itself: a community-maintained ffmpeg-kit for Android, iOS and React Native, with support for Android 15’s 16 KB page size.

Swift · Kotlin · Fabric

react-native-shared-hero

38stars

Smooth shared-element transitions between screens in React Native. An image or card flies from one screen to its place on the next, matched by id, so it works with any router. Flights run natively in Swift and Kotlin on Fabric, and the iOS swipe back and sheet drag-to-dismiss are tracked frame by frame.

The README carries a comparison table against the incumbents, and a section headed “When the alternatives are still a good fit”.

Playground

Web ports written for this page. They approximate the native behaviour; the real thing runs on the UI thread of your phone.

Shared-element transition

react-native-shared-hero

Places

Tap a card to open it. Back, Esc or drag down to return.

BallScale

A few of the 30+ indicators. Pick one to see its name.
0:00 / 0:24
Drag across the waveform, or focus it and use the arrow keys.

Sign here

Sign here. Faster strokes draw thinner, like a real pen.

L3 · C · Rust → Wasm

Runtime: a dev server in your tab, sockets in a mesh.

Below the framework there is a runtime, and below the runtime there are syscalls, memory and wires. Two projects that live down here.

TypeScript · Rust/Wasm · MIT

vivari

96stars

Node, Bun and Python running inside your browser tab. Real npm installs, real dev servers with hot reload, Express and Next.js apps, and no server anywhere doing the work. Open source (MIT), an alternative to StackBlitz WebContainers.

“Not a shim: Vivari runs Node’s real lib/, the real npm, yarn and pnpm, and real CPython. No server does the work.”from the vivari README

How it works: Node’s own code runs in a Web Worker, files live on a Rust/Wasm virtual disk, and a Service Worker plays localhost.

Boot it on vivari.run

A dev server in this tab

vivari

# press Start to boot a dev server right here

Nothing on localhost yet.

0 Servers usedEverything above ran in this tab.0 requests served by your tab
Try the real one in vivari Studio A faithful simulation on this page. Studio runs the real thing.

TypeScript · Kubernetes · Grafana

socket.io-mesh-adapter

300kconcurrent connections

Socket.IO past the broker bottleneck: a mesh that trades N² connections for zero broker hops. Benchmarked at 300,000 concurrent connections across ten Kubernetes pods, with Prometheus metrics, a provisioned Grafana dashboard and slow-consumer eviction under backpressure.

Also down here

0 links0 hops per broadcast
Broadcast a message and count the hops.

L4 · GPU · rendering

Lab: famous behaviours, rebuilt from first principles.

The most consistent habit in my GitHub history: take one behaviour a famous product ships, work out how it is actually done, and rebuild it until it behaves identically.

Viblo · 2,914 followers

A million article views, none of it in English.

88 posts on Viblo, 1,046,484 views and 5,374 claps, the latest from April 12, 2025. It is an archive rather than a current signal: Docker, Kubernetes, micro-frontends and Vue, which is not what I build now, but it is how a lot of Vietnamese developers first met those tools.

2014 → 2026

The route here.

Pick a stop, or use the arrow keys.

TikTok Search

Singapore · client performance

Cold start, scroll and list performance, and the cost of the image and video pipeline in a very large iOS and Android app. Lately a lot of Lynx and cross-stack work.

ducmai.me

Working on browser runtimes, React Native internals, or something that has to hold at scale? Say hello.

↑↓ to move · Enter to run · Esc to close