What does this PR do?

A new isolated dynamic import system was introduced to prevent static analysis from eagerly bundling app dependencies. This ensures that app components, API handlers, and related logic are only compiled and loaded on demand at runtime, while a lightweight manifest system enables fast navigation and metadata access without triggering compilation.

  • Fixes #23104 (GitHub issue number)
  • Fixes CAL-6255 (Linear issue number - should be visible at the bottom of the GitHub issue description)

Files Changed

1. /packages/app-store/appLoader.ts – New

Purpose: Centralized dynamic import system for apps.
Key Functions:

  • loadAppMetadata() – Loads app configuration without components.
  • loadAppApiHandlers() – Imports API handlers on demand.
  • loadAppComponents() – Imports React components on demand.
  • loadApp() – Full app loading with error handling.
  • loadAppsBatch() – Batch import support.
  • loadAppFamily() – Imports related app dependencies.

Impact: Eliminates static analysis of app dependencies, preventing unnecessary compilation.


2. /packages/app-store/manifest.ts – New

Purpose: Provides metadata-only access to app information.
Key Functions:

  • getAppManifest() – Returns all app metadata.
  • getAppCategories() – Provides category data for filtering.
  • searchApps() – Enables lightweight text search.
  • getAppStats() – Supplies usage metrics.

Impact: Enables app store navigation and filtering without compiling components.


3. /apps/web/pages/api/integrations/[...args].ts – Modified

  • Before: import { getAppWithMetadata } from "@calcom/app-store/server";
  • After: import { loadAppApiHandlers } from "@calcom/app-store/appLoader";

Impact: API routes now load only the relevant handlers at runtime, avoiding compilation of unrelated app code.


4. /apps/web/app/(use-page-wrapper)/apps/(homepage)/page.tsx – Modified

  • Migrated to use the new manifest system.
  • Introduced compatibility layer to map AppManifestEntryAppFrontendPayload.

Impact: Homepage navigation and search operate entirely on manifest data, avoiding compilation of app components.

Image

Screenshot from 2025-09-02 14-06-52

Video

https://github.com/user-attachments/assets/f11beb7d-4c7d-4e9f-a5f2-3edaf1a57e20

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

/claim #23104

Claim

Total prize pool $2,000
Total paid $0
Status Pending
Submitted September 03, 2025
Last updated September 03, 2025

Contributors

VA

Vansh Gilhotra

@Vansh5632

100%

Sponsors

CA

Cal.com, Inc.

@cal

$2,000