Open source · MIT · Chrome Manifest V3

How Salesforce Org Compare works under the hood

A technical guide grounded in the public repository: architecture, browser-session authentication, local storage, Salesforce UI integration, and the contribution workflow.

View repository on GitHub
Salesforce Org Compare: multi-org, browser session, and no CLI
Official visual from the project repository.

Key engineering decisions

The extension operates close to Salesforce while keeping working state in the browser.

Manifest V3

Chrome runtime

The background.js service worker coordinates messages, authentication, caches, and tool calls.

API 63.0

Salesforce

Each org keeps its selected version; the project's current default API version is 63.0.

Local-first

Working data

Preferences, aliases, comparisons, queries, and scripts live in chrome.storage.local.

Runtime

Authentication

The session cookie is read when needed and is not persisted in extension storage.

No CDN

Packaged interface

Monaco Editor, icons, and interface resources ship inside the extension.

MIT

Open source

The repository can be inspected, studied, and extended under the MIT license.

From a user action to Salesforce

Local extension pages send actions to the service worker; it reuses the active session and calls official APIs with the user's permissions.

Operation flow

The same pattern supports a SOQL query, a metadata diff, or opening a log from Setup.

The user chooses an actionThe UI keeps the alias and org context.
The page sends a messageThe internal channel connects the tool to the service worker.
The session is resolvedThe extension finds the org and reads the session at runtime.
Salesforce is calledREST, Tooling, or Metadata API responds by permission and version.
The result is presentedA diff, table, log, or editor is rendered locally and may be cached.

Project structure

Responsibilities are separated across runtime, main UI, Salesforce integration, and shared resources.

background/

Org authentication, message handlers, caches, and telemetry.

code/

Main app: comparator, tools, and Monaco editor.

popup/

Org management, settings, and extension controls.

sfInject/

Optional content scripts and injectors for Lightning and Setup.

shared/

Shared APIs, internationalisation, and feature controls.

tests/ · e2e/

Unit tests with Vitest and end-to-end flows with Playwright.

Technical Salesforce UI integration

sfInject/content/bundle.js is generated. Its host checks the URL, frame, settings, and org or session requirements before mounting each injector; it also observes Lightning re-renders and removes controls when they no longer apply.

Explore Salesforce UI Integration →

Development environment

The repository uses Node.js, npm, Vitest, and Playwright. Installation rebuilds the Salesforce UI Integration bundle.

npm install
npm test
npm run test:e2e
npm run build:sf-inject
npm run minify:extension
npm run pack:chrome

Content checked against the project's public README ↗.