React template
A fullstack React monorepo with an Express API.
npx create-nx-workspace@latest my-workspace --template reactA React monorepo shaped for real apps: a Vite-powered shop app, an Express API, and a set of feature, data-access, and UI libraries connected through enforced module boundaries. Vitest for unit tests, Playwright for e2e, and self-healing CI.
Highlights
Frontend + backend in one monorepo
A React shop and an Express API share types through libraries - change a model once and affected catches every consumer.
Architected with libraries
Feature, data-access, and UI libraries with scope/type tags show how a real React monorepo is organized.
Fast tests
Vitest for units, Playwright for e2e, and e2e task splitting ready for Nx Cloud.
Quickstart
- Serve the app:
Terminal window npx nx run @org/shop:serve - Test every project:
Terminal window npx nx run-many -t test - Visualize your monorepo's graph in the browser:
Terminal window npx nx graph
What's inside
apps/shop- React e-commerce app (Vite)apps/api- Express backend serving product datapackages/shop/*- feature, data-access, and UI librariespackages/shared/*- shared models and test utilitiesapps/shop-e2e- Playwright end-to-end tests
Speed up CI with Nx Cloud
Connect this monorepo to Nx Cloud to share one remote cache across your team and CI, and distribute tasks across machines as it grows.
- Remote caching shared across your team and CI
- Distributed task execution with Nx Agents
- Automated e2e test splitting
- CI that detects failures and proposes fixes