Solutions · Privacy

Privacy-first frontends: no trackers, nothing before consent

A privacy-first frontend makes no third-party request and writes no storage key that its spec does not list and justify, and it stores nothing optional before consent. We write those rules into the spec and check them on every change.

Updated 22 November 2026

The problem

Most frontends leak data without anyone deciding they should. A tag manager loads a pixel, a chat widget sets three cookies, and an embedded video calls home before the visitor has agreed to anything. Nobody owns the full list. When a privacy review or a regulator asks what the site sends and stores, the honest answer is often “we would need to check”.

This builds up quietly. Each script is added for a good reason by a different team, and each one brings dependencies of its own. Over a few releases, the page that started with two requests makes forty. Consent banners make it worse when they record a choice but don’t enforce it, because the scripts load anyway.

The cost shows up late: a failed security or privacy review, a payment partner asking about data flows, a rewrite of the consent layer under deadline. The fix is to make the list explicit and to treat every unlisted request as a defect.

What we put in the spec

The spec turns “privacy-first” from an intention into rules that can be tested. It starts in the product constitution, which states the stance once for the whole product. Each feature spec then records the data that feature collects and why. There are four parts.

1. A third-party request inventory. Every origin the frontend may contact is listed, with its purpose, the data it receives, and whether it needs consent. Anything not on the list is blocked by the Content Security Policy and fails the build.

2. A storage key inventory. Every cookie, localStorage key, sessionStorage key and IndexedDB store is listed, with its lifetime, purpose and consent category. Strictly necessary keys are marked as such. Everything else waits for consent.

3. Data minimisation per field. Every form field is mapped to a purpose. A field with no purpose is removed. A field with a purpose but no need to persist is never stored.

4. Consent behaviour. What loads before a choice, what loads after each choice, and what happens when consent is withdrawn.

Each rule becomes an acceptance criterion:

Feature: Nothing optional before consent
  Scenario: First visit, no choice made
    Given a visitor with no stored consent
    When any page loads
    Then no request is made to an origin outside the inventory's "necessary" group
    And no storage key outside the "necessary" group is written
    And the page stays fully usable without a choice
Inventory entry Example fields
Third-party origin Origin, purpose, data sent, consent category, owner, review date
Storage key Name, type, lifetime, purpose, consent category
Form field Field, purpose, retained (yes/no), where it goes

How it is checked before release

Privacy rules are only as good as their enforcement. We check them in three places, so a regression is caught at the pull request rather than in a review months later.

  • A strict Content Security Policy. connect-src, script-src, img-src and frame-src are generated from the inventory. An unlisted origin is blocked in the browser and reported.
  • Automated network and storage tests. End-to-end tests load each key page in a clean browser profile, record every request and every storage write, and compare them with the inventory. Any difference fails the build. The tests run with consent unset, granted and withdrawn.
  • A dependency review. A new package that adds a network call or a storage write must update the inventory in the same pull request, or the quality gates reject it.

Senior review covers what automation can’t: whether a stated purpose is honest, and whether a field is really needed.

What changes for you

You can answer the question “what does our site send and store?” from a document instead of an investigation. The inventory is versioned with the spec, so every change to it is visible, reviewed and dated.

Privacy reviews get shorter, because the evidence already exists. New scripts arrive as a decision with an owner, not a side effect. If you later need a full review of an existing frontend, the same method runs as an audit, with findings written as spec changes.

What you receive

Deliverable Format
Third-party request inventory A table in the spec, versioned
Storage key inventory A table in the spec, versioned
Field-to-purpose map Part of each feature spec
Consent behaviour criteria Given/When/Then, run as tests
CSP generated from the inventory Configuration in your repository
Network and storage test suite End-to-end tests in your CI
Release evidence The inventory section of each trace report

Questions we ask first

Before we write the inventory, we need four answers from you. Which services do you rely on today, and who owns each one? Which data does your legal or compliance team consider sensitive? Which markets set consent rules you must follow? Your team confirms the rules. We implement them precisely, and we don’t give legal advice.

If you don’t know the answers yet, that is normal. Finding them is part of a Spec Sprint.

Start with an audit

One to two weeks, fixed scope. Findings arrive as spec changes, ready to build.

Ask about an audit