● กำลังพัฒนา
Product Catalog Validator
TypeScript CLI สำหรับ validate product catalog ก่อน import — ตรวจ required fields, format ราคา, รูปภาพ URL และ category hierarchy
สารบัญ
ภาพรวม
งาน e-commerce ที่ทำอยู่ต้องจัดการ product catalog CSV ขนาดใหญ่บ่อยครั้ง ปัญหาคือข้อมูลเสียมักเจอหลัง import แล้ว ทำให้ต้องแก้ในระบบหรือ rollback ทั้ง batch โปรเจกต์นี้ validate ข้อมูลก่อน import เพื่อให้แก้ปัญหาได้ตั้งแต่ไฟล์ต้นทาง
สิ่งที่ทำแล้ว
- Required fields check — ตรวจ title, SKU, price, category ว่าครบและไม่ว่าง
- Price validation — ตรวจ format (ตัวเลขเท่านั้น), ราคา > 0, sale price < regular price
- Image URL validation — ตรวจ URL format, ตรวจว่า extension เป็น jpg/png/webp
- Category hierarchy — map category string กับ allowed categories list ที่ config ไว้
- Duplicate SKU detection — หา SKU ซ้ำภายใน batch และเทียบกับ existing catalog
- Error report — output เป็น JSON + Markdown table พร้อม row number และ field ที่ผิด
กำลังทำ
- Schema config แบบ JSON — ให้ผู้ใช้กำหนด required fields และ validation rules เอง
- Batch fix mode — auto-fix ปัญหาที่ fix ได้อัตโนมัติ (trim whitespace, format ราคา)
- Integration กับ Google Sheets API — pull catalog โดยตรงแทน export CSV
เทคโนโลยี
- TypeScript + Node.js 22
csv-parseสำหรับ parse CSVzodสำหรับ schema validationcommanderสำหรับ CLI flagschalk+oraสำหรับ UX ใน terminal