Frontend Architecture Refactoring & Component Standardization
Lead Frontend Engineer — reducing duplication across admin and agent experiences by moving toward a single source of truth for forms, lists, and shared UI.
Component-driven refactor: unified forms, shared library, RBAC across admin and agent portals — less duplication and faster maintenance.
- 01Refactored: component-driven and DRY◆ Route /module/:id?→ Has id param?→ Unified list view
- 02Shared component libraryShared activity log
- 03Shared component libraryUnified list view→ Check user role→ Shared activity log
- 04Dynamic form◆ Has id param?→ Edit mode fetch and bind [Yes]→ Create mode empty form [No]
- 05Dynamic formEdit mode fetch and bind→ Shared activity log
- 06Dynamic formCreate mode empty form→ Shared activity log
- 07RBAC◆ Check user role→ Admin actions [Admin]→ Agent actions [Agent]
- 08RBACAdmin actions
- 09RBACAgent actions
DRY violations and heavy maintenance
The legacy UI had deep structural duplication: separate add vs edit components, parallel pages across admin and agent portals, and utility widgets copied into multiple trees. Even a simple label or validation tweak required touching many isolated files, which slowed delivery and increased regression risk.
Component-driven, unified surfaces
Led a refactor toward
component-driven development
: merged add/edit into
one dynamic form
keyed by route params (e.g.
/:id
), collapsed duplicated portal pages into
shared views with RBAC
, and hoisted repeated pieces (such as activity logs) into a
centralized shared library
.
02Impact
Impact
Materially shrank the surface area of the UI codebase and cut ongoing maintenance cost: fixes and visual tweaks increasingly land in one place , propagating consistently across both portals instead of chasing copies in siloed folders.
03Architecture transformation
Architecture transformation
High-level view of structure before vs after. Diagrams are illustrative of the pattern, not a literal repo map.
Other views
- 01Admin portalModule A list→ Module A add page→ Module A edit page
- 02Admin portalAdmin activity log
- 03Agent portalModule A list duplicated
- 04Agent portalAgent activity log duplicated
- 05Admin portalModule A add page
- 06Admin portalModule A edit page