More Premium Hugo Themes Premium React Themes

Federated Modules Monorepo Starter

Starter to bootstrap interconnected React apps with module federation and shared components

Federated Modules Monorepo Starter

Starter to bootstrap interconnected React apps with module federation and shared components

Author Avatar Theme by bohkoval
Github Stars Github Stars: 26
Last Commit Last Commit: Jan 24, 2023 -
First Commit Created: Jun 19, 2023 -
Federated Modules Monorepo Starter screenshot

Overview

The Federated Modules Monorepo Starter is a starter kit for developing web applications. It is composed of React microfrontends and shared components using Module Federation. The aim of this starter kit is to provide a convenient setup for building modular and scalable applications.

Features

  • Module Federation: Allows for the composition of React microfrontends and shared components, enabling the development of modular applications.
  • Fast Installation: Utilizes the pnpm package manager for faster installation and to solve NPM doppelgangers problem.
  • Dev Experience: Integrates with husky for better development experience by providing git hooks.
  • Development: Start the development environment with pnpm dev. This command will run the entire application.
  • Building: Compile the application with pnpm build.
  • Local Serve: Simulate a real server environment with pnpm serve:local. This command serves the static files via serve.
  • Testing: Run tests for the whole application using Jest and React Testing Library with pnpm test. For End-to-End (E2E) tests using Playwright, use pnpm e2e. E2E tests are run against serve:local.
  • Linting: Launch ESLint check for the entire application with pnpm lint.
  • Deployment: Deploy the application to AWS using CDK with pnpm infra:deploy. The deployment includes S3 and CloudFront. It is recommended to have separate AWS accounts for each stage (dev/stage/prod) to avoid naming conflicts.

Installation

To install the Federated Modules Monorepo Starter, follow these steps:

  1. Install Node 16 or later.
  2. Install the pnpm package manager. Visit the official documentation for installation instructions.
  3. Run pnpm install to install the dependencies.
  4. [Optional, but recommended] Install husky and initialize it by running npx husky install to provide a better dev experience with git hooks.

Summary

The Federated Modules Monorepo Starter is a comprehensive starter kit for developing modular web applications using React and Module Federation. It provides a convenient development environment, testing capabilities, and deployment to AWS. By utilizing technologies such as Turborepo, pnpm, and TypeScript, it offers efficient monorepo management and faster package management. With the inclusion of popular libraries and tools like React Router, React Helmet, and Material UI, it enables developers to build scalable and customizable applications.