Giter Club home page Giter Club logo

pavanaditya / microfrontend-modulefederation-react-lerna Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 330 KB

A micro frontend app built over Module Federation - Webpack and Lerna Monorepo. Used for sharing components as modules acroos different Frontend application.

HTML 3.12% TypeScript 43.58% JavaScript 49.99% Shell 3.31%
lerna-monorepo micro-frontend microfrontend-architecture microfrontends module-federation react-microfrontend react-tsx react-tsx-lerna-webpack webpack5 webpack5-module-federation

microfrontend-modulefederation-react-lerna's Introduction

Micro Frontends

Micro Frontends is a concept of sharing components as modules/services with different frontend applications, without actually exporting the app as a whole.
This is a frontend-replica to the concept of Microservices used in any API building backend.

Tech Stack

  • React: A Frontend Library used to build applications using HTML/CSS/JS Know More,

  • Typescript: A Wrapper language applied over javascript to perform type casting rules Know More,

  • Chakra UI: Simple, modular and accessible component library that gives you the building blocks you need to build your React applications Know More,

  • Webpack: Module bundler. Its main purpose is to bundle JavaScript files for usage in a browser Know More,

  • Lerna: Monorepo system for managing and publishing multiple JavaScript/TypeScript packages from the same repository. Know More

  • This app uses Module Federation plugin from Webpack to share and consume components as micro frontends.

About

This project consist of three pieces, a host app container and two remotes app1 app2.

Workflow:

  • app1 expose CounterAppOne component.
  • app2 expose CounterAppTwo header component.
  • container import CounterAppOne and CounterAppTwo component.

Running Demo

In order to run the demo I highly recommend installing lerna globally via

npm i -g lerna

Then,

lerna bootstrap

Run the command above at the root of your project. This command will make sure you have dependencies you need in order to run this project.

Finally,

npm run start

Lerna will start all your projects parallelly and open your browser.

Screenshots

App Screenshot

Article

POC made with reference to the article on Micro Frontends. Introduction to Micro Frontends with Module Federation, React and Typescript

microfrontend-modulefederation-react-lerna's People

Contributors

pavanaditya avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.