Commit Graph

5 Commits

Author SHA1 Message Date
Kunthawat
e1d170252b Revert to SSR mode with Node adapter - keep consent logs backend 2026-04-02 09:54:07 +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 Greethong
5f9673aac4 Initial commit - Deal Plus Tech Astro Website
 53 pages (34 products + corporate)
 All logo images
 Nginx Dockerfile (production-ready)
 PDPA compliant (cookie consent)
 Modern design with Kanit font
 Line + Phone buttons on products

Built: 2026-03-13
2026-03-13 10:38:49 +07:00