NDPR Toolkit Documentation
Comprehensive guides and API reference for implementing NDPR-compliant features
Getting Started
The NDPR Toolkit is a comprehensive set of components and utilities designed to help Nigerian businesses implement NDPR-compliant features in their web applications with minimal development effort.
The toolkit includes components for consent management, data subject rights handling, privacy policy generation, breach reporting, and data protection impact assessments. All components are built with TypeScript for type safety and designed to be easily integrated into React and Next.js applications.
Version 2.0 includes significant enhancements to all components, improved type definitions, and comprehensive documentation to ensure developers can quickly implement NDPR-compliant features.
Installation
npm install @tantainnovative/ndpr-toolkit
# Or with legacy peer deps if using React 19 npm install @tantainnovative/ndpr-toolkit --legacy-peer-deps
Basic Setup
Import and use the components and hooks in your React or Next.js application:
import { ConsentBanner, ConsentManager, ConsentStorage, useConsent } from '@tantainnovative/ndpr-toolkit';
function MyApp() {
return (
<ConsentManager
options={[
{
id: 'necessary',
label: 'Necessary Cookies',
description: 'Essential cookies for the website to function.',
required: true
},
{
id: 'analytics',
label: 'Analytics Cookies',
description: 'Cookies that help us understand how you use our website.',
required: false
}
]}
storageKey="my-app-consent"
autoLoad={true}
autoSave={true}
>
<AppContent />
<ConsentBanner
position="bottom"
privacyPolicyUrl="/privacy-policy"
showPreferences={true}
onSave={({ consents }) => console.log('Consent saved:', consents)}
/>
</ConsentManager>
);
}
function AppContent() {
// Use the useConsent hook to manage consent state
const { consents, hasConsented, updateConsent } = useConsent();
// Check if user has given consent for analytics
if (hasConsented('analytics')) {
// Initialize analytics
}
return (
<div>
{/* Your app content */}
</div>
);
}
Explore interactive demos of all components
View DemosView source code, report issues, and contribute
GitHubComponents & Hooks
Implementation Guides
Step-by-step guide to conducting a Data Protection Impact Assessment
Read GuideLearn how to implement a complete consent management system
Read GuideBest practices for handling data subject rights requests
Read GuideHow to implement a 72-hour breach notification process
Read GuideLatest Features
Create dynamic privacy policies with variable placeholders that can be easily updated when your organization information changes.
Learn MoreImproved type definitions for Data Subject Requests with standardized enums for request types and statuses.
Learn MoreA flexible component for handling the storage and retrieval of consent settings with support for multiple storage mechanisms.
Learn MoreComponent Documentation
Implement NDPR-compliant cookie consent banners and preference centers with flexible storage options.
- ConsentBanner & ConsentManager components
- Customizable consent options
- Multiple storage mechanisms
- Preference management UI
Handle data subject access requests and other rights with a complete request management system.
- Request submission forms
- Admin dashboard for request management
- Status tracking and notifications
- Standardized request types
Conduct Data Protection Impact Assessments with an interactive questionnaire and risk assessment tools.
- Multi-section questionnaire
- Risk identification and assessment
- Report generation
- Compliance recommendations
Manage data breach reporting, risk assessment, and notification within NDPR's 72-hour requirement.
- Breach reporting forms
- Risk assessment tools
- Notification requirement determination
- Regulatory report generation
Create NDPR-compliant privacy policies with customizable templates and variable support.
- Customizable policy sections
- Variable placeholder support
- Preview and export options
- Compliance checking
Utilize custom React hooks for state management across all NDPR toolkit components.
- useConsent
- useDSR
- useDPIA
- useBreach
- usePrivacyPolicy
Implementation Guides
Our implementation guides provide step-by-step instructions for integrating NDPR Toolkit components into your applications and addressing specific compliance scenarios.
Get up and running with the NDPR Toolkit in minutes.
Read GuideImplement a complete consent management system.
Read GuideCreate a complete data subject rights management portal.
Read GuideNDPR Compliance
The Nigeria Data Protection Regulation (NDPR) is Nigeria's principal data protection legislation, issued by the National Information Technology Development Agency (NITDA) in January 2019. The NDPR aims to safeguard the rights of natural persons to data privacy.
Key Requirements
- Lawful Processing: Organizations must process personal data lawfully, fairly, and transparently.
- Consent: Valid consent must be obtained before collecting or processing personal data.
- Data Subject Rights: Organizations must respect and facilitate data subject rights, including access, rectification, and erasure.
- Data Protection Impact Assessment: Organizations must conduct DPIAs for high-risk processing activities.
- Breach Notification: Organizations must report data breaches to NITDA within 72 hours.
- Privacy Policy: Organizations must maintain a clear and accessible privacy policy.
How the NDPR Toolkit Helps
Our toolkit provides ready-to-use components that address each of these key requirements:
- Consent Management: Implement proper consent collection and management
- Data Subject Rights Portal: Handle DSR requests efficiently and in compliance with regulations
- DPIA Questionnaire: Conduct and document Data Protection Impact Assessments
- Breach Notification System: Report and manage breaches within the required timeframes
- Privacy Policy Generator: Create and maintain NDPR-compliant privacy policies
Disclaimer
While the NDPR Toolkit is designed to help organizations implement NDPR-compliant features, using this toolkit does not guarantee full compliance with the NDPR. Organizations should consult with legal professionals to ensure their specific implementation meets all regulatory requirements.