Skip to main content

GDPR Compliance

GDPR Compliance Tool for Developers

The General Data Protection Regulation requires detailed documentation of how your application collects, processes, and stores personal data. Codepliant scans your codebase to detect personal data handling patterns and generate accurate compliance documents — from privacy policies to data flow maps — in one command.

What is GDPR and why does it matter for developers?

The General Data Protection Regulation (GDPR) is the European Union's comprehensive data protection law that took effect on May 25, 2018. It replaced the 1995 Data Protection Directive and established a unified framework for how organizations collect, process, store, and transfer personal data of individuals in the EU and European Economic Area (EEA).

For developers, GDPR is not just a legal concern — it directly affects how you design and build software. The regulation requires privacy by design (Article 25), meaning data protection must be built into your application architecture from the start, not bolted on after launch. Every database schema, API endpoint, analytics integration, and third-party service in your codebase has GDPR implications.

GDPR applies to any organization that processes personal data of individuals in the EU/EEA, regardless of where the organization is based. If your app has EU users, GDPR applies to you. Fines for non-compliance can reach 20 million euros or 4% of global annual turnover, whichever is higher.

Key GDPR articles every developer should know

GDPR contains 99 articles, but these are the ones that directly impact how you write code and architect your application.

Article 5 — Principles of data processing

Personal data must be processed lawfully, fairly, and transparently. It must be collected for specified purposes, limited to what is necessary, kept accurate, stored only as long as needed, and protected with appropriate security. Codepliant maps your actual data practices against these principles.

Article 6 — Lawful basis for processing

You need a legal basis for every type of personal data processing: consent, contract performance, legal obligation, vital interests, public task, or legitimate interests. Codepliant identifies your processing activities so you can document the legal basis for each one.

Article 13 — Information to data subjects

When you collect personal data directly from individuals, you must inform them of your identity, purpose, legal basis, retention period, their rights, and any third parties receiving their data. Codepliant generates privacy policies with this information based on your actual code.

Article 17 — Right to erasure (right to be forgotten)

Data subjects can request deletion of their personal data. Your application must be architected to support this — knowing where personal data is stored across your databases, caches, backups, logs, and third-party services. Codepliant maps all personal data storage locations.

Article 25 — Data protection by design and by default

You must implement appropriate technical and organizational measures to ensure data protection is integrated into your processing activities. This includes data minimization, pseudonymization, and privacy-preserving defaults. Codepliant audits your code for these patterns.

Article 28 — Data processors

If you use third-party services (cloud providers, analytics, payment processors) that process personal data on your behalf, you need Data Processing Agreements with each one. Codepliant identifies your processors directly from your codebase and dependency tree.

Article 30 — Records of processing activities

You must maintain detailed records of all processing activities: categories of data, purposes, recipients, transfers to third countries, and retention periods. Codepliant generates these records automatically from your ORM schemas, API integrations, and service configurations.

Article 35 — Data Protection Impact Assessment

High-risk processing activities require a DPIA before you begin processing. This includes large-scale profiling, systematic monitoring of public areas, and processing sensitive data categories. Codepliant generates DPIA documents based on the data practices detected in your code.

GDPR rights of data subjects

GDPR grants individuals (data subjects) specific rights over their personal data. Your application must be designed to fulfill these rights, and you must respond to requests within 30 days. Codepliant helps by mapping exactly where personal data lives in your system so you can respond efficiently.

Right of access (Article 15)

Data subjects can request a copy of all personal data you hold about them, along with information about how it is processed. Your DSAR response must include the categories of data, purposes, recipients, retention periods, and the source of the data.

Right to rectification (Article 16)

Individuals can request correction of inaccurate personal data or completion of incomplete data. Your application needs mechanisms to update personal data across all storage locations, including third-party services and backups.

Right to erasure (Article 17)

Also known as the right to be forgotten. Data subjects can request deletion of their personal data when it is no longer necessary, when consent is withdrawn, or when processing is unlawful. You must erase data from databases, caches, logs, and notify third-party processors.

Right to data portability (Article 20)

Individuals can request their personal data in a structured, commonly used, machine-readable format (like JSON or CSV) and have it transmitted to another controller. Your application must support data export functionality.

Right to object (Article 21)

Data subjects can object to processing based on legitimate interests or for direct marketing purposes. When they object to direct marketing, processing must stop immediately. For other grounds, you must demonstrate compelling legitimate reasons to continue.

Right to restriction of processing (Article 18)

Individuals can request that you restrict processing of their data while accuracy is contested, processing is unlawful, or you no longer need the data but they need it for legal claims. Your system must support marking data as restricted.

How Codepliant detects GDPR-relevant services in your code

Codepliant performs static analysis across your entire codebase to identify personal data processing patterns. It scans ORM schemas (Prisma, Drizzle, Mongoose, TypeORM, Sequelize, Django, SQLAlchemy), API definitions, form handlers, and database migrations to identify fields that contain personal data — names, email addresses, IP addresses, device identifiers, location data, and more.

Beyond schema detection, Codepliant traces how personal data flows through your application. It maps data from user input through your application logic to storage and third-party services, identifying every processor and sub-processor that touches personal data.

Services and integrations Codepliant detects

