WhoBuilt

Super app development made easy with Re.Pack

Jun 2, 2023· 58 min· 4.6K views·Watch on YouTube

Speakers

Callstack software engineers Kuba Romanchek, a Re.Pack maintainer and practitioner Rafał Zakszewski, and a Callstack host explain how Re.Pack and Module Federation can support super app development, with a demo and audience Q&A.

Super apps and Re.Pack

Kuba describes a super app as one app that combines services that could otherwise be separate, such as messaging and payments. The presenters use Re.Pack with Webpack and Module Federation to load JavaScript features remotely, letting teams build parts of an app independently. They note that this architecture suits specific large scale or multi app needs, and can add coordination and complexity.

Super App Showcase demo

The demo shows an app combining Auth, Booking, Shopping, News, and Dashboard mini apps. News comes from a separate repository, and the mini apps can also run as standalone applications. The presenters say users experience the result much like a regular app, while the architecture lets teams deploy features independently and reuse them across hosts.

Re.Pack 3.2.0: code signing

The presenters describe code signing as a way to check that a downloaded bundle came from an expected publisher and has not been altered. Re.Pack signs bundle contents during compilation, then the app verifies the signature and bundle hash before loading it. They expect little performance overhead, but say documentation was not yet available at the time of the webinar.

Remote assets and deployment

Re.Pack 3.2.0 adds support for loading assets from a CDN rather than embedding them in JavaScript bundles, which can reduce bundle size and improve startup time. Re.Pack records image dimensions and resolves the appropriate scale at runtime, while developers need to account for network loading with placeholders or fallbacks. The presenters recommend using Module Federation for independently deployed feature updates, while new features should follow the app store release process.

Audience questions and practical limits

The Q&A clarifies that Webpack replaces Metro in this setup, while Re.Pack provides the toolkit for using Webpack and related features. The presenters say Expo support was not official, and native dependencies must be installed in each host app that uses a federated module. They advise limiting props between host and mini app to keep them loosely coupled, and choosing Re.Pack only when the app's scale or sharing needs justify the added architecture.

Takeaways

  • Use Module Federation when separate teams need to ship JavaScript features independently or share them across apps.
  • A federated mini app can also be built as a standalone React Native app, but its native dependencies must be present in each host.
  • Code signing verifies downloaded bundles before the app loads them; plan for key protection and verification in the client.
  • Remote assets can reduce bundle size, but require CDN configuration and a loading experience for users.
  • Adopt Re.Pack for a clear scale or reuse need; the presenters advise sticking with Metro when it meets the team's needs.

Mentioned in this talk

Search inside this talk

What was claimed 11

Related talks