Quickstart
This tutorial takes you from an empty folder to a running shell with two remotes. You will add a feature and run two checks. It takes about ten minutes.
Before you start
You need Node.js 22.12 or newer and pnpm. The generated project pins the pnpm version it was made with. For 0.4.0 that is 12.16.1.
Check your versions:
You should see something like this:
If pnpm is missing, run corepack enable. Corepack reads the pinned version from the project. The CLI does not check these versions itself, so an old Node or pnpm fails later with a less clear message.
1. Create the project
Run the creator with the name of the folder:
--yes takes the defaults and skips the questions. It installs dependencies at the end, so this takes a few seconds. You should see a line like this:
The default project has a shell and two remotes called catalog and cart. It also has four features turned on: lint-oxlint, url-factory, env-t3 and testing. Go into the folder:
2. Start everything
Start the shell and both remotes together:
You should see one log line per app, each with a prefix. The first lines are:
A few seconds later each app prints its address:
Module Federation also prints a note about CORS headers for each remote. That is expected in development.
3. Open the shell
Open http://localhost:4300 in your browser. You should see a header with the project name and three links: home, catalog and cart. The home page shows both remotes, one under the other.
Click catalog. You should see a heading "catalog" and a button that says "Clicked 0 times". That button belongs to the catalog remote. The shell loaded it from localhost:4311 while the page was open.
Stop the dev server with Ctrl+C. See Develop locally for ports and overrides.
4. Add a feature
Features are added with one command. First look at what the change would be, without writing anything:
You should see a summary, then the list of files and a diff for each one:
Nothing was written. Now apply it and install:
You should see the same list and then this line:
The feature also created a shared contracts package for event types. Add features explains the plan, the diff and the rollback.
5. Run the checks
The doctor checks the project for the problems that cause trouble later. Run it:
You should see one line per check and a summary. The first and last lines:
The budget check needs a build first. Build, then measure:
You should see the JavaScript size of the shell and each remote:
The numbers above came from the 0.4.0 default project, before adding event-bus. Yours may differ slightly. CI and budgets explains what the limits mean.
What you built
You have a pnpm monorepo with a shell, two remotes, a dev registry and a set of checks. Each remote can be built and deployed on its own.
Next steps
- Read every generated file: Project structure.
- Add a third remote: Add a remote.
- Understand the boot sequence: How it works.
- Something failed: Troubleshooting.