TikTok2024 –
UG Overseas Platform
An enterprise monorepo for TikTok's overseas growth business
Overview
A large-scale enterprise-level Monorepo frontend project serving TikTok's online advertising overseas user growth business line. The platform covers multiple business domains including media asset management, financial settlement, supplier procurement, and data dashboards. It adopts a unified technical architecture and engineering standards, supporting collaborative development and independent deployment of multiple business subsystems across 50+ sub-projects with million-line-level codebase.
My responsibilities span two subsystems: financial settlement (contract management, pricing, settlement statements) and ad procurement (demand submission, approval workflows, scoring tasks, ad buying flows).
Key contributions
Web Worker Multi-threaded CSV Validation
CSV format validation originally ran on the main thread and often froze the UI on large files. I introduced a Web Worker multi-threaded system to move validation to a separate thread, solving several Web Worker compatibility constraints specific to the company's internal Armor build framework (Blob URL, Comlink, Module Worker). Validation rules use schemas built on Yup and Regex, and the system was abstracted into a reusable shared utility.
This design successfully reduced UI blocking time by 90% across 100,000 data entries.
Function Caching Utilities for Rendering Optimization
The project internally used a proprietary form rendering engine to accelerate the development of large forms. This engine required an abstracted JS object representing the form content, which also included functions like
onChangefor cross-field interactions.The engine's critical performance flaw was that it recomputed the entire schema on every form render. When form content was extensive and included array-type fields, this flaw was significantly amplified — manifesting as frozen UI interactions and long waits for form generation.
To solve this problem, I created two simple utility functions:
cache/cacheMany. Mimicking React'suseMemo, they cache computation results in a Map, or store results in multiple Maps keyed by incoming parameters.With this technique combined with other standard optimizations, I successfully reduced the Total Blocking Time (TBT) by 98% on an interface that rendered 500 form UIs without pagination.
Highlights
- 01
Complex Form Component Development
Built extensive business form components based on an internally developed JSON Schema dynamic form rendering solution, covering cascading selects, dynamic fields, and conditional rendering scenarios with configuration-driven form rendering with complex validation rules and field linkage logic
- 02
High-Precision Numeric Computation
Addressed JavaScript floating-point precision issues for financial and pricing scenarios with a custom floating-point precision calculation solution
- 03
Micro-Frontend Integration
Implemented dynamic sub-application loading via the company's proprietary framework, supporting on-demand module loading with independent development and deployment
- 04
Internationalization & Multi-language
Implemented multi-language support with dynamic updates by fetching the latest translation files at runtime through an internally developed online translation platform
- 05
LLM Contract AI Validation
Built a full-stack AI validation system that uses a multimodal LLM to parse contract documents and verify each rule before allowing submission. Key highlights: rules are managed via a remote config platform and can be added, modified, or disabled without code changes; rules are classified as hard-block or warning-only, with blocking only triggered when the model's confidence exceeds a threshold; users can override hard-block rules by submitting a written clarification, with results logged for audit; implemented a DB query Tool Call with a SQL filter layer to enforce read-only access, allowing the model to freely fetch system data as needed per rule; integrated a file-to-Markdown MCP so the model can uniformly process contracts in PDF, Word, Excel, and other formats
Impact: validates 6–7 contracts per week, saving about 5 person-days of manual work per month
Accuracy & corpus: the model initially struggled with contracts of differing structures; contracts with common structures (both incorrect and correct examples) were then added to a corpus that tells the model which wording typically maps to which rule, and its judgment has steadily improved (still being optimized)
Evaluation (eval): every prompt change is tested against this corpus and only released after passing; the model is the company's in-house model (Doubao), which is free for internal use, so monetary cost is not a factor; the model has never been swapped
Tracing: every model conversation is written by Go to the production log system, where the reasoning behind each judgment can be traced
Latency handling: to absorb model latency, contract submission was changed from synchronous to asynchronous; after submitting, users are notified in about 5 minutes on average and return to the page to view the results