This project is a monorepo managed with a pnpm workspace.
api-products/: MeteorJS API that serves product data over RESThome/: Main host app that loads remotes via federationlist-products/: Remote React app that renders the product list
pnpm installTo see the full architecture running, use three terminals:
# 1) Meteor API
pnpm --filter api-products start
# 2) Remote list-products (port 4174 by default)
pnpm --filter list-products dev
# 3) Host shell that consumes the remote (port 4173)
pnpm --filter home devThe Meteor API listens on port 3000 and exposes GET /api/products for the remotes to consume.
-
Install the Meteor runtime (if you do not have it yet):
curl https://install.meteor.com/ | sh -
Install the package dependencies (includes Meteor types for TypeScript):
cd api-products meteor npm install -
Start the API (default port 3000):
meteor run # or, from the monorepo root: pnpm --filter api-products start -
Available endpoints:
GET http://localhost:3000/api/products— lists all seeded products.POST http://localhost:3000/api/products— creates a product ({ name, price, stock? }) (optional).
If your editor's TypeScript cannot resolve meteor/* imports, ensure meteor npm install was run (it downloads @types/meteor) and that api-products/tsconfig.json is included in the project.
- ESLint:
eslint.config.jsat the repo root - TypeScript:
tsconfig.base.jsonat the repo root
- Backend (MeteorJS): provides a REST endpoint (
/api/products) with automatic seeding and open CORS. - Remotes (Module Federation):
list-productsbuilds aremote-entryESM served by Vite for consumption in other apps. - Host:
homeloads theremote-entryat runtime and displays the federated catalog, keeping front-end packages independent and scalable.
- Each package can have its own dependencies and configuration.
- Always run
pnpmfrom the monorepo root to install dependencies and execute scripts.