Skip to content

mbellagamba/microfrontends-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro-frontends Demo

A local environment for a demo micro-frontends implementation. The app is composed by 4 micro-frontends: the app shell, the landing page, the auth and the catalog. Each micro-frontend runs on a separate container. Catalog requires authentication.

Requirements

Make sure to have installed Docker 17.06.0+ and Docker Compose on your system.

Getting started

Start developing running this command.

docker-compose up

or this one to start containers silently

docker-compose up -d

For each micro-frontend, it will create a container, install dependencies and run webpack dev server. The first time this would probably take some minutes: you better have a coffee in the meantime.

When all containers are up and running, the app is available at http://localhost:3000.

Stop containers pressing ctrl+C or, if started silently, running this command

docker-compose down

Containers

  • App shell (port:3000): it is responsible for routing and loading micro-frontends
  • Landing (port:3001): the landing page micro-frontend
  • Auth (port:3002): the login micro-frontend
  • Catalog (port:3003): the authenticated catalog micro-frontend

Note: This infrastructure relies on public port assigned to each micro-frontend, thus it cannot be deployed correctly on a server.

Future development

  • Make micro-frontends deployable: update the webpack configuration in order to change the public path for each micro-frontend depending on some enviroment variable.
  • Make global build script
  • Make a deploy script/procedure
  • Transitions and loading
  • Lifecycle hooks

About

A micro-frontends demo with client side composition.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published