Open source  /  Implementation guide

Open-source implementation · App & extension audits

Audit a commerce platform’s app layer on open source

What this is. A build-it-yourself path to the same outcome, made from open-source parts you host. It does not publish 5 Kings’ internal method, client data, or any third party’s confidential information — and it says plainly where the open-source path is weaker than a specialist service.

In one paragraph

Every commerce platform — Shopify, BigCommerce, Magento, Shopware, PrestaShop, Salesforce Commerce, SAP Commerce — will tell you which apps are installed. None of them will tell you what those apps are doing to your page weight, your data model or your checkout. This guide builds that audit from open-source parts.

What you end up with

  • A per-app inventory: what it injects, where, on which templates, and how many bytes
  • A measured cost per app in render-blocking requests, third-party connections and layout shift
  • A data-flow map of which app writes which field, so a removal has a predictable blast radius
  • A removal test in a copy of the store before anything is uninstalled

The reference stack

Every project below is open source and self-hostable. Licences are the ones the project publishes today; check them against your own distribution model before you ship, because a licence can change and an AGPL project has obligations a MIT project does not.

LayerOpen-source projectLicenceWhat it does for you
Page measurementLighthouse CIApache-2.0Baseline per template before and after disabling an app.
Third-party attributionChrome DevTools Protocol via PlaywrightApache-2.0Record every network request with an initiator stack, then group requests by the script that caused them.
Script ownershipOpenCookieDatabase / script URL manifestsApache-2.0 / CCMap third-party domains to vendors so an unknown request becomes a named app.
Platform APIsPlatform Admin/GraphQL SDKsvaries (MIT/Apache typically)The only reliable source of installed apps, scopes and webhooks. Enumerate from the API, not from the theme.
Data modelPlatform schema dump + dbt-coreApache-2.0Model which tables/attributes apps add, and document it as versioned SQL so a schema change shows up as a failing model.
Store copyPlatform staging environment or a containerised cloneplatformNever test a removal in production. Run the removal matrix on a clone with real-ish data.

Build it

1. Enumerate apps from the API, not from the theme

Theme files reveal only apps that inject markup. Apps that work through webhooks, checkout extensions, admin scripts or a proxy are invisible there. Start from the platform’s app/extension API and record app id, version, scopes and installed date.

2. Capture a request→initiator graph per template

For each template type (home, collection, product, cart, checkout), record all network requests with the initiating script. That mapping is what turns “14 third parties” into “this app is responsible for 6 of them”.

3. Measure with one app off at a time

In the clone, disable one app, re-run Lighthouse and the request capture, and store the delta. One at a time, or the numbers are unattributable. Expect installs that are load-bearing only because another app depends on them.

4. Map the data flow

For each app, list the objects it reads and writes: metafields, custom fields, tags, order attributes, customer fields. This map is the real deliverable — it is what stops a removal from silently breaking fulfilment, tax or email.

5. Rank by cost per business function

A 200 KB script that recovers abandoned carts is not the same as a 200 KB script that powers a popup nobody closes. Attach function to cost before recommending anything.

6. Write the removal plan with a rollback

Order of removal, what depends on what, what to verify after each step, and how to restore. If you cannot describe the rollback, the removal is not ready.

Acceptance checks

If you cannot verify a claim, it is not a finding. These are the checks that close the work; each one can be run by somebody who did not build it.

Acceptance checkHow to verify it
Every installed app appears in the inventoryAPI app list minus inventory rows = 0.
Every third-party request maps to an app or is explicitly unknownGroup captured requests by domain; the unknown count is a tracked number that must trend down.
Bytes and requests per template are recorded before and after each changeTwo Lighthouse CI runs per toggle, stored with the app id and version.
The data map names a writer for every field the app touchesOne row per (app, object, field, read/write); no blank cells.
Checkout and order flow still pass after each removalA scripted end-to-end order in the clone, plus a webhook delivery check.
Rollback is written and tested onceRe-install from the platform, not from a backup, and confirm the app's data is still present.

Effort and cost

Estimate
Skill neededIntermediate: platform admin access, a scripting language, basic performance literacy
Build time1–2 days for the capture tooling, 1 day per 10 apps to measure and map
Running costRe-run after every app install or platform update; quarterly minimum
What you must hostA laptop plus a platform staging store. No servers needed.

What open source does not give you

The honest half of the comparison. Each of these is a reason somebody buys the service instead of building it, and pretending otherwise would make the rest of this page worthless.

  • Apps that run entirely server-side (tax, ERP, OMS) usually cannot be measured from the storefront at all. For those, the audit is an API and webhook review, not a byte count.
  • Checkout is often closed to third-party measurement — Shopify Plus and Salesforce Commerce especially. You will measure up to the checkout boundary and no further.
  • Removing an app does not remove the data it wrote. Cleanup is a separate, sequenced job with its own rollback.
  • Some app vendors will not let you test outside a paid plan. Budget a trial before promising a removal.

Scope only, stated so you can compare it with the build above.

  • An independent verdict on whether each app earns its cost, which needs your order and margin data
  • The removal sequence and its rollback, executed with a verification fetch after each step
  • Coordination with app vendors when the removal needs their cooperation

Sources and further reading

What this page does not include. This guide documents an open-source implementation of the same outcome. It deliberately leaves out 5 Kings’ internal playbooks, client data, vendor terms and unpublished method: we publish what any competent team can reproduce, and we do not publish what belongs to a client or to a contract. Where a step depends on a decision only your business can make, the guide says so instead of guessing.

Take it with you

Audit a commerce platform’s app layer on open source

The full guide as an A4 PDF: the reference stack with licences, the build steps, the acceptance checks and the honest limits — in one file you can hand to an engineer or print for a planning session.

PDF · A4 · no email required · free to redistribute with attribution

Open-source Guides & PDFs