@tantainnovative/ndpr-toolkit 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/next-env.d.ts +5 -0
  2. package/package.json +1 -1
  3. package/.claude/settings.local.json +0 -20
  4. package/.eslintrc.json +0 -10
  5. package/.github/workflows/ci.yml +0 -36
  6. package/.github/workflows/nextjs.yml +0 -104
  7. package/.husky/commit-msg +0 -4
  8. package/.husky/pre-commit +0 -4
  9. package/.lintstagedrc.js +0 -4
  10. package/.nvmrc +0 -1
  11. package/.versionrc +0 -17
  12. package/CLAUDE.md +0 -90
  13. package/commitlint.config.js +0 -36
  14. package/eslint.config.mjs +0 -16
  15. package/jest.config.js +0 -31
  16. package/jest.setup.js +0 -15
  17. package/next.config.js +0 -15
  18. package/next.config.ts +0 -62
  19. package/packages/ndpr-toolkit/README.md +0 -467
  20. package/packages/ndpr-toolkit/jest.config.js +0 -23
  21. package/packages/ndpr-toolkit/package-lock.json +0 -8197
  22. package/packages/ndpr-toolkit/package.json +0 -71
  23. package/packages/ndpr-toolkit/rollup.config.js +0 -34
  24. package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentBanner.test.tsx +0 -119
  25. package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentManager.test.tsx +0 -122
  26. package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentStorage.test.tsx +0 -270
  27. package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRDashboard.test.tsx +0 -199
  28. package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRRequestForm.test.tsx +0 -224
  29. package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRTracker.test.tsx +0 -104
  30. package/packages/ndpr-toolkit/src/__tests__/hooks/useConsent.test.tsx +0 -161
  31. package/packages/ndpr-toolkit/src/__tests__/hooks/useDSR.test.tsx +0 -330
  32. package/packages/ndpr-toolkit/src/__tests__/utils/breach.test.ts +0 -149
  33. package/packages/ndpr-toolkit/src/__tests__/utils/consent.test.ts +0 -88
  34. package/packages/ndpr-toolkit/src/__tests__/utils/dpia.test.ts +0 -160
  35. package/packages/ndpr-toolkit/src/__tests__/utils/dsr.test.ts +0 -110
  36. package/packages/ndpr-toolkit/src/__tests__/utils/privacy.test.ts +0 -97
  37. package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +0 -701
  38. package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +0 -631
  39. package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +0 -569
  40. package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +0 -496
  41. package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +0 -270
  42. package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +0 -217
  43. package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +0 -206
  44. package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +0 -342
  45. package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +0 -373
  46. package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +0 -174
  47. package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +0 -717
  48. package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +0 -476
  49. package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +0 -620
  50. package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +0 -541
  51. package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +0 -454
  52. package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +0 -333
  53. package/packages/ndpr-toolkit/src/hooks/useBreach.ts +0 -409
  54. package/packages/ndpr-toolkit/src/hooks/useConsent.ts +0 -263
  55. package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +0 -457
  56. package/packages/ndpr-toolkit/src/hooks/useDSR.ts +0 -236
  57. package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +0 -428
  58. package/packages/ndpr-toolkit/src/index.ts +0 -44
  59. package/packages/ndpr-toolkit/src/setupTests.ts +0 -5
  60. package/packages/ndpr-toolkit/src/types/breach.ts +0 -283
  61. package/packages/ndpr-toolkit/src/types/consent.ts +0 -111
  62. package/packages/ndpr-toolkit/src/types/dpia.ts +0 -236
  63. package/packages/ndpr-toolkit/src/types/dsr.ts +0 -192
  64. package/packages/ndpr-toolkit/src/types/index.ts +0 -42
  65. package/packages/ndpr-toolkit/src/types/privacy.ts +0 -246
  66. package/packages/ndpr-toolkit/src/utils/breach.ts +0 -122
  67. package/packages/ndpr-toolkit/src/utils/consent.ts +0 -51
  68. package/packages/ndpr-toolkit/src/utils/dpia.ts +0 -104
  69. package/packages/ndpr-toolkit/src/utils/dsr.ts +0 -77
  70. package/packages/ndpr-toolkit/src/utils/privacy.ts +0 -100
  71. package/packages/ndpr-toolkit/tsconfig.json +0 -23
  72. package/postcss.config.mjs +0 -5
  73. package/src/__tests__/example.test.ts +0 -13
  74. package/src/__tests__/requestService.test.ts +0 -57
  75. package/src/app/accessibility.css +0 -70
  76. package/src/app/docs/components/DocLayout.tsx +0 -267
  77. package/src/app/docs/components/breach-notification/page.tsx +0 -797
  78. package/src/app/docs/components/consent-management/page.tsx +0 -576
  79. package/src/app/docs/components/data-subject-rights/page.tsx +0 -511
  80. package/src/app/docs/components/dpia-questionnaire/layout.tsx +0 -15
  81. package/src/app/docs/components/dpia-questionnaire/metadata.ts +0 -31
  82. package/src/app/docs/components/dpia-questionnaire/page.tsx +0 -666
  83. package/src/app/docs/components/hooks/page.tsx +0 -305
  84. package/src/app/docs/components/page.tsx +0 -84
  85. package/src/app/docs/components/privacy-policy-generator/page.tsx +0 -634
  86. package/src/app/docs/guides/breach-notification-process/components/BestPractices.tsx +0 -123
  87. package/src/app/docs/guides/breach-notification-process/components/ImplementationSteps.tsx +0 -328
  88. package/src/app/docs/guides/breach-notification-process/components/Introduction.tsx +0 -28
  89. package/src/app/docs/guides/breach-notification-process/components/NotificationTimeline.tsx +0 -91
  90. package/src/app/docs/guides/breach-notification-process/components/Resources.tsx +0 -118
  91. package/src/app/docs/guides/breach-notification-process/page.tsx +0 -39
  92. package/src/app/docs/guides/conducting-dpia/page.tsx +0 -593
  93. package/src/app/docs/guides/data-subject-requests/page.tsx +0 -666
  94. package/src/app/docs/guides/managing-consent/page.tsx +0 -738
  95. package/src/app/docs/guides/ndpr-compliance-checklist/components/ComplianceChecklist.tsx +0 -296
  96. package/src/app/docs/guides/ndpr-compliance-checklist/components/ImplementationTools.tsx +0 -145
  97. package/src/app/docs/guides/ndpr-compliance-checklist/components/Introduction.tsx +0 -33
  98. package/src/app/docs/guides/ndpr-compliance-checklist/components/KeyRequirements.tsx +0 -99
  99. package/src/app/docs/guides/ndpr-compliance-checklist/components/Resources.tsx +0 -159
  100. package/src/app/docs/guides/ndpr-compliance-checklist/page.tsx +0 -38
  101. package/src/app/docs/guides/page.tsx +0 -67
  102. package/src/app/docs/layout.tsx +0 -15
  103. package/src/app/docs/metadata.ts +0 -31
  104. package/src/app/docs/page.tsx +0 -572
  105. package/src/app/favicon.ico +0 -0
  106. package/src/app/globals.css +0 -123
  107. package/src/app/layout.tsx +0 -37
  108. package/src/app/ndpr-demos/breach/page.tsx +0 -354
  109. package/src/app/ndpr-demos/consent/page.tsx +0 -366
  110. package/src/app/ndpr-demos/dpia/page.tsx +0 -495
  111. package/src/app/ndpr-demos/dsr/page.tsx +0 -280
  112. package/src/app/ndpr-demos/page.tsx +0 -73
  113. package/src/app/ndpr-demos/policy/page.tsx +0 -771
  114. package/src/app/page.tsx +0 -452
  115. package/src/components/ErrorBoundary.tsx +0 -90
  116. package/src/components/breach-notification/BreachNotificationForm.tsx +0 -479
  117. package/src/components/consent/ConsentBanner.tsx +0 -159
  118. package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +0 -419
  119. package/src/components/docs/DocLayout.tsx +0 -289
  120. package/src/components/docs/index.ts +0 -2
  121. package/src/components/dpia/DPIAQuestionnaire.tsx +0 -483
  122. package/src/components/privacy-policy/PolicyGenerator.tsx +0 -1062
  123. package/src/components/privacy-policy/data.ts +0 -98
  124. package/src/components/privacy-policy/shared/CheckboxField.tsx +0 -38
  125. package/src/components/privacy-policy/shared/CheckboxGroup.tsx +0 -85
  126. package/src/components/privacy-policy/shared/FormField.tsx +0 -79
  127. package/src/components/privacy-policy/shared/StepIndicator.tsx +0 -86
  128. package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +0 -335
  129. package/src/components/privacy-policy/steps/DataCollectionStep.tsx +0 -231
  130. package/src/components/privacy-policy/steps/DataSharingStep.tsx +0 -418
  131. package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +0 -202
  132. package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +0 -172
  133. package/src/components/ui/Badge.tsx +0 -46
  134. package/src/components/ui/Button.tsx +0 -59
  135. package/src/components/ui/Card.tsx +0 -92
  136. package/src/components/ui/Checkbox.tsx +0 -57
  137. package/src/components/ui/FormField.tsx +0 -50
  138. package/src/components/ui/Input.tsx +0 -38
  139. package/src/components/ui/Loading.tsx +0 -201
  140. package/src/components/ui/Select.tsx +0 -42
  141. package/src/components/ui/TextArea.tsx +0 -38
  142. package/src/components/ui/label.tsx +0 -24
  143. package/src/components/ui/switch.tsx +0 -31
  144. package/src/components/ui/tabs.tsx +0 -66
  145. package/src/hooks/useConsent.ts +0 -64
  146. package/src/hooks/useLoadingState.ts +0 -85
  147. package/src/lib/consentService.ts +0 -137
  148. package/src/lib/dpiaQuestions.ts +0 -148
  149. package/src/lib/requestService.ts +0 -75
  150. package/src/lib/sanitize.ts +0 -108
  151. package/src/lib/storage.ts +0 -222
  152. package/src/lib/utils.ts +0 -6
  153. package/src/types/html-to-docx.d.ts +0 -30
  154. package/src/types/index.ts +0 -72
  155. package/tailwind.config.ts +0 -65
  156. package/tsconfig.json +0 -41
