Skip to content
AI Monorepos Free online conference · June 23 Join us!

React template

A fullstack React monorepo with an Express API.

Terminal window
npx create-nx-workspace@latest my-workspace --template react
React template preview

A 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 data
  • packages/shop/* - feature, data-access, and UI libraries
  • packages/shared/* - shared models and test utilities
  • apps/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

Learn more