{"id":29350697,"url":"https://github.com/dorsium/gdpr-consent","last_synced_at":"2026-05-05T09:31:26.193Z","repository":{"id":303600999,"uuid":"1016057036","full_name":"dorsium/gdpr-consent","owner":"dorsium","description":"Lightweight GDPR \u0026 Cookie Consent module for Next.js projects. Built by Dorsium.","archived":false,"fork":false,"pushed_at":"2025-08-27T21:41:05.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T09:40:35.643Z","etag":null,"topics":["cookie-consent","dorsium","gdpr","nextjs","privacy","react","tailwind"],"latest_commit_sha":null,"homepage":"https://dorsium.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dorsium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T12:29:06.000Z","updated_at":"2025-08-27T21:41:08.000Z","dependencies_parsed_at":"2025-07-08T13:40:08.444Z","dependency_job_id":null,"html_url":"https://github.com/dorsium/gdpr-consent","commit_stats":null,"previous_names":["dorsium/gdpr-consent"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dorsium/gdpr-consent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorsium%2Fgdpr-consent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorsium%2Fgdpr-consent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorsium%2Fgdpr-consent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorsium%2Fgdpr-consent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dorsium","download_url":"https://codeload.github.com/dorsium/gdpr-consent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorsium%2Fgdpr-consent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32643484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookie-consent","dorsium","gdpr","nextjs","privacy","react","tailwind"],"created_at":"2025-07-08T23:13:26.912Z","updated_at":"2026-05-05T09:31:26.147Z","avatar_url":"https://github.com/dorsium.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @dorsium/gdpr\n\n[![npm version](https://img.shields.io/npm/v/@dorsium/gdpr.svg)](https://www.npmjs.com/package/@dorsium/gdpr)\n[![GitHub](https://img.shields.io/github/stars/dorsium/gdpr-consent?style=social)](https://github.com/dorsium/gdpr-consent)\n\n\u003e Lightweight GDPR \u0026 Cookie Consent module for Next.js projects. Built by the Dorsium Foundation.\n\n## Features\n\n- GDPR-compliant cookie consent banner\n- Categorized: Necessary, Analytics, Marketing\n- Remembers preferences via `localStorage`\n- Fully reusable NPM module\n- `useConsent()` hook for conditional logic\n- Styled with Tailwind CSS\n- Powered by Dorsium branding included\n\n## Installation\n\n```bash\nnpm install @dorsium/gdpr\n```\n\n## Usage\n\n### 1. Add the CookieConsent component (e.g. to `_app.tsx` or layout)\n```tsx\nimport { CookieConsent } from \"@dorsium/gdpr\";\n\nexport default function App({ Component, pageProps }) {\n  return (\n    \u003c\u003e\n      \u003cComponent {...pageProps} /\u003e\n      \u003cCookieConsent /\u003e\n    \u003c/\u003e\n  );\n}\n```\n\n### 2. Use the `useConsent()` hook to check preferences\n```tsx\nimport { useConsent } from \"@dorsium/gdpr\";\n\nexport default function AnalyticsLoader() {\n  const { hasConsent } = useConsent();\n\n  useEffect(() =\u003e {\n    if (hasConsent(\"analytics\")) {\n      // Load Google Analytics or other trackers here\n    }\n  }, [hasConsent]);\n\n  return null;\n}\n```\n\n### 3. Optional: Show the Dorsium badge\n```tsx\nimport { PoweredByDorsiumBadge } from \"@dorsium/gdpr\";\n\nexport default function Footer() {\n  return (\n    \u003cfooter className=\"text-center mt-8\"\u003e\n      \u003cPoweredByDorsiumBadge /\u003e\n    \u003c/footer\u003e\n  );\n}\n```\n\n## Configuration\nNo configuration needed. Automatically saves user choices under `localStorage['dorsium_consent']`.\n\nOnly two boolean values are stored:\n- `analytics`\n- `marketing`\n\nThese flags are kept indefinitely in `localStorage` until you clear them. No personal data is stored.\n\n## Build\n\n```bash\nnpm run build\n```\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n© Dorsium — https://dorsium.com\n\n---\n\n[![Powered by Dorsium](https://img.shields.io/badge/Powered%20by-Dorsium-3C6DF0?style=flat-square)](https://dorsium.com)\n\n🔗 [View on NPM](https://www.npmjs.com/package/@dorsium/gdpr)  \n🔗 [Source on GitHub](https://github.com/dorsium/gdpr-consent)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorsium%2Fgdpr-consent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdorsium%2Fgdpr-consent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorsium%2Fgdpr-consent/lists"}