Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Latest commit

 

History

History
86 lines (55 loc) · 5.23 KB

README.md

File metadata and controls

86 lines (55 loc) · 5.23 KB

🔮 Nuz · Status GitHub last commit GitHub issues License PRs Welcome

Join the community on Spectrum

📌 This branch to prepare for the 1.0.0 version, suggestions and bug reports are welcome!

🔮 Nuz is an ecosystem to manage runtime packages for web platform.

Nuz is like a Node.js require but the modules will be resolved from the network at runtime instead of bundle in the main source. This changes the way the web platform is developed, everything is almost shared and updated consistently and constantly, it also solves the problem when implement Micro Frontends.

Take an easy to understand example

When you use a require like below:

require('module-awesome')

Traditionally, the resolver will look for this module in the node_modules directory (or where you have configured paths) to find module-awesome and use it. module-awesome will be bundled into your code when deploy to production, and when you need to change or upgrade you will have to bundle it all up.

Use with Nuz, module-awesome will be resolved from the network and use it. You will not need to bundle module-awesome into your code when deploy to production. When you need to update, you also do not need to bundle used places!

Practical use case example

For example, if you have a homepage like Facebook's, your business develops products under "product teams" and you have multiple teams together, you don't want teams dependent on each other and you want everything to read, from APIs to Frontends.

Take a look at the picture below (source from internet, I have added note).

Facebook Newsfeed example

We have teams that follow the scope comment:

  • @fb-products: Manage other features.
  • @fb-ads: Manage ads.
  • @fb-messages: Manage messages of users.
  • @fb-feeds: Manage information about newfeed users.
  • @fb-design-system (pink): Design system team.

Problems that may be encountered are

  • The source code is too big, very hard to manage:
    • Can a member view the frontends source code of all??
    • Source code management: branching, creating PR, and release.
    • Is the source code too large to require a longer build time? Both develop mode and production mode.
  • Decentralization of teams.
  • Debug issues, develop and release new features.

When using Nuz, you can solve that problem by

  • Split modules like Microservices for Frontends (called MicroFrontends) by teams:
    • A repository (or module) only contains a component or a feature.
    • You easily assign repository access to members of teams.
    • By splitting the module, you can easily manage, develop features, and release it.
  • When a problem occurs, only that module is down. Other modules still work well.
  • No need to bundle source code agian. When a module like the component button of @fb-design-system is updated, users do not need to rebuild it as it is runtime modules.

About

Packages

Name Description Other
@nuz/core Core to manage and handles resolve runtime packages in the application. npm version npm downloads
@nuz/cli The command-line interfaces to manage modules and interact with the registry server. npm version npm downloads
@nuz/registry A factory to create the registry server for the Nuz ecosystem. npm version npm downloads

And other packages just create to using in the main packages.

How it work?

View the workflow here 🙈

Quickstart

Get started in 5 minutes

Documentation

See more information about documents here 📚

Contributing

Please see our CONTRIBUTING.md 📝

Author

Hieu Lam (@lamhieu-vk).