Front-end architecture at scale: Nx, NgRx and facades in Angular, React and Vue
Large front-ends after Manfred Steyer's domain and library-type model: Nx boundaries, NgRx with a facade in Angular 22, Zustand with TanStack Query in Next.js, Pinia in Nuxt.
Contents
This guide describes how we structure large front-ends: one workspace, many applications, many teams, and a rule for every file. We build it with Nx and Angular, keep shared state in NgRx, and put an optional facade in front of the store. Then we show the same architecture, rule for rule, in React with Next.js and in Vue with Nuxt.
The examples target Angular 22 with NgRx 22, React 19 with Next.js 16, TanStack Query and Zustand, and Vue 3.5 with Nuxt 4 and Pinia 3.
The architecture is not ours. Its core was worked out and published by Manfred Steyer, Angular trainer and consultant, Google Developer Expert for Angular and the person behind ANGULARarchitects. His idea is to cut a front-end vertically by domain and horizontally by library type, to let domains talk only through an explicit API, and to let a tool, not a wiki, enforce those lines. Section 2 lists exactly what comes from him, what comes from Nx and what we added.
A small example cannot show why any of this matters. One domain with one store fits in anyone's head. So every example on this page comes from one realistic workspace: Fleetline, a fleet maintenance platform with three applications, nine domains, about seventy libraries and five teams. It is introduced in section 5 and used in every section after it.
Written for teams that already have, or will soon have, more than one front-end application, more than one team, or more than about 50,000 lines of front-end code. Below that size, read section 16.4 first.
Contents
- 1Why front-ends need an architecture
- 2Where the idea comes from
- 3The architecture on one page
- 4Vocabulary
- 5The example: Fleetline
- 6Library types
- 7Domains and boundaries
- 8Enforcing the rules
- 9State with NgRx
- 10The facade, and when to skip it
- 11Angular end to end
- 12React and Next.js
- 13Vue and Nuxt
- 14Side by side
- 15Testing per library type
- 16Growing into it and migrating
- 17Questions