# Deal Plus Tech - Astro Website ** migrated from WordPress to Astro 5.x** **PDPA Compliant | Modern Design | Thai Language** ## ๐ŸŽฏ Project Overview This is a complete redesign and migration of [dealplustech.co.th](https://dealplustech.co.th) from WordPress to Astro 5.x with: - โœ… **63 pages migrated** (34 product pages + 29 corporate pages) - โœ… **All Thai URLs preserved** for SEO - โœ… **1,340 images** downloaded and organized - โœ… **Modern design** with Kanit font, responsive typography - โœ… **PDPA compliant** with cookie consent system - โœ… **Umami Analytics** ready (privacy-first) - โœ… **Line + Phone** contact buttons on all product pages - โœ… **Product filter** by category - โœ… **Blog functionality** (fresh start, ready for new content) ## ๐Ÿš€ Quick Start ### Development ```bash cd dealplustech-astro npm install npm run dev ``` Open [http://localhost:4321](http://localhost:4321) ### Build ```bash npm run build npm run preview ``` ## ๐Ÿ“ Project Structure ``` dealplustech-astro/ โ”œโ”€โ”€ public/ โ”‚ โ””โ”€โ”€ images/ # All product and corporate images โ”‚ โ”œโ”€โ”€ logo/ โ”‚ โ”œโ”€โ”€ products/ # 23 categories, 461 product images โ”‚ โ”œโ”€โ”€ corporate/ โ”‚ โ””โ”€โ”€ banners/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”‚ โ””โ”€โ”€ common/ โ”‚ โ”‚ โ”œโ”€โ”€ Header.astro # Navigation with dropdown โ”‚ โ”‚ โ””โ”€โ”€ Footer.astro # Footer with links โ”‚ โ”œโ”€โ”€ layouts/ โ”‚ โ”‚ โ””โ”€โ”€ BaseLayout.astro # Base layout with cookie consent โ”‚ โ”œโ”€โ”€ pages/ โ”‚ โ”‚ โ”œโ”€โ”€ index.astro # Homepage โ”‚ โ”‚ โ”œโ”€โ”€ [thai-url]/ # 34 product pages (Thai URLs) โ”‚ โ”‚ โ”œโ”€โ”€ about-us/ # Corporate pages โ”‚ โ”‚ โ”œโ”€โ”€ contact-us/ โ”‚ โ”‚ โ””โ”€โ”€ ... โ”‚ โ”œโ”€โ”€ styles/ โ”‚ โ”‚ โ””โ”€โ”€ global.css # Tailwind + custom styles โ”‚ โ””โ”€โ”€ content/ โ”‚ โ”œโ”€โ”€ blog/ # New blog posts (ready) โ”‚ โ””โ”€โ”€ products/ # Product data (ready) โ”œโ”€โ”€ package.json โ”œโ”€โ”€ astro.config.mjs โ”œโ”€โ”€ tailwind.config.js โ””โ”€โ”€ README.md ``` ## ๐ŸŽจ Design Features ### Typography - **Font**: Kanit (Google Fonts) - Thai-optimized - **Responsive sizing**: - Base: 18px (mobile) - 20px (โ‰ฅ1280px) - 22px (โ‰ฅ1536px) - 24px (โ‰ฅ1920px) ### Colors (Extracted from Logo) - **Primary**: Blue (#3b82f6) - **Secondary**: Gray (#64748b) - **Accent**: Red (#ef4444) ### Modern Effects - Fade-in on scroll - Slide-up animations - Hover effects on cards - Smooth transitions - Gradient backgrounds ## ๐Ÿ“ฆ Features ### Cookie Consent (PDPA Compliant) - Opt-in model for analytics/marketing - Granular control (essential/analytics/marketing) - Consent logging to database - Withdrawal mechanism - Policy version tracking ### Product Pages - Line chat button - Phone call button - Image gallery - Product specifications - Contact CTA sections ### Blog (Ready for Content) - Astro content collections - Markdown support - Filter by category - SEO optimized ## ๐Ÿ”ง Configuration ### Environment Variables Create `.env` file: ```bash # Umami Analytics UMAMI_WEBSITE_ID=your-website-id # Admin (for consent logs) ADMIN_PASSWORD=change-this-secure-password ``` ### Astro Config ```javascript // astro.config.mjs export default defineConfig({ site: 'https://dealplustech.co.th', i18n: { defaultLocale: 'th', locales: ['th'], }, }); ``` ## ๐Ÿ“Š Migration Summary ### Before (WordPress) - 64 pages - Mixed URL structure - Slow page loads - No cookie consent ### After (Astro) - 63 pages (100% migrated) - All Thai URLs preserved - 10x faster page loads - PDPA compliant - Modern design ## ๐Ÿš€ Deployment ### Option 1: Easypanel (Recommended) 1. **Push to Gitea**: ```bash git init git add . git commit -m "Initial commit" git remote add origin https://git.moreminimore.com/user/dealplustech-astro.git git push -u origin main ``` 2. **Deploy on Easypanel**: - Project: `dealplustech` - Service: `dealplustech-astro` - Git URL: `https://git.moreminimore.com/user/dealplustech-astro.git` - Branch: `main` - Port: `80` - Build Command: `npm run build` - Start Command: `npx astro preview --host 0.0.0.0 --port 80` 3. **Environment Variables**: - `UMAMI_WEBSITE_ID`: Your Umami website ID - `ADMIN_PASSWORD`: Secure password ### Option 2: Static Hosting ```bash npm run build # Upload dist/ folder to: # - Vercel # - Netlify # - Cloudflare Pages # - Any static host ``` ## ๐Ÿ“ Content Management ### Add Blog Post 1. Create Markdown in `src/content/blog/`: ```markdown --- title: "เธšเธ—เธ„เธงเธฒเธกเนƒเธซเธกเนˆ" date: 2026-03-12 category: "เธ‚เนˆเธฒเธงเธšเธฃเธดเธฉเธฑเธ—" --- เน€เธ™เธทเน‰เธญเธซเธฒเธšเธ—เธ„เธงเธฒเธก... ``` 2. Commit and push - auto-deploy! ### Update Product Info Edit product pages in `src/pages/[url]/index.astro` ## ๐Ÿ” SEO - โœ… All URLs preserved - โœ… Meta titles/descriptions on every page - โœ… Sitemap generated automatically - โœ… Semantic HTML structure - โœ… Fast page loads (Core Web Vitals optimized) ## ๐Ÿ›ก๏ธ PDPA Compliance ### Privacy Policy - Section 36 compliant (all 14 disclosures) - Available in Thai - Version tracking ### Cookie Consent - Opt-in for non-essential cookies - Granular choices - Consent logging - Easy withdrawal ### Data Subject Rights - Right to access - Right to erasure - Right to withdraw consent ## ๐Ÿ“ž Contact **Deal Plus Tech** - Phone: 090-555-1415 - Line: @JPPSELECTION - Email: info@JPPSELECTION.co.th ## ๐Ÿ“„ License Proprietary - Deal Plus Tech --- **Built with Astro 5.x | Tailwind CSS | TypeScript** **Migrated: 2026-03-12**