Kunthawat Greethong
|
7552b875e9
|
feat: Add full PDPA compliance with cookie consent and admin dashboard
Features implemented:
- Cookie consent banner (Accept/Reject) with localStorage storage
- Conditional Umami Analytics loading (only with consent)
- Admin dashboard at /admin/consent-logs with password protection
- API endpoints for consent logging (POST/GET/DELETE)
- Updated Privacy Policy with all 14 PDPA Section 36 requirements
- Updated Terms & Conditions with 17 comprehensive sections
- Astro DB integration with consent logging schema
- Production-ready Dockerfile with SQLite support
- Start command for Easypanel deployment
Files added:
- src/components/consent/CookieBanner.astro
- src/pages/api/consent/index.ts
- src/pages/api/consent/[sessionId]/index.ts
- src/pages/admin/consent-logs.astro
- db/schema.ts
- .env.example
- PDPA-COMPLIANCE.md
Files modified:
- src/layouts/Layout.astro (CookieBanner + conditional Umami)
- src/pages/privacy-policy.astro (full PDPA compliance)
- src/pages/terms-and-conditions.astro (comprehensive update)
- astro.config.mjs (Node adapter + DB)
- Dockerfile (production build with DB)
- package.json (dependencies + start script)
Deployment notes:
- CHANGE ADMIN_PASSWORD from default 'changeme'
- Run with: npm run start
- Docker: docker build -t moreminimore:latest .
|
2026-03-10 12:59:17 +07:00 |
|