Kunthawat
397bc5a29b
Fix refresh button styling - use bg-primary-500 instead of bg-primary
2026-04-01 17:47:36 +07:00
Kunthawat
88fcde1d62
Implement moreminimore-style consent backend with better-sqlite3
...
- Add @astrojs/node adapter for hybrid SSR mode
- Replace console logging with better-sqlite3 database storage
- Create data/ directory for consent.db persistence
- Full consent API: POST (log), GET (fetch), DELETE (remove)
- Admin dashboard at /admin/consent-logs.astro with:
- Password auth via sessionStorage
- Stats cards (total, analytics accepted, rejected, rate %)
- 100 latest logs table
- Export to CSV functionality
- Delete individual records
- New Dockerfile: node:20-alpine + sqlite-libs runtime
- Admin password: Coolm@n1234mo
Note: Static pages remain prerendered, only API/admin routes are SSR.
2026-04-01 15:41:46 +07:00
Kunthawat
a1c9930d49
Fix build: simplify consent API to static-compatible console logging
...
- Remove [sessionId].ts dynamic route (requires adapter in static mode)
- Simplify consent API to log to console only (no SQLite/better-sqlite3)
- Fix syntax error in consent-logs page (curly brace escaping)
- Consent logs page works for viewing instructions (password: Coolm@n1234mo)
Note: In static mode, API routes cannot actually handle POST requests.
For full runtime consent logging, would need hybrid/SSR deployment.
2026-04-01 15:23:54 +07:00
Kunthawat
41bf954d80
Implement full consent logging system with SQLite database
...
- Install better-sqlite3 and @astrojs/node adapter
- Update consent API to use SQLite database
- Add DELETE endpoint for consent logs
- Update admin consent-logs page with full UI (stats, table, export, delete)
- Add sessionId to consent tracking
- Admin password: Coolm@n1234mo
Note: Database stored at data/consent.db (gitignored)
2026-04-01 15:09:16 +07:00
Kunthawat
8cce63bba3
Create admin consent-logs page with password protection
...
Password: Coolm@n1234mo
Note: Consent logs are written to server console/Docker logs.
For full persistence, database integration needed.
2026-04-01 14:59:44 +07:00