Skip to main content

Modernizing the Pelcro JavaScript SDK for Faster Performance

🔍 Problem Statement
The Pelcro JavaScript SDK (pelcro package) can be further optimized to improve JavaScript loading performance and enhance the end-user experience of the Pelcro interface. The current build setup and testing framework work reliably, but they do not take full advantage of the latest improvements in the JavaScript ecosystem. This creates opportunities to reduce bundle size, improve loading speed, and streamline developer workflows.

💡 User Story
As a Pelcro end user, I want the SDK to load quickly and render the user interface smoothly, so that my interaction with subscriptions, paywalls, and account features feels seamless.

As a developer integrating Pelcro, I want the SDK to be built with modern tooling and testing frameworks, so that I can confidently deliver a fast, reliable, and secure experience to my customers.

🎯 Definition of Done (DoD)
A feature is done when:

✔️ Modernize tooling

  • Upgrade Node.js to the current Long Term Support (LTS) release.

  • Switch from Yarn to pnpm for faster and more efficient dependency management.

  • Update major dependencies (Babel, ESLint, etc.) to their latest stable versions.

✔️ Modernize build system

  • Upgrade from Webpack 4 to Webpack 5 for better performance and compatibility.

  • Migrate to webpack.config.mjs with ES modules and native import syntax.

✔️ Dependencies streamlined

  • Remove any unused dependencies or devDependencies.

  • Update remaining dependencies in package.json to their latest stable versions.

Test Cases

  1. Added unit test coverage for all UI components listed in the coverage report.

  2. Verified rendering, props handling, and default states.

  3. Covered edge cases for conditional rendering and error handling.

  4. Ensured event handlers and callbacks are triggered correctly.

  5. Validated data formatting and helper utilities with both valid and invalid inputs.

  6. Increased overall branch and function coverage across the UI component library.

Status: Available2 comments

Log in to comment and vote

Comments2

  • Michael Ghattas

    Team•

    Sep 5, 2025

    Hey Everyone, just wanted to let you know that this change has been released and resulted in a 50% reduction of the JS-SDK package which should result in a performance increase for the user interfaces. We will now work on the next task of improving the caching of the open API end points which will result in another significant improvement to the front-end user experience.

  • Michael Ghattas

    •

    Aug 26, 2025

    We are working on the following:

    1- Improve JS-SDK size
    2- Improve the Site GET and Plan GET API endpoints from the Open API

    3- Improving the size of the new default user interface

    4- Implementing the ZStandard
    5- Improving the Stripe integration to enhance performance

    Please contact our product team if you have any questions on any of these