feat: Update images with Unsplash (hero + illustrations), fix UX/UI, add animations

- Replace MiniMax images with Unsplash (free commercial use)
- Hero images: marketing, AI automation, tech consult, web dev, about-us
- Illustrations: different from heroes for all 4 service pages
- Fix ตัวอย่างการใช้งาน section on marketing-automation
- Update about-us with hero image
- All images stored locally (not hotlinks)
This commit is contained in:
Kunthawat Greethong
2026-03-30 11:38:48 +07:00
parent d2b52fdfa7
commit ae4a897d11
64 changed files with 4916 additions and 2554 deletions

405
AGENTS.md
View File

@@ -1,326 +1,143 @@
# MoreMiniMore Website - AI Agent Development Log
## 📋 Project Overview
**Project:** MoreMiniMore Website PDPA Compliance Implementation
**Repository:** https://git.moreminimore.com/kunthawat/moreminimore-website.git
**Branch:** main
**Deployment:** Easypanel (auto-deploy from Git)
**Tech Stack:** Astro 5.x, Node.js, Tailwind CSS 4.x, Astro DB, SQLite
**Generated:** 2026-03-30
**Commit:** 193a4a4 (main)
**Last Updated:** March 30, 2026 (AI Automation + Tech Consult redesign)
---
## 🎯 Current Status: ✅ COMPLETE
## OVERVIEW
**Last Updated:** March 10, 2026
**Status:** Production-Ready, Fully PDPA-Compliant
**Deployment:** Live on Easypanel (port 80)
Astro 5.x Thai business website. PDPA-compliant with cookie consent. Auto-deploys to Easypanel from Gitea.
**Live:** https://moreminimore.com/
**Repo:** https://git.moreminimore.com/kunthawat/moreminimore-website
---
## 🚀 Major Implementations
## TECH STACK
### **March 10, 2026 - PDPA Compliance Implementation**
#### **Features Delivered:**
1. **Cookie Consent System**
- Component: `src/components/consent/CookieBanner.astro`
- Thai language with Accept/Reject buttons
- localStorage integration
- Auto-dismiss on user choice
- Dispatches 'consentGiven' event
2. **Conditional Analytics**
- Umami Analytics integration
- Loads ONLY when user accepts cookies
- Privacy-first approach (GDPR/PDPA compliant)
3. **Admin Dashboard**
- URL: `/admin/consent-logs`
- Password-protected (env: ADMIN_PASSWORD)
- View last 100 consent records
- Delete individual records (right to be forgotten)
- Statistics display (total, acceptance rate)
4. **API Endpoints**
- `POST /api/consent` - Log new consent
- `GET /api/consent` - Retrieve consent logs
- `DELETE /api/consent/:sessionId` - Right to be forgotten
5. **PDPA-Compliant Legal Pages**
- **Privacy Policy:** All 14 PDPA Section 36 requirements
- Data controller information
- Purpose of data processing
- Types of data collected
- Legal basis for processing
- Data retention period
- Data sharing & disclosure
- Cross-border transfers
- Automated decision making
- Cookies & tracking technologies
- 8 data subject rights
- Security measures
- DPO contact
- Right to lodge complaint
- Policy version & effective date
- **Terms & Conditions:** 17 comprehensive sections
- Acceptance, services, IP rights
- User obligations, data processing
- Liability limits, termination
- Governing law (Thailand)
- Dispute resolution
6. **Infrastructure Updates**
- Custom Dockerfile (Node.js server adapter)
- Astro DB integration (SQLite)
- Package.json with start script
- Node.js 20+ requirement
7. **Documentation**
- `.env.example` - Environment variables template
- `PDPA-COMPLIANCE.md` - Complete compliance guide
| Component | Version |
|-----------|---------|
| Astro | 5.x |
| Node adapter | @astrojs/node 9.x |
| Tailwind CSS | 4.x |
| Astro DB | 0.20 (SQLite) |
| Node | >=20.0.0 |
---
## 📦 Files Created/Modified
## PAGES (18 total)
### **New Files (7):**
```
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
```
### **Modified Files (6):**
```
src/layouts/Layout.astro
src/pages/privacy-policy.astro
src/pages/terms-and-conditions.astro
astro.config.mjs
package.json
Dockerfile
```
### **Total Changes:**
- **13 files** changed
- **1,955+ lines** added
- **48 lines** removed
| Route | Purpose |
|-------|---------|
| `/` | Homepage |
| `/ai-automation` | AI services (purple hero) |
| `/tech-consult` | Tech consulting (teal hero) |
| `/marketing-automation` | Marketing automation (green hero) |
| `/web-development` | Web dev services |
| `/about-us` | Company info |
| `/portfolio` | Work samples |
| `/faq` | FAQ page |
| `/contact-us` | Contact form |
| `/privacy-policy` | PDPA privacy policy |
| `/terms-and-conditions` | PDPA terms |
| `/admin/consent-logs` | Consent admin (password-protected) |
| `/api/consent` | Consent API |
| `/blog/[slug]` | Blog posts |
---
## 🔧 Configuration
## RECENT CHANGES (March 30, 2026)
### GEO Support Added (Marketing Automation + Website Dev)
- Added GEO (Generative Engine Optimization) to both Marketing Automation and Website Development pages
- GEO = optimize for AI Search (ChatGPT, Perplexity, Google AI Overviews) alongside SEO
- Added GEO FAQ Schema (JSON-LD) to both pages
- Added GEO service card (Marketing Automation: "ปรากฏใน AI Search / ติด ChatGPT, Perplexity / Schema markup ครบ")
- Added GEO benefit (Website Dev: "GEO ติด AI Search - เว็บถูกอ้างอิงโดย ChatGPT, Perplexity, Google AI Overviews")
- Updated page titles/descriptions to mention GEO
### AI Automation Page Redesign
- Purple/indigo hero
- 4 services: Custom AI app, Data integration, AI analysis, Internal chatbot
- 10 case studies (hospital, factory, logistics, insurance, school, restaurant, construction, transport, real estate, SME)
- Yellow CTA sections
### Tech Consult Page Redesign
- Blue/teal hero
- 4 services: Marketing Automation, AI Automation, AI Hardware, รวมระบบ
- 10 case studies, 4 FAQs
- Yellow CTA sections
### Thai Spelling Fixes
- `ครบวงจน``ครบวงจร` (11 times across pages)
- `แล้วแนะนำ``จากนั้นจึงแนะนำ` (1 time)
- `ดูแลบำรุง``ดูแลและบำรุง` (1 time)
### Menu/Footer Cleanup
- Removed `/seo-content-system` links
- Moved Tech Consult to top of menu
---
## PDPA COMPLIANCE (March 10)
### Cookie Consent
- Component: `src/components/consent/CookieBanner.astro`
- Thai language Accept/Reject
- localStorage tracking
- Dispatches `consentGiven` event
### Privacy Policy
- 14 PDPA Section 36 requirements
- Data controller, purposes, rights, DPO contact
### Terms & Conditions
- 17 sections
- Thai Consumer Protection Act compliant
### Admin Dashboard
- `/admin/consent-logs`
- Password via `ADMIN_PASSWORD` env
- View/delete consent records
---
## DEPLOY
### **Environment Variables Required:**
```bash
# Admin Dashboard (CHANGE THIS!)
ADMIN_PASSWORD=your-secure-password
# Umami Analytics (optional)
UMAMI_WEBSITE_ID=b2e87a6c-0b64-43c8-bb09-e406ffca0af1
UMAMI_DOMAIN=umami.moreminimore.com
# Database (defaults to SQLite file)
ASTRO_DB_REMOTE_URL=file:./data/consent.db
# Server
NODE_ENV=production
PORT=80
HOST=0.0.0.0
npm run build:remote # Build with SQLite DB
git push origin main # Easypanel auto-deploys (~3 min)
```
### **Build Commands:**
```bash
# Development
npm run dev
# Production Build
npm run build:remote
# Docker Build
docker build -t moreminimore:latest .
# Run Container
docker run -p 80:80 -e ADMIN_PASSWORD=xxx moreminimore:latest
```
**Dockerfile:** Multi-stage (node:20-alpine), port 80, `node dist/server/entry.mjs`
---
## 🧪 Testing & Verification
## WHERE TO LOOK
### **Local Tests:** ✅ ALL PASSED
- ✅ NPM install (dependencies synced)
- ✅ Build time: 1.16s
- ✅ Docker build: 9.4s
- ✅ Container test: Working
- ✅ All features verified locally
### **Production Tests:** ✅ ALL PASSED
- ✅ Server running on port 80
- ✅ Homepage accessible
- ✅ Cookie banner displays
- ✅ Admin dashboard accessible
- ✅ API endpoints responding
| Task | File |
|------|------|
| AI Automation content | `src/pages/ai-automation.astro` |
| Tech Consult content | `src/pages/tech-consult.astro` |
| Marketing Automation + GEO | `src/pages/marketing-automation.astro` |
| Website Dev + GEO | `src/pages/web-development.astro` |
| Cookie consent | `src/components/consent/CookieBanner.astro` |
| Consent API | `src/pages/api/consent/index.ts` |
| Layout/menu | `src/layouts/Layout.astro` |
| Blog posts | `src/content/blog/*.md` |
---
## 📊 Deployment History
## ANTI-PATTERNS
### **March 10, 2026 - Initial PDPA Deployment**
| Commit | Description | Status |
|--------|-------------|--------|
| `b485320` | feat: Add full PDPA compliance | ✅ Deployed |
| `b76da28` | docs: Add legal pages & documentation | ✅ Deployed |
| `3660d43` | fix: Sync package-lock.json | ✅ Deployed |
| `6ebc97f` | ci: Trigger Easypanel rebuild | ✅ Deployed |
### **Deployment Issues & Resolutions:**
1. **Issue:** Docker build failed - `npm ci` error (package-lock out of sync)
- **Commit:** `b76da28`
- **Resolution:** Regenerated package-lock.json in commit `3660d43`
- **Status:** ✅ Fixed
2. **Issue:** Easypanel building old commit
- **Resolution:** Created trigger commit `6ebc97f`
- **Status:** ✅ Fixed
3. **Warning:** Multi-level URL encoding errors (non-critical)
- **Impact:** None - server runs normally
- **Status:** ⚠️ Known Astro/Node.js adapter warning
- **NEVER** use `ครบวงจน` (wrong) — correct is `ครบวงจร`
- **NEVER** use `แล้วแนะนำ` for sequential actions — use `จากนั้นจึงแนะนำ`
- **NEVER** use `ดูแลบำรุง` — correct is `ดูแลและบำรุง`
- **NEVER** use emojis in Astro components — use icons
- **NEVER** hardcode credentials — use env vars
---
## 🔐 Security Checklist
### **Pre-Production:**
- [x] Cookie consent implemented
- [x] Privacy Policy PDPA-compliant
- [x] Terms & Conditions comprehensive
- [x] Admin dashboard password-protected
- [ ] **ACTION REQUIRED:** Change `ADMIN_PASSWORD` from default
- [x] HTTPS enabled (Easypanel default)
- [x] Package dependencies audited
### **Post-Deployment:**
- [ ] Change admin password in Easypanel
- [ ] Test cookie consent in production
- [ ] Verify admin dashboard access
- [ ] Monitor consent logs
- [ ] Regular security audits
---
## 📞 Access Information
| Resource | URL | Credentials |
|----------|-----|-------------|
| **Website** | `/` | Public |
| **Privacy Policy** | `/privacy-policy` | Public |
| **Terms & Conditions** | `/terms-and-conditions` | Public |
| **Admin Dashboard** | `/admin/consent-logs` | Password: Set in Easypanel |
| **Consent API** | `/api/consent` | API endpoint |
---
## 📚 Documentation Files
- `PDPA-COMPLIANCE.md` - Complete PDPA compliance guide
- `.env.example` - Environment variables template
- `DEPLOYMENT.md` - Deployment instructions (if needed)
- `CHECKLIST.md` - Maintenance checklist (if needed)
---
## 🎯 Success Criteria (All Met)
- ✅ Website builds locally (`npm run dev`)
- ✅ Docker build succeeds
- ✅ Website accessible via browser
- ✅ Cookie consent appears on first visit
- ✅ Umami loads only with consent
- ✅ Admin page accessible with password
- ✅ Privacy Policy PDPA-compliant (14 sections)
- ✅ Terms & Conditions PDPA-compliant (17 sections)
- ✅ Data deletion works (right to be forgotten)
- ✅ Documentation complete
---
## 🔄 Ongoing Maintenance
### **When user asks to:**
- **Add content** → Create pages, commit, auto-deploy via Easypanel
- **Fix bugs** → Fix code, commit, auto-deploy
- **Update design** → Update components, commit, auto-deploy
- **Update legal pages** → Edit privacy-policy.astro / terms.astro, commit, auto-deploy
- **View consent logs** → Navigate to `/admin/consent-logs`, login with password
- **Delete consent data** → Use admin dashboard or call DELETE `/api/consent/:sessionId`
### **Update Workflow:**
1. Make changes locally
2. Test: `npm run build:remote`
3. Commit: `git commit -m "description"`
4. Push: `git push origin main`
5. Easypanel auto-deploys (~3 minutes)
---
## 📊 Technical Specifications
### **Dependencies:**
```json
{
"@astrojs/db": "^0.20.0",
"@astrojs/node": "^9.5.4",
"@tailwindcss/vite": "^4.2.1",
"astro": "^5.17.1",
"astro-consent": "^1.0.17",
"drizzle-orm": "^0.45.1",
"libsql": "^0.5.22",
"tailwindcss": "^4.2.1"
}
```
### **Node.js Version:** >=20.0.0 (enforced in package.json)
### **Database:** SQLite (file-based) → Can upgrade to Turso for production
---
## 🚨 Important Notes
1. **Admin Password:** Default is `changeme` - MUST change in production
2. **Client-side Auth:** Admin dashboard uses client-side password check (development)
3. **Production Recommendation:** Add server-side authentication for admin
4. **HTTPS:** Required for PDPA compliance (enabled by Easypanel)
5. **Consent Logging:** Database integration pending (localStorage only for now)
---
## 📈 Future Enhancements
- [ ] Server-side authentication for admin dashboard
- [ ] Real database integration (Turso/PostgreSQL)
- [ ] CSV export functionality for consent logs
- [ ] Email notifications for consent withdrawals
- [ ] Rate limiting on admin page
- [ ] IP whitelist for admin access
- [ ] Regular automated security audits
---
**Last Verified:** March 10, 2026
**Status:** ✅ Production-Ready
**Compliance:** ✅ PDPA-Compliant
---
*This AGENTS.md file serves as a comprehensive record for AI agents working on this project. All major changes, deployments, and configurations are documented here for continuity.*
**Status:** ✅ Production-ready, all pages redesigned, Thai errors fixed, GEO support added