Architecture of the JavaScript Modular SDK

The following diagram is an overview to illustrate the structure of the JavaScript SDK. There is no class hierarchy that will be followed here as this structure is modeled as a Modular SDK, where each module representing a component can be accessed independently as and when required.

catalyst_js_sdk_arch_dig

  • The structure comprises three overarching layers:
    • Component Layer: This layer acts as the code scaffolding that will contain your required logic to access the different required Catalyst services programmatically.
    • Authentication Layer: This is the layer that handles all the authentication requirements, such as token storage, session management, identity management, to name a few. This layer is expressly used to ensure secure API access. This layer will also handle the authentication requirement to handle server operations and browser operations.
    • Transport Layer: This layer will handle all HTTP requests made to the required components through the SDK.
  • The authentication requirement to initialize the SDK and access the required component through code is handled in the following manner:
    • Environment-based Authentication: This type of authentication comes into effect when you configure the required authentication credentials as Environment Variables in your Functions. You will set the credentials in the CATALYST_AUTH variable and the configuration in the CATALYST_CONFIG variable.
    • Reusing Initialized Authentication: This is the authentication you use to initialize the SDK to access a particular component. You are not expressly required to re-initialize each initialization, to access different components. You can reuse the authentication you had previously applied and continue to initialize the modules of the required components.
  • Precedence in Authentication: If you have implemented environment-based authentication, then that will be considered as default when you do not authenticate during initialization. This makes authentication during initialization of each component optional.

Last Updated 2026-07-02 14:51:41 +0530 IST