The Complete Guide to NDPA 2023 Compliance in React and Next.js
The Nigeria Data Protection Act (NDPA) 2023 is not optional. If your application collects personal data from anyone in Nigeria — names, emails, phone numbers, payment details, IP addresses, location data — you are a data controller under the law, and you have specific obligations.
The penalties are real. The Nigeria Data Protection Commission (NDPC) fined Multichoice Nigeria N766 million in 2024 for unlawful cross-border transfers. Under Section 48(4), fines can reach the higher of N10 million or 2% of annual gross revenue for data controllers and processors of major importance, and the higher of N2 million or 2% for others. For startups, a single enforcement action can be existential.
But here is the thing: the NDPA is not as overwhelming as it looks. It breaks down into eight distinct compliance areas, each with clear technical requirements. If you can build a React form, you can build NDPA compliance. This guide walks through every one of those areas with working code.
What This Guide Covers
The NDPA maps to eight compliance modules. We will cover each one:
- Consent Management — collecting and recording user consent (Sections 25-26)
- Data Subject Rights (DSR) — handling access, rectification, erasure, and portability requests (Sections 34-38)
- Data Protection Impact Assessment (DPIA) — assessing risks before high-risk processing (Section 28)
- Breach Notification — detecting, assessing, and reporting breaches within 72 hours (Section 40)
- Privacy Policy — generating and maintaining a compliant privacy notice (Section 27)
- Lawful Basis — documenting the legal ground for every processing activity (Section 25)
- Cross-Border Transfers — managing data that leaves Nigeria (Sections 41-43)
- Record of Processing Activities (ROPA) — maintaining an auditable register (Section 24(3) accountability; NDPC GAID 2025 Article 13)
Prerequisites
This guide uses the NDPA Toolkit, an open-source React library purpose-built for NDPA compliance. Install it:
The toolkit supports React 16.8 through 19, works with Next.js (App Router and Pages Router), and supports any CSS framework via className overrides and an unstyled mode.
If you want to skip the component-level setup entirely, the toolkit includes zero-config presets that give you production-ready compliance UI with a single import:
One line. Legally compliant consent banner. But this guide goes deeper — we will build each module with full customisation.
1. Consent Management
NDPA requirement: Section 25 requires clear, affirmative consent before processing personal data. Section 26 requires that consent is as easy to withdraw as it was to give, and that minors receive special protection.
Most consent implementations are legally invalid because they bundle everything into a single "Accept All" button. The NDPA requires purpose-specific consent — the user must be able to agree to analytics separately from marketing, for example.
The Hook Approach
Key compliance points:
- Each consent option has a clear
descriptionexplaining the purpose (NDPA Section 25) required: truemarks essential cookies that cannot be rejectedrejectAllonly rejects non-required options — essential cookies remain activeresetConsentallows easy withdrawal (NDPA Section 26)versiontracks consent form changes — if you update options, users are re-prompted- Consent is stored locally by default, but you can plug in any backend via storage adapters
Storage Adapters
The default stores consent in localStorage, but for server-side access or multi-device sync, you can switch to cookies, session storage, a REST API, or compose multiple backends:
2. Data Subject Rights (DSR)
NDPA requirement: Part VI, Sections 34-38 grant eight rights — access, rectification, erasure, restriction, withdrawal of consent, objection, rights related to automated decision-making, and portability. The Act requires a response without unreasonable delay (Section 34(1)) and sets no fixed period; the toolkit defaults to a 30-day internal target.
Building a DSR Portal
For a complete, drop-in solution, use the preset:
This renders a full request submission form, status tracker, and request history — all in one component.
3. Data Protection Impact Assessment (DPIA)
NDPA requirement: Section 28 requires a DPIA before any processing that is likely to result in a high risk to data subjects. This includes large-scale processing of sensitive data, systematic monitoring, and automated decision-making.
Most organisations skip DPIAs because the process feels bureaucratic. The toolkit makes it a guided questionnaire:
The DPIA hook handles conditional questions (some questions only appear based on previous answers), automatic risk scoring, and generates a structured report you can present to the NDPC if requested.
4. Breach Notification
NDPA requirement: Section 40 requires notification to the NDPC within 72 hours of becoming aware of a qualifying breach. If the breach poses a high risk to data subjects, they must also be notified directly.
The 72-hour clock is the hardest part. You need a system that helps you assess, document, and report — fast.
The breach module calculates severity from the actual factors involved, determines whether NDPC and data subject notification is required, and generates the regulatory report format expected by the NDPC.
5. Privacy Policy Generator
NDPA requirement: Section 27 requires a clear, accessible privacy policy that covers the identity of the data controller, purposes of processing, lawful basis, retention periods, data subject rights, and cross-border transfer information.
Writing a privacy policy from scratch is error-prone. The toolkit generates one from structured inputs:
The generated policy covers all NDPA-mandated sections, includes your specific data categories and processing purposes, and can be exported in multiple formats for your website, app, or regulatory filing.
6. Lawful Basis Tracking
NDPA requirement: Section 25(1) requires a valid lawful basis for every processing activity. The six bases are: consent, contract, legal obligation, vital interests, public interest, and legitimate interests.
Most organisations default to "consent" for everything, which is legally fragile. If your lawful basis is actually "contract" (you need the data to deliver the service the user paid for), documenting it as consent means the user can withdraw it and you lose the right to process — even though you never needed consent in the first place.
7. Cross-Border Transfers
NDPA requirement: Part VIII, Sections 41-43 restrict transfers of personal data outside Nigeria. You need adequate protection in the destination (Section 42), safeguards such as SCCs or BCRs that afford adequate protection (Section 41(1)(a)), an NDPC-approved instrument (Section 42(5)), or one of the Section 43 derogations.
If you use AWS, Vercel, Firebase, Stripe, or any cloud service with servers outside Nigeria, you are performing cross-border transfers right now.
8. Record of Processing Activities (ROPA)
NDPA requirement: The Act has no standalone RoPA section. The duty rests on the Section 24(3) accountability principle, and NDPC GAID 2025 (Article 13, Article 52, Schedule 1) requires organisations to maintain a detailed register of all processing activities. This is not a one-time exercise — the ROPA must be kept up to date and available for NDPC inspection.
The ROPA module validates each record against NDPA requirements, identifies missing fields, and exports to CSV for regulatory submission.
Putting It All Together: The Compliance Score
Once you have implemented the eight modules, you need a way to measure your overall compliance posture. The toolkit includes a scoring engine that evaluates all eight areas and returns a rated report:
The score is weighted: consent and breach notification carry more weight than ROPA because they have higher enforcement risk. Each recommendation links to the specific NDPA section, so you know exactly what the law requires.
Quick Start: Zero-Config Presets
If you need compliance UI fast, the toolkit ships nine preset components that work with zero configuration:
Each preset renders a complete, interactive UI for its compliance area. Drop them into your admin panel and you have functional compliance tooling in minutes.
Tree-Shakeable Architecture
You do not have to import the entire library. Every module has its own entry point:
There are 14 entry points in total. Your bundle only includes what you import.
What Happens If You Do Not Comply
The NDPC has enforcement powers under Part X of the NDPA:
- Administrative fines: Under Section 48(4), up to the higher of N10 million or 2% of annual gross revenue for data controllers and processors of major importance, and the higher of N2 million or 2% for others
- Criminal sanctions: Officers can face imprisonment for egregious violations
- Enforcement notices: The NDPC can order you to stop processing entirely
- Compensation orders: Data subjects can claim damages for harm caused by non-compliance
Next Steps
- Install the toolkit:
pnpm add @tantainnovative/ndpr-toolkit - Run a compliance score: Use
getComplianceScore()to see where you stand - Fix the critical gaps first: The score engine sorts recommendations by priority
- Add the consent banner: This is the most visible compliance requirement
- Build your ROPA: Document every processing activity before the NDPC asks
The NDPA Toolkit is open source and free to use. If it helps your project, star it on GitHub — it helps other Nigerian developers find it.