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.
This page has sound. Turn your volume up.
Software Engineer · TikTok Search · Singapore
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.
Scroll to go one layer down
As of November 16, 2026, from the public GitHub, npm and Viblo APIs.
L1 · TS · Lynx · React
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
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
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
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
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.
Tools that live in this layer
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.
Boring and load-bearing
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.
L2 · Swift · Kotlin
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
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
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”.
Web ports written for this page. They approximate the native behaviour; the real thing runs on the UI thread of your phone.
Places
BallScale
Sign here
The rest of the family
L3 · C · Rust → Wasm
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
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.
# press Start to boot a dev server right here
Nothing on localhost yet.
TypeScript · Kubernetes · Grafana
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
L4 · GPU · rendering
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.
YouTube’s “most replayed” heatmap above the scrubber
L1 · NowHover-to-preview thumbnails, the YouTube way
L1 · NowTaking apart Twitter’s view-source prevention
L2 · NativeInstagram’s pinch, pan and paging image gallery
L2 · NativeThe iOS Compass app, dial and haptics included
L2 · NativeAndroid’s pointer-location developer overlay, as a module
L2 · NativeTwitter’s animated splash reveal, natively
L3 · RuntimeChrome DevTools frontend embedded and driven over Chobitsu
L3 · RuntimeOne C codebase, a hybrid WebAssembly build
L4 · RenderingA progress bar that stays smooth between time updates
L4 · RenderingWhy a single requestAnimationFrame is not enough
L4 · RenderingBlocking screen recording of hardware-rendered video, the way Netflix does it
Viblo · 2,914 followers
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.
January 3, 2021 · 234 claps · 16,370 views
My path from Vietnam to a software engineering job in Singapore.
Read on Viblo →February 15, 2024 · 178 claps · 12,065 views
What interviewing as a software engineer at TikTok Singapore was actually like.
Read on Viblo →July 31, 2020 · 195 claps · 62,128 views
An introduction to CI/CD with GitLab. My most-read post.
Read on Viblo →December 20, 2019 · 258 claps · 36,550 views
Dockerising a Node.js app, step by step. My most-applauded post.
Read on Viblo →October 11, 2020 · 168 claps · 37,365 views
Better code and calmer teams with Husky, lint-staged and commitlint.
Read on Viblo →2018 - 2025 · 88 posts
Series written between 2018 and 2025, most backed by a companion repository in the viblo-* families.
Browse on Viblo →2014 → 2026
Pick a stop, or use the arrow keys.
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.
Volunteer · remote
A non-profit teaching technology to Vietnamese students. I look after reliability and scale.
Singapore · web apps
Web applications for sales and trading desks.
Singapore · R&D
Speech recognition, APIs and cloud infrastructure.
Singapore · R&D
Streaming audio and spoken-term detection.
Internships and part-time engineering
FPT Software (C#, iOS), Hosco Software, Rabiloo (Laravel, Vue). Where the Viblo writing started.
ducmai.me