← All work

(Case study 03 / 07 — Library · React)

Shared Design System

20 apps

Depend on the shared library

Role
Owner. I built 22 of its 49 components, shipped about 40 releases, and review and merge other contributors' work.
Status
In use. About 20 internal apps list it as a dependency.
Stack
  • React
  • Material UI
  • Storybook
  • Vite

(01) The problem

Product teams were rebuilding the same inputs, dialogs and sheets from Figma by hand, and every release of the shared library reached about 20 apps, so one broken export broke other teams.

(02) What I built

  • 22 components, including an OTP/PIN input, date pickers, a navigation bar with 4 layouts, a dialog that becomes a bottom sheet on phones, bank and UPI logos and file upload.
  • Figma tokens typed onto the Material UI theme through module augmentation, with light and dark values.
  • A tree-shakeable Vite library build: preserved modules, explicit exports and side effects limited to CSS.
  • Per-branch Storybook deploys in CI, and an upgrade from Storybook 8.6 to 10.3.
  • A 1,200-line adoption guide for other teams, including Next.js App Router setup.

(03) The hard part

Moving the Video KYC SDK onto the system made its dialogs render 40px too wide on phones. Material UI renders dialogs in a portal on document.body, outside the SDK's scoped CSS baseline, so they lost border-box sizing. A global reset would have leaked styles into the host apps, so I scoped the fix to the dialog and snackbar roots only.

(04) Result

The Video KYC SDK went from about 2.9 MB (JS and CSS) to 651 KB of JS with no CSS file. Part of that drop is shared code the host app now loads once from the design system.

Next case studyAuth & Encryption SDKs

(Hiring? Let's talk)

Let's buildsomething that ships.