Work · XP Inc.
Arsenal: a micro-framework for micro-frontends
Built at XP Inc. on top of Webpack Module Federation, so many teams could ship parts of the same product independently. Deliveries got about 40% faster.
- Role
- Software Architect
- When
- Dec 2020 – Mar 2022
- Stack
- Webpack Module Federation · React · Gatsby · Jest · Lerna
The idea
Module Federation lets one application load code that another team built and deployed separately. Arsenal turned that mechanism into a small framework with conventions, so teams did not each reinvent loading, communication and shared state.
Four packages
- core: loads modules, provides pub/sub or queue channels, an observable global state and standardized logs.
- react: interfaces and lifecycle hooks so React apps plug into core.
- scripts: build, tests, dev server and configuration through an arsenal.json file.
- docs: the documentation site, built with Gatsby.
Engineering
A Lerna monorepo with Jest across the packages. The point was boring consistency: every micro-frontend started, logged and talked to the others in the same way.
Result
Teams shipped their parts independently, and deliveries got about 40% faster.