Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

System Design (High-Level Design)  Module 17 – Security, privacy and compliance

Privacy by design and India's DPDP Act

Collect less, tag every field with a purpose and a lifetime, make erasure reach every copy, and map India's DPDP Act and Rules onto system components.

  • Intermediate
  • 25 minutes
  • Examples run with Python 3.14.8, Pyodide 314.0.7, Node.js 24.21.0 and quickjs 0.32.0
  • By MySmartCoPilot
Free intro, Pro: 5 of 25 minutes free
Free: Every copy of personal data needs a purpose, a lifetime and a way out. With a pass: the other 9 sections and 3 interview answers, about 20 minutes.

What you will learn

  • Apply data minimisation, purpose limitation and retention limits in a design
  • Map the DPDP Act 2023 and DPDP Rules 2025 obligations onto system components
  • Design an erasure that reaches every copy and proves it with a scan
  • Estimate how long telling everyone a breach affects will take

Before you start

What you’ll learn · Before you start

What you will learn

  • Apply data minimisation, purpose limitation and retention limits in a design
  • Map the DPDP Act 2023 and DPDP Rules 2025 obligations onto system components
  • Design an erasure that reaches every copy and proves it with a scan
  • Estimate how long telling everyone a breach affects will take

Before you start

On this page

In a food-delivery app, one customer’s name, phone number and orders end up in six places: the orders database, analytics, request logs, invoices, a search index and backups. An erasure request that misses one of them leaves the data behind, and nobody notices until the customer does.

Privacy by design builds the protection of personal data into that architecture, field by field and copy by copy, instead of adding it to a policy after launch. India’s DPDP Act, the Digital Personal Data Protection Act, 2023, turns that work into duties for any business that decides why and how digital personal data is processed: reasonable security safeguards, telling the Data Protection Board and every affected person about a breach, and erasing data once consent is withdrawn or the purpose is served, unless a law requires it to be kept. This lesson is education about system design, not legal advice.

Every copy of personal data needs a purpose, a lifetime and a way out

A data map of a food-delivery app: six copies of a customer's data, each with its purpose and retention period.CustomerApp and APIcollects only fields with a purposeOrders databasename, phone, address, ordersdelivery, support: 180 daysAnalyticsevents under a pseudonymproduct decisions: 365 daysRequest logsmasked at write timeincidents: 1 yearInvoicesname, address, amounttax law: years, restrictedSearch indexname, emailsame lifetime as ordersBackupsencrypted per customerexpire after 35 dayssign-up, orders, consent choicesstoreeventsrequestson paymentindexnightly

One customer, six copies of their data, each with a purpose and a lifetime

Text description of the diagram

The diagram runs from top to bottom.

  1. The customer signs up, orders and makes consent choices in the app, whose API collects only fields that have a purpose.
  2. The app writes to three stores: the orders database (name, phone, address and orders, kept 180 days for delivery and support), analytics (events under a pseudonym, kept 365 days for product decisions) and request logs (masked when written, kept 1 year for incidents).
  3. The orders database feeds three more copies: invoices on payment (name, address and amount, kept for the years that tax law requires, with restricted access), a search index (name and email, with the same lifetime as the orders) and nightly backups (encrypted per customer, expiring after 35 days).

India’s DPDP Act calls the business a Data Fiduciary and the person a Data Principal. It applies to digital personal data processed in India, and to processing outside India that is connected with offering goods or services to people in India (section 3). Privacy by design starts from a map like this one: in a food-delivery app, one customer’s details live in six places, and every one of them needs a purpose, a lifetime and a way to be erased.

Field Purpose Lifetime
Phone Delivery, sign-in, support 180 days after the last order
Live location Delivery tracking 30 days
Name and address on invoices Tax law As long as the law requires
Date of birth None Do not collect it

A field with several purposes lives as long as its longest purpose needs it, and no longer: the phone stays for the 180 days support needs, while the live location goes after the 30 days of delivery tracking.

