Fast. Simple. No meetings. No delays.
Home / Blog / Denmark / GDPR by Design: Building Web Applications Danish Companies Can Trust

GDPR by Design: Building Web Applications Danish Companies Can Trust

Data minimisation, consent records, retention and deletion flows: how to build GDPR-aware features into a web application from day one.

Cover graphic for the article: GDPR by Design: Building Web Applications Danish Companies Can Trust

GDPR web application development means treating personal data as a design constraint from the first sprint: collect less, record why you hold each item, make consent and deletion real features, and know where every processor stores data. This article covers the engineering side. It is not legal advice, so have a qualified adviser confirm what applies to you.

Privacy by design in practice

GDPR is the European Union's data protection regulation, and Danish companies handle personal data under it alongside national rules overseen by Datatilsynet, the Danish Data Protection Agency. Privacy by design is the idea that protection is built into systems by default rather than added after launch. Requirements change and interpretation depends on your situation, so confirm the details with the official EU and Datatilsynet sources and a qualified adviser. What follows are engineering habits that make compliance work easier whatever the legal conclusion.

In practice, privacy by design becomes a handful of questions asked at every feature:

  • What personal data does this feature need, and why?
  • Who can see it, and could they see less?
  • How long do we keep it, and what removes it?
  • Where does it travel, and which supplier touches it?
  • How would we find, export or delete one person's data?

Put these in your definition of done and in the pull request template, so they are asked every time, not only before audits. A short data inventory kept next to the code, listing each category of personal data, its purpose, where it lives and who processes it, makes every later task easier.

Collect less: data minimisation

The cheapest data to protect is the data you never collected. For every form field and every column, ask whether the application truly needs it to do its job.

  • Drop optional fields that nobody uses. If a date of birth is not needed, do not ask for it.
  • Prefer derived values. Store that a customer is over a threshold, rather than their full birth date, if that is all you need.
  • Avoid free-text boxes where users may paste sensitive details; if you must have them, warn users and restrict who can read them.
  • Limit logs. Application logs often capture email addresses, tokens and request bodies by accident. Configure what is recorded and scrub it.
  • Separate identity from activity. Where analytics are needed, use identifiers that do not reveal who the person is, and keep the mapping apart.

Take special care with sensitive categories of data, such as health information. Both the legal bar and the harm from a leak are higher, so involve your adviser early.

Consent is only one possible legal basis for processing, and often not the right one. Your adviser will tell you which basis fits each purpose. Where you do rely on consent, the software should be able to prove and honour it.

A consent record should capture:

  • Who gave it, linked to a user or pseudonymous identifier.
  • What they agreed to, referencing the exact wording and version shown.
  • When and through which channel, such as web form or app.
  • The current state, and the date of any withdrawal.

Store consent as an append-only history, not a single boolean, so you can show what was true at any past time. Make withdrawing as easy as granting, and make the withdrawal take effect everywhere: the mailing integration, the analytics tag and any partner that received the data. Do not pre-tick boxes, and keep separate purposes separate rather than bundling them into one agreement. For the website side of cookies and banners, see the article on UK GDPR and cookie consent, which covers the front-end angle.

Retention rules and automatic deletion

Data kept forever is a liability. Work with the business to define, for each category, how long it is needed and why, then build that into the system.

  1. Assign a retention period to each data category and record the reason.
  2. Add the dates to the data model, such as a created date and an expiry or review date.
  3. Run a scheduled job that deletes or anonymises expired records, logs what it did, and alerts on failure.
  4. Test the job on copies before running it on production, and keep it idempotent so it can safely re-run.
  5. Remember backups. Decide how long backups live, so deleted data does not reappear indefinitely, and document the rotation.

Some records must be kept for other reasons, such as accounting. Your adviser should tell you which, and the system should be able to keep those fields while removing unnecessary personal ones.

Export and erasure requests

People may ask what you hold about them, ask for a copy, or ask for deletion. Whether and how you must respond depends on the legal context, so involve your adviser, but build the technical capability in advance.

Finding a person's data

Maintain a map of every table, file store, search index, cache and third-party tool containing personal data, and a way to locate one person across them. This is easier with consistent identifiers and harder with data scattered across many services.

Exporting

Provide a function that gathers the person's data in a structured, commonly used format such as JSON or CSV, and verifies the requester's identity first so you do not leak data to the wrong person.

Erasing

Deletion has to cover primary storage, derived copies, search indexes, caches, analytics and processors, and it should handle references from other records. Options include hard deletion, anonymisation that irreversibly removes identifiers, and soft deletion followed by a purge. Keep an internal log of the request and outcome without retaining the deleted details. Test the process end to end on a sample account, then check that nothing remains.

Processors, sub-processors and hosting location

Every service that handles personal data on your behalf, such as hosting, email, analytics, error tracking, support desks and payment tools, is a processor. Each needs an appropriate agreement, and each may use sub-processors of its own. Your engineering responsibilities include:

  • Keeping an up-to-date list of processors and what data each receives.
  • Sending processors only the data they need, not entire records.
  • Knowing where the data is stored and processed, and whether it leaves the European Economic Area, since transfers outside it carry additional requirements to check with your adviser.
  • Choosing hosting regions deliberately and recording the decision, since many cloud providers let you pick a region.
  • Encrypting data in transit and at rest, and managing keys and access carefully.

Hosting in the EU does not by itself settle every question, and hosting elsewhere is not automatically forbidden. The answer depends on the data, the provider and the safeguards, so ask for a legal view. The web application security checklist covers the technical controls in more depth.

GDPR web application development: a developer's checklist

  • Data inventory exists and is updated when features change.
  • Each field has a stated purpose, and unneeded fields are removed.
  • Consent, where used, is stored as versioned history and withdrawal is honoured everywhere.
  • Retention periods are defined and enforced by scheduled jobs.
  • Export and erasure can be performed for one person across all stores.
  • Logs and error reports do not capture unnecessary personal data.
  • Processors are listed, with agreements and known data locations.
  • Access to personal data is role-based, logged and reviewed.
  • An incident plan names who decides, who notifies, and how fast.

Putting it together

Build these habits into the first version, because retrofitting them into a mature system is slower and riskier. Keep decisions written down, and let a qualified adviser review the legal points, since requirements change. For how we think about building such systems, see our page on software development for Danish businesses, and for the related topic of keeping integrations tidy, the article on integrating systems through APIs.

Frequently asked questions

What does privacy by design mean for developers?

It means asking at every feature what personal data is needed, who can see it, how long it is kept and how it can be exported or deleted. You collect less, restrict access by default, record purposes and build deletion in from the start, rather than adding protections after launch.

How do I implement the right to erasure?

Build an internal process that locates one person's data across databases, files, search indexes, caches, analytics and processors, then deletes or irreversibly anonymises it, with a log of the request. Test it on sample accounts. Ask a qualified adviser when erasure applies and which records you must keep.

Where should data be hosted?

Many Danish companies choose EU hosting regions to simplify questions about transfers, but location alone does not settle compliance. Check which processors and sub-processors touch the data, whether it leaves the European Economic Area, and what safeguards apply. Confirm with your adviser and official sources.

Related articles

🚀 Start Now