docs: Update AGENTS.md with revert history
- Document current state (reverted to c6b56b9)
- Record PDPA implementation work (on backup branch)
- Add Docker configuration reference
- Include lessons learned
- Update project structure and deployment guide
This commit is contained in:
250
AGENTS.md
Normal file
250
AGENTS.md
Normal file
@@ -0,0 +1,250 @@
|
||||
# AI Agent Work Log - MoreMiniMore Website
|
||||
|
||||
**Project:** MoreMiniMore Website Redesign
|
||||
**Repository:** https://git.moreminimore.com/kunthawat/moreminimore-website.git
|
||||
**Current Commit:** c6b56b9 - Fix: Change text-xs and text-sm to text-base
|
||||
**Last Updated:** March 10, 2026
|
||||
|
||||
---
|
||||
|
||||
## 📍 Current Status
|
||||
|
||||
**Status:** ✅ **Reverted to Original Design**
|
||||
**Deployed:** Yes (Easypanel auto-deploy)
|
||||
**Branch:** main
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Recent History
|
||||
|
||||
### March 10, 2026 - REVERTED
|
||||
|
||||
**Action:** Reverted all PDPA compliance changes
|
||||
**Commit:** `c6b56b9`
|
||||
**Reason:** User requested revert to original design
|
||||
|
||||
**What Was Removed:**
|
||||
- ❌ Cookie consent system
|
||||
- ❌ Consent logging database (Astro DB)
|
||||
- ❌ Admin dashboard
|
||||
- ❌ API endpoints for consent
|
||||
- ❌ Updated Privacy Policy (PDPA version)
|
||||
- ❌ Updated Terms & Conditions (PDPA version)
|
||||
- ❌ Thai company name (มอร์มินิมอร์)
|
||||
|
||||
**What Was Restored:**
|
||||
- ✅ Blog pages (`src/pages/blog/`)
|
||||
- ✅ Blog category pages (`src/pages/category/`)
|
||||
- ✅ Original company name: "MoreminiMore"
|
||||
- ✅ Original Privacy Policy & Terms
|
||||
|
||||
**Backup Branch:** `backup-before-revert-20260310`
|
||||
|
||||
---
|
||||
|
||||
### March 9-10, 2026 - PDPA Implementation (REVERTED)
|
||||
|
||||
**Previous Work (Now on backup branch):**
|
||||
|
||||
**Features Implemented:**
|
||||
1. **Cookie Consent System**
|
||||
- Simplified Accept/Reject buttons
|
||||
- Consent logging to Astro DB
|
||||
- Umami Analytics integration (conditional loading)
|
||||
|
||||
2. **Admin Dashboard**
|
||||
- URL: `/admin/consent-logs`
|
||||
- Password: `moreminimore2026!Secure`
|
||||
- View/delete consent records
|
||||
|
||||
3. **API Endpoints**
|
||||
- `POST /api/consent` - Log consent
|
||||
- `GET /api/consent` - Retrieve records
|
||||
- `DELETE /api/consent/:sessionId` - Right to be Forgotten
|
||||
|
||||
4. **Legal Pages**
|
||||
- Privacy Policy (14-section PDPA compliance)
|
||||
- Terms & Conditions (17 sections)
|
||||
|
||||
5. **Company Name Update**
|
||||
- Changed to: "มอร์มินิมอร์" / "บริษัท มอร์มินิมอร์ จำกัด"
|
||||
|
||||
6. **Blog Removal**
|
||||
- Removed all blog content
|
||||
- Removed blog navigation
|
||||
|
||||
**Docker Configuration (Final Working Version):**
|
||||
```dockerfile
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN mkdir -p ./data && ASTRO_DB_REMOTE_URL=file:./data/consent.db npx astro build --remote
|
||||
|
||||
FROM node:20-alpine
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/db ./db
|
||||
COPY --from=builder /app/data ./data
|
||||
|
||||
RUN apk add --no-cache sqlite-libs
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV ASTRO_DB_REMOTE_URL=file:/app/data/consent.db
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=80
|
||||
ENV ADMIN_PASSWORD=moreminimore2026!Secure
|
||||
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
```
|
||||
|
||||
**Lessons Learned:**
|
||||
1. Always test build locally before deploying
|
||||
2. Use `node dist/server/entry.mjs` for production (not `astro preview`)
|
||||
3. Docker containers need `HOST=0.0.0.0` environment variable
|
||||
4. Astro DB requires `--remote` flag and data directory creation
|
||||
5. Simplified cookie consent (Accept/Reject) works better than granular options
|
||||
|
||||
**Documentation Created:**
|
||||
- `WEBSITE-CREATOR-IMPROVEMENTS.md` - Lessons for skill improvement
|
||||
- `PDPA-COMPLIANCE-SUMMARY.md` - Implementation guide (removed)
|
||||
|
||||
---
|
||||
|
||||
## 📁 Project Structure (Current)
|
||||
|
||||
```
|
||||
moreminimore-redesign/
|
||||
├── src/
|
||||
│ ├── pages/
|
||||
│ │ ├── blog/ ✅ Restored
|
||||
│ │ ├── category/ ✅ Restored
|
||||
│ │ ├── index.astro
|
||||
│ │ ├── about-us.astro
|
||||
│ │ ├── services.astro
|
||||
│ │ ├── contact-us.astro
|
||||
│ │ ├── privacy-policy.astro (original version)
|
||||
│ │ └── terms-and-conditions.astro (original version)
|
||||
│ ├── components/
|
||||
│ ├── layouts/
|
||||
│ │ └── Layout.astro
|
||||
│ └── styles/
|
||||
├── public/
|
||||
│ └── branding/
|
||||
├── Dockerfile
|
||||
├── package.json
|
||||
└── README.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Technical Stack
|
||||
|
||||
- **Framework:** Astro 5.x
|
||||
- **Styling:** Tailwind CSS 4.x
|
||||
- **Deployment:** Easypanel (auto-deploy from Gitea)
|
||||
- **Analytics:** Umami (configured but not conditional)
|
||||
- **Server:** Node.js adapter (`@astrojs/node`)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Deployment
|
||||
|
||||
### Easypanel Configuration
|
||||
|
||||
**Auto-deploy:** Enabled
|
||||
**Branch:** main
|
||||
**Port:** 80
|
||||
**Build Command:** Via Dockerfile
|
||||
|
||||
**Environment Variables:**
|
||||
```
|
||||
NODE_ENV=production
|
||||
PORT=80
|
||||
HOST=0.0.0.0
|
||||
```
|
||||
|
||||
### Git Workflow
|
||||
|
||||
```bash
|
||||
# Make changes
|
||||
git add .
|
||||
git commit -m "Description of changes"
|
||||
git push origin main
|
||||
|
||||
# Easypanel auto-deploys (~3 minutes)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📝 Available Commands
|
||||
|
||||
```bash
|
||||
# Development
|
||||
npm run dev # Start dev server (localhost:4321)
|
||||
|
||||
# Build
|
||||
npm run build # Build for production
|
||||
npm run preview # Preview build locally
|
||||
|
||||
# Docker
|
||||
docker build -t moreminimore:latest .
|
||||
docker run -p 80:80 moreminimore:latest
|
||||
|
||||
# Database (not currently in use)
|
||||
npm run db:push # Push Astro DB schema
|
||||
npm run db:seed # Seed database
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 Umami Analytics
|
||||
|
||||
**Status:** Configured but not conditional
|
||||
**Instance:** https://umami.moreminimore.com
|
||||
**Website ID:** `b2e87a6c-0b64-43c8-bb09-e406ffca0af1`
|
||||
|
||||
**To Enable Conditional Loading:**
|
||||
1. Re-implement cookie consent system
|
||||
2. Add conditional script loading in Layout.astro
|
||||
3. Log consent to database
|
||||
|
||||
---
|
||||
|
||||
## 📞 Contact & Support
|
||||
|
||||
**Company:** MoreMiniMore
|
||||
**Email:** contact@moreminimore.com
|
||||
**Phone:** 080-995-5945
|
||||
**Line:** @moreminimore
|
||||
|
||||
---
|
||||
|
||||
## 📋 TODO (Future Enhancements)
|
||||
|
||||
- [ ] Optional: Re-implement cookie consent (simpler version)
|
||||
- [ ] Optional: Add Thai company name option
|
||||
- [ ] Optional: Re-add blog content (if desired)
|
||||
- [ ] Monitor Umami Analytics
|
||||
- [ ] Update content as needed
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Resources
|
||||
|
||||
- [Gitea Repository](https://git.moreminimore.com/kunthawat/moreminimore-website.git)
|
||||
- [Easypanel Dashboard](https://easypanel.io)
|
||||
- [Astro Docs](https://docs.astro.build)
|
||||
- [Umami Docs](https://umami.is/docs)
|
||||
- [PDPC Thailand](https://www.pdpc.or.th)
|
||||
|
||||
---
|
||||
|
||||
**Last Agent Session:** March 10, 2026
|
||||
**Agent:** Sisyphus (OhMyOpenCode)
|
||||
**Status:** Reverted to original design successfully
|
||||
Reference in New Issue
Block a user