Freshworks, one component library for every team

Code splitting cut load 25%; a shared library cut dev effort 30%

Design systemPerformanceWCAG AANDA-safe
[Rebuilt before/after page-load frames: neutral demo app, not a Freshworks screen]

−25%

Load (code splitting)

−30%

Dev effort (shared library)

AA

WCAG improvements

01

Overview

The problem

[One sentence a non-Freshworks reader understands, e.g. teams rebuilt the same UI in slightly different ways, and pages shipped one large bundle.]

What I built

A shared React component library, route- and feature-level code splitting in Webpack, and accessibility fixes built into the shared components.

My role

[Which parts you led vs. contributed to.]

ReactWebpackDesign tokensWCAG 2.1 AA

02

Tokens to products

Tokens → primitives (Button, Input) → composed components (Form, Table) → product apps, with the bundle split by route: one entry bundle became a shared vendor chunk, route chunks and on-demand heavy widgets.

[Diagram: tokens → primitives → components → apps]

[The real constraints: multiple product teams, an existing codebase, backward compatibility, release cadence. Keep the ones that applied.]

03

Accessibility built in

Fix it once in the component, and every screen gets it.

  • Visible focus rings, and correct roles and labels on icon buttons
  • Keyboard support in menus and dialogs: arrow keys, Escape, focus trap and restore
  • Color contrast at AA: 4.5:1 for text, 3:1 for UI

[The specific WCAG issues you fixed, described generically.]

04

Engineering

Pattern written fresh for this portfolio, not Freshworks code.

Route-level splitting

const Reports = lazy(() => import(/* webpackChunkName: "reports" */ './routes/Reports'))
const Settings = lazy(() => import(/* webpackChunkName: "settings" */ './routes/Settings'))

<Suspense fallback={<PageSkeleton />}>   {/* reserved height: no layout shift */}
  <Routes>…</Routes>
</Suspense>

Prefetch on intent: a route's chunk starts loading on hover or focus of its link, so splitting doesn't make navigation feel slower.

[How you measured: bundle analyzer, Lighthouse CI, real-user metrics.]

05

Paths not taken

A

Split everything → split by route

Per-component splitting created too many tiny requests; routes plus a few heavy widgets was the sweet spot.

B

Fork per product → one library

Forking is faster at first and drifts; variants keep one source of truth.

C

Audit at the end → built in

Auditing pages finds the same bug many times; fixing the component fixes every page.

[Keep only the ones you actually considered.]

06

Impact

−25% load from code splitting, and −30% dev effort from the shared library, plus WCAG improvements across products.

[Confirm both numbers are cleared to publish, and how each was measured: which load metric, and what "dev effort" means.]

07

What's next

[Adoption: how many teams or apps used the library, if shareable.]

  • Visual regression tests
  • Automated accessibility checks in CI (axe)
  • A docs site with live examples

Thanks for reading!

Details here are written to stay inside my agreements. Happy to go deeper in a conversation.

[photo]