DPDP Act Compliant App Development: 8 Engineering Decisions to Make Before You Write the Code
Building an app for users in India? Eight product and architecture decisions for DPDP Act compliance, from data inventory and hosting to SDKs, logs and release gates Disclosure: I work at Blue Copper Technologies, which

Building an app for users in India? Eight product and architecture decisions for DPDP Act compliance, from data inventory and hosting to SDKs, logs and release gates
Disclosure: I work at Blue Copper Technologies, which builds software products for clients in India, USA, UK, Middle East and LATAM. This post was drafted with AI assistance and reviewed by the author. It is general information, not legal advice.
If you are building a product that handles personal data of people in India, the Digital Personal Data Protection Act, 2023 (DPDP Act) is now on your roadmap whether you planned for it or not. The main duties apply from 13 May 2027, and the Consent Manager provisions began on 13 November 2026 under the DPDP Rules, 2025.
Most βDPDP compliant app developmentβ guides give you a list of features: a consent screen, a delete button, encryption. Those matter. But the expensive mistakes happen earlier, in decisions made before anyone writes a consent table: where data lives, which SDKs ship in the first build, what goes into staging, what the logs capture. Undoing those later costs months.
Last updated: 16 November 2026. Here are eight decisions worth making at the start of any product that will handle personal data in India, and what each one looks like in practice.
1. Discovery: list the personal data before the first sprint
Decide: what personal data the product collects, and the purpose of each field, before the first sprint.
Why: the Act ties every use of personal data to a purpose. If a field has no purpose, you should not collect it. If it has two purposes, you may need two separate choices from the user. That is a product decision, and it belongs in discovery.
Keep the inventory in the repo, next to the code, so it changes when the schema changes:
# data-inventory.yaml
- field: patient.phone
purpose: [appointment_reminders]
legal_basis: consent
retention: "until consent withdrawn or 12 months after last visit"
shared_with: [sms_provider]
- field: patient.diagnosis
purpose: [treatment]
legal_basis: legitimate_use # Verify this is applicable to the specific processing
retention: "per medical records policy"
shared_with: []
Health products show why this belongs in discovery. On the Digital AYUSH Integration Platform, a government health platform we built with digital health records and tele-consultation, practitioner verification and secure health-data management were features in their own right, built alongside the clinical ones.
2. Architecture: decide where the data lives and who holds the keys
Decide: the hosting region, how tenants are isolated, and who controls the encryption keys.
Why: the DPDP Act allows transfers outside India except to countries the government restricts, but sector rules can be stricter. For example, RBIβs digital lending rules require lending data to be stored on servers in India. If your product serves lenders, or might one day, choose the region now. Retrofitting data residency is a migration project.
For multi-tenant SaaS, decide early whether tenants share a database with row-level isolation or get separate schemas. A breach in one tenant should not become a breach notice for all of them.
3. Consent as a component: build it, or integrate a Consent Manager
Decide: whether consent is a module you build or a service you integrate.
Why: consent has to be recorded, provable and as easy to withdraw as to give. Now that the Consent Manager provisions have begun, users may also manage consent through a registered Consent Manager. Either way, give consent its own data model and API, so it doesnβt end up as checkboxes scattered across screens. Then every service asks the same question in the same way:
def can_process(user_id: str, purpose: str) -> bool:
record = consent_store.latest(user_id, purpose)
return record is not None and record.status == "granted"
This matters most where consent is easy to get wrong. In DPDP Act sessions we have run with hospitals, one of the most common gaps is a single signature for everything: clinical consent, a financial undertaking and blanket data consent on one registration form. A consent component that records each purpose separately makes that mistake hard to ship.
The detailed design of the consent record is a code-level topic in its own right. What you decide here is the architecture: a single consent service that every other service asks.
4. Third-party SDKs and vendors: know what leaves your app
Decide: which SDKs and external services ship, and what data each one receives.
Why: under Section 8(1) of the Act, you stay responsible for what your processors do with personal data. An analytics SDK that collects device identifiers, a crash reporter that captures screen contents, or a support widget that records sessions is a processor. Each one needs a reason to be there and a contract that covers it.
A rule worth adopting: no SDK gets merged without an entry in the data inventory saying what it receives and why. Review the SDK list at every release.
5. Environments: no real personal data in dev and staging
Decide: how test environments get realistic data without copying production.
Why: a staging database restored from production is one of the most common ways personal data ends up in places with weaker controls, more access and no retention policy. Use synthetic data, or mask production data before it leaves production:
-- Illustrative only: run on an isolated copy before staging users gain access.
-- Never run this UPDATE on the production patients table.
UPDATE patients_refresh_copy
SET name = CONCAT('Patient ', id),
phone = CONCAT('90000', LPAD(id % 100000, 5, '0')),
email = CONCAT('user', id, '@example.test');
Make masking part of the refresh job, so nobody has to remember it.
6. Observability: decide what logs may contain
Decide: what your logs, traces and analytics events are allowed to contain.
Why: logs are often the biggest unplanned store of personal data in a system. They are also evidence. CERT-Inβs directions require system logs to be kept for 180 days in India, and the DPDP Rules expect access logs to be kept for at least a year. So you need logs, but you do not want them full of phone numbers. Redact at the source:
import logging
import re
PHONE = re.compile(r"\b\d{10}\b")
EMAIL = re.compile(r"[\w.+-]+@[\w-]+\.[\w.]+")
class RedactPII(logging.Filter):
def filter(self, record):
msg = str(record.getMessage())
msg = PHONE.sub("[phone]", msg)
record.msg, record.args = EMAIL.sub("[email]", msg), ()
return True
The OWASP Logging Cheat Sheet has a fuller list of what to exclude.
7. Release gates: let the pipeline produce the evidence
Decide: which privacy checks block a release, and where their results are stored.
Why: compliance asks for proof that things keep happening. Your CI/CD pipeline already runs on every change, so it is the cheapest place to create that proof. Examples of gates:
- the data inventory must change when a migration adds a personal-data column;
- a new third-party dependency needs an inventory entry;
- tests for consent checks and redaction must pass.
# Example GitHub Actions job step (assumes the checker script exists)
- name: Check data inventory
run: ./scripts/check_inventory.sh migrations/ data-inventory.yaml
Keep the pipeline results. Over time they become a record of what was checked, when, and by whom.
8. Operations: plan for requests and breaches from day one
Decide: how the product will handle access, correction and erasure requests, and what happens in the first hours of a breach.
Why: the DPDP Rules give organisations 90 days to answer complaints, and require a breach to be reported to the Data Protection Board and to every affected person without delay, with a detailed report within 72 hours. CERT-Inβs six-hour reporting rule already applies. If finding all of one userβs data means querying six services by hand, you will miss those clocks. Design a way to find, export and erase one personβs data across services, and write the breach runbook while the system is still small enough to understand.
A checklist to take into your next sprint planning
- Every personal-data field has a purpose, a legal basis and a retention period in the repo.
- The hosting region and key ownership are written down, and fit the sectors you sell to.
- Consent is one service with one data model.
- Every SDK and vendor has an inventory entry and a contract.
- Staging and dev use synthetic or masked data.
- Logs are redacted at the source and kept for the required periods.
- The pipeline enforces privacy checks and keeps the results.
- One personβs data can be found, exported and erased across services.
Most of these cost little when the people designing the product decide them early. They cost a lot more to retrofit.
If you are planning a product for regulated users in India and want to compare notes on architecture, our product engineering team is happy to talk. You can reach us here.
References
- DPDP Rules, 2025 (MeitY) and the PIB summary
- CERT-In Directions under Section 70B(6), 28 April 2022
- OWASP Logging Cheat Sheet
- OWASP Top 10 Privacy Risks
Which of these eight decisions does your team usually make last? Let me know in the comments.
About the author: Gayatri Chakrabarty leads Strategic Growth and Marketing at Blue Copper Technologies, focusing on Continuous Compliance awareness, Technology solutions, and Business growth. She brings over 10 years of experience in B2B marketing, strategic communications, and brand development. Her work focuses on helping organizations identify the right technology solutions for regulatory compliance, digital transformation, and business challenges.
About Blue Copper Technologies: founded in 2012 and headquartered in Kolkata, India, it builds software products and runs DPDP Act compliance programmes for clients, including two full implementation engagements with hospitals in Eastern India. It has delivered more than 300 solutions to over 150 customers, is certified to ISO/IEC 27001:2022 and ISO 9001:2015, and is rated 4.9 out of 5 by clients on Clutch.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.