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 and ship it as open source. About 195,000 installs a month depend on it.

Frame timeline. Every frame this page has rendered in your browser, newest on the right. The solid line is the frame budget for your display; bars turn amber when a frame misses it. I would rather show you this than tell you I care about performance. Hover or drag across it to read a single frame.

~195,000 installs a month across my npm packages. Downloads measure dependency; stars measure applause.
1,064 stars on repositories I actually wrote. I do not count the mirrors sitting in my account.
1,030,758 article views across 88 posts on Viblo, all of it written in Vietnamese.

01 · Work

Five things worth your time.

Ninety-two public repositories, but these are the five that carry the argument: a browser runtime, native modules people ship in production, a distributed system, and a devtool. Counts come from the GitHub and npm APIs, read in August 2026.

Browser runtime · headliner

46stars in its first 10 days

An MIT-licensed WebContainer. Vite and Express running in your browser, with no server doing the work.

“Node's APIs are synchronous. Browsers won't let you block on async work, except on a Web Worker thread, where Atomics.wait() can genuinely park execution.” from the vivari README
  • TypeScript
  • MIT
  • WebAssembly
  • vivari.run

maitrungduc1410/vivari

Native module · production trust

50,436installs / month

The video editor fifty thousand installs a month 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
  • 170★
  • 43 forks
  • 1 open issue

maitrungduc1410/react-native-video-trim

Native module · craft

36stars in ~8 weeks

Shared-element transitions on Fabric, router-agnostic, with interactive iOS gesture returns synced frame-by-frame through the host navigator's transition coordinator. Every flight runs in Swift and Kotlin, with no JS-thread animation.

The README carries a comparison table against the incumbent libraries, and a section headed “When the alternatives are still a good fit”. the case against my own library, on my own page
  • Swift
  • Kotlin
  • Fabric

maitrungduc1410/react-native-shared-hero

Distributed systems

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.

  • TypeScript
  • Kubernetes
  • 4★
  • Grafana

maitrungduc1410/socket.io-mesh-adapter

Tooling · distribution

3browser stores

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

  • TypeScript
  • 44★
  • Chrome
  • Firefox
  • Edge

maitrungduc1410/konva-inspector

Eleven native modules, one discipline ~80,000 installs / mo

  1. react-native-loader-kit

    30+ loading indicators, drawn natively rather than in JavaScript

    20,563

The family is the argument, not any single member: all Swift and Kotlin on the New Architecture, ~80,000 installs a month between them, nearly all pushed in 2026. They are also all still maintained, which is the part most side projects fail. video-trim and shared-hero above come from the same habit.

Boring and load-bearing 1 package

  1. node-scp

    A promise-based SCP client for Node.js

    111,749

Six years old, five contributors, still shipping in 2026, and on its own it out-downloads every React Native library I have written put together. Nothing about it is exciting. A lot of people's deploy scripts would break without it.

Browser, runtime & systems going lower

  1. HardwareVideoDemo

    Preventing screen recording of hardware-rendered video in Swift, the way Netflix does it

  2. devtools-frontend-demo

    Chrome's own DevTools frontend, driven over Chobitsu

  3. wasm-hybrid-build

    A hybrid WebAssembly build, in C

  4. double-raf-demo

    Why one requestAnimationFrame is not enough

  5. twitter-hacking

    Taking apart Twitter's view-source prevention

Eleven repositories in my account are the same exercise repeated: take one behaviour a famous product ships (YouTube's heatmap, Twitter's splash, Netflix's recording block, Android's pointer-location overlay), work out how it is actually done, and rebuild it from first principles until it behaves identically. It is the most consistent habit in my GitHub history, and the thing my résumé never mentions.

02 · Writing

A million article views, none of it in English.

88 posts on Viblo, 1,030,758 views and 5,337 claps, with nothing new since April 2025. It is an archive credential rather than a current signal: the topics are Docker, Kubernetes, micro-frontends and Vue, which is not what I have been building since.

Viblo · VI · 234 claps · 15,657 views

Con đường mình trở thành Software Engineer ở Singapore

My path from Vietnam to a software engineering job in Singapore. My most-applauded post of the 88.

Read on Viblo →

Viblo · VI · 173 claps · 11,470 views

Trải nghiệm phỏng vấn Software Engineer của mình tại TikTok Singapore

My experience interviewing as a software engineer at TikTok Singapore. Second most-applauded.

Read on Viblo →

The archive · VI · 86 more posts

Docker, Kubernetes, micro-frontends

Series written between 2018 and 2025, each backed by a companion repository in the viblo-mfe-* and viblo-k8s-* families.

Browse the repos →

All three link out rather than re-hosting anything. The readers are already on Viblo, and a copy of the archive on this domain would only compete with the original for the same search results.

03 · About

Duc Trung Mai. Most people call me James.

I work on client performance for TikTok Search in Singapore: cold start, scroll and list performance, and the cost of the image and video pipeline in a very large iOS and Android app. I can describe the discipline; I cannot show you the numbers, which is part of why everything above is my own code instead.

Alongside that I volunteer for STEAM for Vietnam, a non-profit where I look after reliability and scale. Before TikTok I spent 2020 to 2023 at DBS Bank building web apps for sales and trading desks, and four years on R&D at NTU and Temasek Laboratories covering speech recognition, streaming audio and spoken-term detection.

The through-line is the headline. I go one layer below where product engineers usually stop. In practice that means Swift, Kotlin, C++, C and Rust compiled to Wasm, and then shipping what I find down there as something installable. Most of it started as me refusing to accept that some behaviour in an app I liked was magic.

  1. TikTok SearchSingapore · client performance
  2. STEAM for VietnamVolunteer · remote · reliability, scalability
  3. DBS BankSingapore · web apps for sales and traders
  4. Nanyang Technological UniversitySingapore · R&D · speech recognition, APIs, cloud
  5. Temasek Laboratories @ NTUSingapore · streaming audio, spoken-term detection
  6. Internships and part-time engineering, VietnamFPT Software (C#, iOS) · Hosco Software · Rabiloo (Laravel, Vue)

04 · Contact

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