Skip to content

@memberjunction/server-bootstrap-lite

Lightweight class registrations manifest for MemberJunction server-side tools. Excludes heavy and ESM-incompatible dependencies (communication providers, storage, bizapps actions) that are unnecessary for CLI tools, CodeGen, MCP Server, and similar lightweight applications.

This package provides a pre-built class registration manifest that imports and registers all core @memberjunction/* classes needed for server-side operation, but intentionally excludes heavyweight packages that are only needed for the full MJAPI server.

graph TD
    A["server-bootstrap-lite"] --> B["Core Entity Classes"]
    A --> C["Core Action Classes"]
    A --> D["AI Engine Classes"]
    A --> E["Metadata Sync"]

    F["server-bootstrap<br/>(Full)"] --> A
    F --> G["Communication Providers"]
    F --> H["Storage Providers"]
    F --> I["BizApps Actions"]
    F --> J["Skip Integration"]

    K["CLI Tools / CodeGen"] --> A
    L["MJAPI Server"] --> F

    style A fill:#2d6a9f,stroke:#1a4971,color:#fff
    style F fill:#7c5295,stroke:#563a6b,color:#fff
    style K fill:#2d8659,stroke:#1a5c3a,color:#fff
    style L fill:#b8762f,stroke:#8a5722,color:#fff
    style G fill:#b8762f,stroke:#8a5722,color:#fff
    style H fill:#b8762f,stroke:#8a5722,color:#fff
    style I fill:#b8762f,stroke:#8a5722,color:#fff
Terminal window
npm install @memberjunction/server-bootstrap-lite

Use server-bootstrap-lite instead of server-bootstrap for:

ApplicationUse Lite?Why
MJCLIYesDoes not need communication/storage providers
CodeGen (CodeGenLib, MJCodeGenAPI)YesOnly needs entity metadata and class registration
MCP ServerYesLightweight integration, no email/SMS needed
A2A ServerYesAgent-to-agent, no UI or storage dependencies
Custom CLI toolsYesMinimal footprint for scripting
MJAPI ServerNoNeeds full manifest with all providers
MJ ExplorerNoNeeds ng-bootstrap for Angular manifests
// Import for side effects -- triggers all class registrations
import '@memberjunction/server-bootstrap-lite';
// Or import the manifest metadata
import {
CLASS_REGISTRATIONS,
CLASS_REGISTRATIONS_MANIFEST_LOADED,
CLASS_REGISTRATIONS_COUNT,
CLASS_REGISTRATIONS_PACKAGES
} from '@memberjunction/server-bootstrap-lite';
console.log(`Registered ${CLASS_REGISTRATIONS_COUNT} classes from ${CLASS_REGISTRATIONS_PACKAGES.length} packages`);
ExportTypeDescription
CLASS_REGISTRATIONSobject[]Array of class instances that create static import paths
CLASS_REGISTRATIONS_MANIFEST_LOADEDbooleanAlways true, confirms manifest was loaded
CLASS_REGISTRATIONS_COUNTnumberTotal number of registered classes
CLASS_REGISTRATIONS_PACKAGESstring[]List of package names included in the manifest

Modern bundlers (ESBuild, Vite) use tree-shaking to eliminate unused code. MemberJunction’s @RegisterClass decorators rely on dynamic class instantiation via MJGlobal.ClassFactory, which bundlers cannot detect. The manifest system prevents tree-shaking by creating explicit static import paths for every decorated class.

This “lite” variant includes a curated subset of the full manifest, excluding packages that:

  • Require ESM-incompatible native modules
  • Pull in heavy communication SDKs (email, SMS, push)
  • Include cloud storage providers
  • Contain business application-specific actions

The lite manifest includes core MemberJunction packages for:

  • Entity class registration
  • Action class registration
  • AI engine and model drivers
  • Metadata synchronization
  • Core business logic

See the full server-bootstrap package for the complete manifest including all providers.

ISC