CategoryServices & Patterns
Analytics & TrackingGoogle Analytics, Mixpanel, Segment, Amplitude, Posthog, Hotjar, Plausible
Auth & IdentityAuth0, Okta, NextAuth, Clerk, Firebase Auth, AWS Cognito, Supabase Auth
Databases & ORMsPrisma, Drizzle, Mongoose, TypeORM, Sequelize, Django ORM, SQLAlchemy
Cloud & InfrastructureAWS (S3, RDS, Lambda), GCP (Cloud SQL, GKE), Azure (Blob, SQL), Vercel, Cloudflare
PaymentsStripe, PayPal, Braintree, Square, Adyen, Mollie
Email & CommunicationSendGrid, Mailgun, Postmark, AWS SES, Twilio, Resend
AI & Machine LearningOpenAI, Anthropic, Google AI, Hugging Face, Replicate, Cohere
AdvertisingGoogle Ads, Facebook Pixel, TikTok Pixel, LinkedIn Insight Tag
Monitoring & LoggingSentry, Datadog, New Relic, LogRocket, Winston, Pino

Codepliant also analyzes your dependency tree for packages that indicate personal data processing — analytics clients, cookie management libraries, consent management platforms, and advertising SDKs. Environment variables like GOOGLE_ANALYTICS_ID, STRIPE_SECRET_KEY, and SENDGRID_API_KEY are flagged as indicators of third-party data processing.

GDPR documentation Codepliant generates

Privacy Policy
Data Processing Agreement (DPA)
DSAR Response Guide
Consent Management Guide
Data Flow Map
Data Retention Policy
PIA / DPIA
Sub-Processor List
Cookie Policy
Records of Processing (Art. 30)
International Transfer Assessment
Compliance Report

GDPR compliance checklist for developers

Use this checklist to evaluate your application's GDPR readiness. Codepliant automates detection of many of these items from your code.

Lawful basis & consent

Data subject rights

Privacy by design

Transparency & documentation

Security measures

Third parties & transfers

How Codepliant automates GDPR compliance

Codepliant performs static analysis on your codebase to identify data practices. It scans ORM schemas to understand what personal data you store, detects authentication flows and session management, identifies analytics SDKs and advertising pixels, traces payment processor integrations, and maps third-party API calls that receive personal data.

From this analysis, it generates a complete set of GDPR documentation. The privacy policy includes specific data categories, legal bases, and retention periods derived from your actual code. The data flow map shows how personal data moves through your application and to third parties. The DPA template lists your actual sub-processors. The DSAR guide documents exactly where each category of personal data is stored so your team can respond to requests efficiently.

Because the documents are generated from code, they stay accurate as your application evolves. Add a new analytics SDK, integrate a new payment processor, or add fields to your user model — run Codepliant again and your compliance documentation updates automatically. Run it in your CI/CD pipeline to regenerate documents on every deploy.

Unlike form-based compliance tools that ask you what data you collect, Codepliant looks at your code to determine what you actually collect. This means your GDPR documentation reflects reality, not assumptions — a critical distinction when a supervisory authority investigates.

Automate your GDPR documentation

One command detects personal data processing, identifies your processors, and generates audit-ready GDPR documentation. Free, open source, no account required.

npx codepliant go

Related resources

Frequently asked questions

What GDPR documents does Codepliant generate?

Codepliant generates Privacy Policies, Data Processing Agreements (DPA), Data Subject Access Request (DSAR) Guides, Consent Guides, Data Flow Maps, Data Retention Policies, Privacy Impact Assessments (PIA/DPIA), Sub-Processor Lists, Cookie Policies, and Compliance Reports — all from scanning your code.

Does Codepliant replace a Data Protection Officer?

No. Codepliant is a developer tool that automates the documentation aspect of GDPR compliance. You should still consult with legal professionals and, if required under Article 37, appoint a DPO. Codepliant helps you create accurate documentation faster.

How does code scanning help with GDPR?

GDPR requires you to document what personal data you collect, how you process it, where you store it, and who you share it with. Codepliant scans your ORM schemas, API integrations, analytics SDKs, and auth flows to answer these questions from evidence rather than memory.

Does Codepliant detect data transfers outside the EU?

Yes. Codepliant identifies third-party services in your code (AWS, Google Cloud, Stripe, analytics providers) and flags potential international data transfers that require GDPR safeguards like Standard Contractual Clauses (SCCs) or adequacy decisions.

What are the penalties for GDPR non-compliance?

GDPR fines can reach up to 20 million euros or 4% of global annual turnover, whichever is higher. Even smaller violations carry fines of up to 10 million euros or 2% of turnover. Supervisory authorities across the EU have collectively issued billions in fines since 2018.

Does GDPR apply if my company is outside the EU?

Yes. GDPR applies to any organization that offers goods or services to individuals in the EU/EEA, or monitors the behavior of individuals in the EU/EEA — regardless of where the organization is based. If your app has EU users, GDPR likely applies to you.

How often should I run Codepliant to maintain GDPR compliance?

Run Codepliant in your CI/CD pipeline on every deploy or at minimum before each release. Your data processing activities change as you add features, integrate new services, or update schemas. Codepliant regenerates documentation from your current code so your compliance docs never go stale.

Can Codepliant help with Data Subject Access Requests (DSARs)?

Yes. Codepliant generates a DSAR Guide that documents exactly where personal data is stored in your application — which database tables, which third-party services, and which data categories. This makes it significantly faster to respond to access, rectification, erasure, and portability requests within the 30-day GDPR deadline.