AI-Friendly Architecture Upgrade for Pharmaceutical Supply-Chain ERP
Project Description
I worked on critical modules in the self-operated pharmaceutical supply-chain ERP system, including finance, orders, work orders, customers, and marketing. As the team moved toward frontend-backend integrated delivery, the original ERP had 600+ pages concentrated in a single repository, with heavy coupling across shared dependencies and global state. This created high upgrade risk, expensive regression testing, slow rollback, and poor AI generation efficiency due to oversized repository context. I led the transformation into an AI-friendly architecture organized by business modules, independently deployable submodules, configurable routing, and fast rollback.
Responsibilities
- Defined module boundaries across finance, orders, work orders, customers, and marketing, and designed an "ERP shell + independent submodules" architecture.
- Built automated splitting scripts by page, module, and multi-module scope, replacing manual migration and reducing human error across 600+ pages.
- Split ERP modules into independently deployable Monorepo sub-repositories, embedded through iframe integration while sharing a unified entry component.
- Designed coexistence of old and new routes, allowing each module to switch between the new submodule and the original page component through online route configuration.
- Extracted shared business components and utility methods into npm packages, while moving route and tab configuration online to avoid repeated maintenance in submodules.
- Used iframe communication to synchronize global state, including tab state, page cache, refresh behavior, route parameters, and page switching after data updates.