Federated Modules Monorepo Starter

screenshot of Federated Modules Monorepo Starter
react
material-ui

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

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.

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.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

material-ui
Material UI

material-ui adds classes to Tailwind CSS for all common UI components. Classes like btn, card, etc. This allows us to focus on important things instead of making basic elements for every project.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

turborepo
Turborepo

Turbo is an incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.

Zustand

Zustand is a lightweight state management library for React that provides a simple and intuitive API for managing state in your application. It allows developers to easily create and manage global state, and provides a powerful set of tools for optimizing performance and improving developer productivity. Zustand is designed to be easy to use and easy to learn, making it a popular choice for developers of all skill levels.