The moves that make the map hold, each in one sentence:

  • Data minimisation: a field is collected only when a named purpose needs it.
  • Purpose and retention tags: every field records why it is held and when it must go.
  • Consent records: what each person agreed to, when and through which notice, so that a withdrawal can be honoured.
  • pseudonymisation: Processing personal data so that it can no longer be attributed to a person without additional information, such as a key, which is kept separately and protected.: analytics and logs carry a stand-in id instead of the person’s identity.
  • An erasure pipeline: one request fans out to every store that holds the person’s data, then checks the result.
  • A breach runbook: who tells the Board, the affected people and The Indian Computer Emergency Response Team, the national agency that receives reports of cyber incidents in India and issues directions on how to handle them., by when, with which data ready.

The DPDP Rules, 2025 bring the duties into force in stages: the rules that set up the Data Protection Board applied on publication, the rule on consent managers one year later, and most obligations, safeguards, breach intimation and erasure among them, eighteen months after publication (rule 1).

Timeline · 3 events in order When the DPDP Rules apply Walk through the three stages of rule 1, counted from the day the Rules were published.
  1. On publication

    The Data Protection Board is set up stage 1

    The rules that set up the Data Protection Board, its members, its meetings and its staff applied on the day the Rules were published, together with their title and definitions.

  2. After one year

    Consent managers stage 2

    The rule on consent managers, the registered services through which a person can give, manage and withdraw consent, applies one year after publication.

  3. After eighteen months

    Most duties of a business stage 3

    Most obligations of a business apply eighteen months after publication, reasonable security safeguards, breach intimation and erasure among them. Those are the duties a system has to be designed for.

The timeline has 3 events, from On publication to After eighteen months.

Checkpoint

Check: Purposes, lifetimes and the data map

  1. Question 1 of 2 A delivery app asks every new user for their phone's whole contact list, "to improve the experience". What does data minimisation say?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Do not collect it unless a named purpose needs it, and ask separately, at the moment it is needed, for a feature that does

    A field without a purpose should not be collected at all, and a feature that does need the contacts asks for them when it is used. Encryption and retention limits protect data that is needed; they do not make unneeded data needed.

  2. Question 2 of 2 A field serves two purposes: delivery, which needs it for 30 days, and support, which needs it for 180 days. For how many days may the field be kept at most?

    Type a number.

    A hint

    Each purpose needs the field for its own time; the field must outlive none of them by more.

    Show the answer: Question 2 of 2

    Answer: 180 days

    A field with several purposes lives as long as its longest purpose needs it, and no longer: support's 180 days decide, as they do for the phone in the table.

Each DPDP obligation becomes a requirement on a component Pro: opens with a Pro, Premium or Ultimate pass

In this part:

  • A personal-data inventory, kept as data, finds the design’s mistakes
  • Erasure is finished only when a scan finds nothing left
  • A breach starts deadlines of hours, so its path is built before it
  • Children, significant data fiduciaries and transfers abroad add duties of their own
  • Designing for the stricter side of the DPDP Act and the GDPR serves both
  • Practise: a data plan from a list of fields
    • Tag data fields with purpose, retention and consent
  • Interview questions
    • A user closes their account. Their data lives in a primary database, a search index, a data warehouse, three vendors' systems and 35 days of backups. Design an erasure you can prove reached every copy.
    • Your team finds that a storage bucket holding 2.4 million customers' names, phone numbers and addresses was public for a week. Plan the first 24 hours for a service operating in India.
    • Product wants every screen view logged with the user's phone number to study funnels. Redesign the analytics so that it answers the same questions with far less personal data.
  • Key takeaways

3 diagrams · 3 runnable examples (Python) · 1 exercise with sample tests · 3 interview answers · about 43 minutes

Opening this part with your pass…

This part opens with any MySmartCoPilot pass.

  • Pro pass · 1 week₹79$2.99
  • 30 days₹179$5.99
  • 1 year₹1,699$45

One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

Read a complete sample first: Design a unique ID generator

References

Related tools

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.