package/next-env.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+
4
+ // NOTE: This file should not be edited
5
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tantainnovative/ndpr-toolkit",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
5
  "description": "Nigerian Data Protection Compliance Toolkit for implementing NDPR and DPA compliant features",
6
6
  "scripts": {
@@ -1,20 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(find:*)",
5
- "Bash(grep:*)",
6
- "Bash(git push:*)",
7
- "Bash(npm run lint)",
8
- "Bash(pnpm lint:*)",
9
- "Bash(pnpm install:*)",
10
- "Bash(git add:*)",
11
- "Bash(git commit:*)",
12
- "Bash(pnpm add:*)",
13
- "Bash(pnpm build:*)",
14
- "Bash(sed:*)",
15
- "Bash(cat:*)",
16
- "Bash(npm:*)"
17
- ],
18
- "deny": []
19
- }
20
- }
package/.eslintrc.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "next/core-web-vitals",
3
- "rules": {
4
- "@typescript-eslint/no-unused-vars": "off",
5
- "@typescript-eslint/no-empty-object-type": "off",
6
- "react/no-unescaped-entities": "off",
7
- "@typescript-eslint/no-explicit-any": "off"
8
- },
9
- "ignorePatterns": ["node_modules/**/*"]
10
- }
@@ -1,36 +0,0 @@
1
- name: Continuous Integration
2
-
3
- on:
4
- push:
5
- branches: [ main, develop ]
6
- pull_request:
7
- branches: [ main, develop ]
8
-
9
- jobs:
10
- lint-and-test:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [20.x]
16
-
17
- steps:
18
- - uses: actions/checkout@v4
19
-
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v4
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm ci
28
-
29
- - name: Lint
30
- run: npm run lint
31
-
32
- - name: Type check
33
- run: npx tsc --noEmit
34
-
35
- - name: Run tests
36
- run: npm test
@@ -1,104 +0,0 @@
1
- # Sample workflow for building and deploying a Next.js site to GitHub Pages
2
- #
3
- # To get started with Next.js see: https://nextjs.org/docs/getting-started
4
- #
5
- name: Deploy Next.js site to Pages
6
-
7
- on:
8
- # Runs on pushes targeting the default branch
9
- push:
10
- branches: ["main"]
11
-
12
- # Allows you to run this workflow manually from the Actions tab
13
- workflow_dispatch:
14
-
15
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16
- permissions:
17
- contents: read
18
- pages: write
19
- id-token: write
20
-
21
- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22
- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23
- concurrency:
24
- group: "pages"
25
- cancel-in-progress: false
26
-
27
- jobs:
28
- # Build job
29
- build:
30
- runs-on: ubuntu-latest
31
- steps:
32
- - name: Checkout
33
- uses: actions/checkout@v4
34
- - name: Detect package manager
35
- id: detect-package-manager
36
- run: |
37
- if [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
38
- echo "manager=pnpm" >> $GITHUB_OUTPUT
39
- echo "command=install" >> $GITHUB_OUTPUT
40
- echo "runner=pnpm" >> $GITHUB_OUTPUT
41
- exit 0
42
- elif [ -f "${{ github.workspace }}/yarn.lock" ]; then
43
- echo "manager=yarn" >> $GITHUB_OUTPUT
44
- echo "command=install" >> $GITHUB_OUTPUT
45
- echo "runner=yarn" >> $GITHUB_OUTPUT
46
- exit 0
47
- elif [ -f "${{ github.workspace }}/package.json" ]; then
48
- echo "manager=npm" >> $GITHUB_OUTPUT
49
- echo "command=ci" >> $GITHUB_OUTPUT
50
- echo "runner=npx --no-install" >> $GITHUB_OUTPUT
51
- exit 0
52
- else
53
- echo "Unable to determine package manager"
54
- exit 1
55
- fi
56
- - name: Setup Node
57
- uses: actions/setup-node@v4
58
- with:
59
- node-version: "20"
60
- cache: ${{ steps.detect-package-manager.outputs.manager }}
61
- - name: Setup pnpm
62
- if: steps.detect-package-manager.outputs.manager == 'pnpm'
63
- uses: pnpm/action-setup@v2
64
- with:
65
- version: 8
66
- run_install: false
67
- - name: Setup Pages
68
- uses: actions/configure-pages@v5
69
- with:
70
- # Automatically inject basePath in your Next.js configuration file and disable
71
- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
72
- #
73
- # You may remove this line if you want to manage the configuration yourself.
74
- static_site_generator: next
75
- - name: Restore cache
76
- uses: actions/cache@v4
77
- with:
78
- path: |
79
- .next/cache
80
- # Generate a new cache whenever packages or source files change.
81
- key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
82
- # If source files changed but packages didn't, rebuild from a prior cache.
83
- restore-keys: |
84
- ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
85
- - name: Install dependencies
86
- run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
87
- - name: Build with Next.js
88
- run: ${{ steps.detect-package-manager.outputs.runner }} next build
89
- - name: Upload artifact
90
- uses: actions/upload-pages-artifact@v3
91
- with:
92
- path: ./out
93
-
94
- # Deployment job
95
- deploy:
96
- environment:
97
- name: github-pages
98
- url: ${{ steps.deployment.outputs.page_url }}
99
- runs-on: ubuntu-latest
100
- needs: build
101
- steps:
102
- - name: Deploy to GitHub Pages
103
- id: deployment
104
- uses: actions/deploy-pages@v4
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx --no -- commitlint --edit ${1}
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx lint-staged
package/.lintstagedrc.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- '*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
3
- '*.{json,md}': ['prettier --write'],
4
- };
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 20
package/.versionrc DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "types": [
3
- {"type": "feat", "section": "Features"},
4
- {"type": "fix", "section": "Bug Fixes"},
5
- {"type": "chore", "hidden": true},
6
- {"type": "docs", "section": "Documentation"},
7
- {"type": "style", "hidden": true},
8
- {"type": "refactor", "section": "Code Refactoring"},
9
- {"type": "perf", "section": "Performance Improvements"},
10
- {"type": "test", "hidden": true},
11
- {"type": "build", "hidden": true},
12
- {"type": "ci", "hidden": true}
13
- ],
14
- "commitUrlFormat": "https://github.com/tantainnovative/ndpr-toolkit/commit/{{hash}}",
15
- "compareUrlFormat": "https://github.com/tantainnovative/ndpr-toolkit/compare/{{previousTag}}...{{currentTag}}",
16
- "releaseCommitMessageFormat": "chore(release): {{currentTag}}"
17
- }
package/CLAUDE.md DELETED
@@ -1,90 +0,0 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Project Overview
6
-
7
- The Nigerian Data Protection Compliance Toolkit (NDPR-Toolkit) is a Next.js application that helps developers implement NDPR and DPA compliant features. It's deployed as a static site to GitHub Pages.
8
-
9
- ## Development Commands
10
-
11
- ### Package Manager
12
- Always use `pnpm` for all package management operations.
13
-
14
- ### Core Commands
15
- - **Development server**: `pnpm dev` (uses Turbopack)
16
- - **Build**: `pnpm build`
17
- - **Production server**: `pnpm start`
18
- - **Static export**: `pnpm export` or `pnpm build:static`
19
- - **Deploy to GitHub Pages**: `pnpm deploy`
20
-
21
- ### Testing
22
- - **Run tests**: `pnpm test`
23
- - **Run specific test**: `pnpm test -- path/to/test.spec.ts`
24
- - **Tests use**: Jest with React Testing Library and jest-environment-jsdom
25
-
26
- ### Code Quality
27
- - **Lint**: `pnpm lint`
28
- - **Git hooks**: Pre-commit runs lint-staged, commit-msg runs commitlint
29
- - **Commit format**: Use conventional commits (feat, fix, docs, style, refactor, test, chore)
30
-
31
- ### Release Management
32
- - **Standard release**: `pnpm release`
33
- - **Version bumps**: `pnpm release:patch`, `pnpm release:minor`, `pnpm release:major`
34
-
35
- ## Architecture
36
-
37
- ### Tech Stack
38
- - **Next.js 15.3.1** with App Router
39
- - **React 19** with TypeScript
40
- - **Tailwind CSS v4** with custom theme configuration
41
- - **Radix UI** for accessible components
42
- - **Nextra** for documentation pages
43
-
44
- ### Project Structure
45
- ```
46
- src/
47
- ├── app/ # Next.js pages (App Router)
48
- │ ├── docs/ # Documentation pages
49
- │ ├── ndpr-demos/ # Interactive NDPR compliance demos
50
- │ └── page.tsx # Homepage
51
- ├── components/ # Feature-based component organization
52
- │ ├── breach-notification/
53
- │ ├── consent/
54
- │ ├── data-subject-rights/
55
- │ ├── dpia/
56
- │ ├── privacy-policy/
57
- │ └── ui/ # Base UI components
58
- ├── hooks/ # Custom React hooks
59
- ├── lib/ # Services and utilities
60
- │ ├── consentService.ts
61
- │ ├── requestService.ts # LocalStorage-based state management
62
- │ └── utils.ts
63
- └── types/ # TypeScript type definitions
64
- ```
65
-
66
- ### Key Patterns
67
-
68
- 1. **State Management**: Demo data persists in localStorage via service layer (e.g., `requestService.ts`)
69
- 2. **Component Architecture**: Feature-based organization with modular, reusable components
70
- 3. **Static Site**: Configured for GitHub Pages with basePath and assetPrefix in `next.config.ts`
71
- 4. **Type Safety**: Comprehensive TypeScript types in `types/` directory
72
- 5. **Styling**: Tailwind CSS with CSS variables for theming
73
-
74
- ### NDPR Compliance Features
75
-
76
- When working on NDPR features, understand these core modules:
77
-
78
- 1. **Consent Management** (`components/consent/`): Multi-purpose consent with granular controls
79
- 2. **Data Subject Rights** (`components/data-subject-rights/`): Request portal for access, deletion, etc.
80
- 3. **Privacy Policy Generator** (`components/privacy-policy/`): Step-by-step wizard
81
- 4. **DPIA Tool** (`components/dpia/`): Data Protection Impact Assessment questionnaire
82
- 5. **Breach Notification** (`components/breach-notification/`): Incident reporting system
83
-
84
- ### Important Notes
85
-
86
- - All data in demos uses localStorage - no backend required
87
- - Components are designed for NDPR/DPA compliance out of the box
88
- - The project auto-deploys to GitHub Pages on main branch pushes
89
- - TypeScript strict mode is enabled - maintain type safety
90
- - Follow existing component patterns when adding new features
@@ -1,36 +0,0 @@
1
- module.exports = {
2
- extends: ['@commitlint/config-conventional'],
3
- rules: {
4
- 'body-leading-blank': [1, 'always'],
5
- 'body-max-line-length': [2, 'always', 100],
6
- 'footer-leading-blank': [1, 'always'],
7
- 'footer-max-line-length': [2, 'always', 100],
8
- 'header-max-length': [2, 'always', 100],
9
- 'subject-case': [
10
- 2,
11
- 'never',
12
- ['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
13
- ],
14
- 'subject-empty': [2, 'never'],
15
- 'subject-full-stop': [2, 'never', '.'],
16
- 'type-case': [2, 'always', 'lower-case'],
17
- 'type-empty': [2, 'never'],
18
- 'type-enum': [
19
- 2,
20
- 'always',
21
- [
22
- 'build',
23
- 'chore',
24
- 'ci',
25
- 'docs',
26
- 'feat',
27
- 'fix',
28
- 'perf',
29
- 'refactor',
30
- 'revert',
31
- 'style',
32
- 'test',
33
- ],
34
- ],
35
- },
36
- };
package/eslint.config.mjs DELETED
@@ -1,16 +0,0 @@
1
- import { dirname } from "path";
2
- import { fileURLToPath } from "url";
3
- import { FlatCompat } from "@eslint/eslintrc";
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = dirname(__filename);
7
-
8
- const compat = new FlatCompat({
9
- baseDirectory: __dirname,
10
- });
11
-
12
- const eslintConfig = [
13
- ...compat.extends("next/core-web-vitals", "next/typescript"),
14
- ];
15
-
16
- export default eslintConfig;
package/jest.config.js DELETED
@@ -1,31 +0,0 @@
1
- const nextJest = require('next/jest');
2
-
3
- const createJestConfig = nextJest({
4
- // Provide the path to your Next.js app to load next.config.js and .env files in your test environment
5
- dir: './',
6
- });
7
-
8
- // Add any custom config to be passed to Jest
9
- const customJestConfig = {
10
- setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
11
- testEnvironment: 'jest-environment-jsdom',
12
- moduleNameMapper: {
13
- // Handle module aliases (if you have them in tsconfig.json)
14
- '^@/(.*)$': '<rootDir>/src/$1',
15
- },
16
- testPathIgnorePatterns: [
17
- '<rootDir>/node_modules/',
18
- '<rootDir>/.next/',
19
- '<rootDir>/out/'
20
- ],
21
- collectCoverage: true,
22
- collectCoverageFrom: [
23
- 'src/**/*.{js,jsx,ts,tsx}',
24
- '!src/**/*.d.ts',
25
- '!src/**/_*.{js,jsx,ts,tsx}',
26
- '!src/**/index.{js,jsx,ts,tsx}',
27
- ],
28
- };
29
-
30
- // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
31
- module.exports = createJestConfig(customJestConfig);
package/jest.setup.js DELETED
@@ -1,15 +0,0 @@
1
- // Learn more: https://github.com/testing-library/jest-dom
2
- import '@testing-library/jest-dom';
3
-
4
- // Mock localStorage for tests
5
- if (typeof window !== 'undefined') {
6
- Object.defineProperty(window, 'localStorage', {
7
- value: {
8
- getItem: jest.fn(),
9
- setItem: jest.fn(),
10
- removeItem: jest.fn(),
11
- clear: jest.fn(),
12
- },
13
- writable: true
14
- });
15
- }
package/next.config.js DELETED
@@ -1,15 +0,0 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {
3
- output: 'export',
4
- basePath: '',
5
- images: {
6
- unoptimized: true,
7
- },
8
- eslint: {
9
- // Warning: This allows production builds to successfully complete even if
10
- // your project has ESLint errors.
11
- ignoreDuringBuilds: true,
12
- },
13
- }
14
-
15
- module.exports = nextConfig
package/next.config.ts DELETED
@@ -1,62 +0,0 @@
1
- import type { NextConfig } from "next";
2
-
3
- // Check if we're in development mode
4
- const isDevelopment = process.env.NODE_ENV === 'development';
5
-
6
- // Repository name for GitHub Pages
7
- const REPO_NAME = 'ndpr-toolkit';
8
-
9
- const nextConfig: NextConfig = {
10
- reactStrictMode: true,
11
-
12
- // These settings apply to all environments
13
- poweredByHeader: false,
14
-
15
- // Fix for hydration errors
16
- // This ensures consistent rendering between server and client
17
- experimental: {
18
- // Reduce hydration mismatches by making SSR output match client rendering
19
- scrollRestoration: true,
20
- },
21
-
22
- // Optimize fonts to reduce hydration mismatches
23
- optimizeFonts: true,
24
-
25
- // Suppress hydration warnings in development
26
- onDemandEntries: {
27
- // Keep pages in memory for longer to avoid reloading
28
- maxInactiveAge: 25 * 1000,
29
- pagesBufferLength: 5,
30
- },
31
-
32
- // Only use static export, basePath and assetPrefix in production
33
- ...(isDevelopment
34
- ? {
35
- // Development config - no basePath or static export
36
- }
37
- : {
38
- // Production config for GitHub Pages
39
- output: 'export', // Enable static HTML export
40
- trailingSlash: true, // Important for GitHub Pages to work correctly with routing
41
- images: {
42
- unoptimized: true, // Required for static export
43
- },
44
- basePath: `/${REPO_NAME}`,
45
- assetPrefix: `/${REPO_NAME}`,
46
- }
47
- ),
48
- };
49
-
50
- // Add a custom export script to generate a .nojekyll file
51
- // This prevents GitHub Pages from ignoring files that begin with an underscore
52
- if (process.env.NODE_ENV === 'production') {
53
- const { execSync } = require('child_process');
54
- try {
55
- execSync('touch out/.nojekyll');
56
- console.log('Created .nojekyll file');
57
- } catch (error) {
58
- console.error('Error creating .nojekyll file:', error);
59
- }
60
- }
61
-
62
- export default nextConfig;