Files
web-camera-category/app/README.md
T

1.7 KiB

CamCat — Web Camera Category PWA

Progressive Web App สำหรับถ่ายรูป จัดหมวดใน folder และแชร์เป็น zip

Features

  • 📷 ถ่ายรูปจากกล้อง (front/back switch)
  • 📁 สร้าง/แก้ชื่อ/ลบ folder
  • 🖼️ Gallery view พร้อมเลือกหลายรูป
  • 📦 Zip รูปที่เลือกเป็น .zip
  • 📤 Share ผ่าน Web Share API (หรือ download fallback)
  • 📊 EXIF data (camera model, date, GPS, ISO, aperture)
  • 💾 Offline storage (IndexedDB + Service Worker)
  • 📱 Installable PWA (Add to Home Screen)

Install on Mobile

Option 1: Serve locally

cd app
python3 -m http.server 8080
# บนมือถือเปิด: http://<IP>:8080

Option 2: Deploy to hosting

Upload ไฟล์ใน app/ ไปยัง static host (Netlify, Vercel, GitHub Pages)

Install PWA

  1. เปิด URL ใน browser (Chrome/Safari)
  2. Menu → "Add to Home Screen" / "Install"
  3. เปิดจาก icon บน home screen เหมือน native app

Files

app/
├── index.html      # UI shell
├── app.js          # App logic (camera, folders, zip, share, EXIF)
├── sw.js           # Service Worker (offline cache)
├── manifest.json   # PWA manifest
├── icon-192.png    # App icon 192x192
└── icon-512.png    # App icon 512x512

Browser Support

  • Chrome/Edge 90+ (full)
  • Safari 15+ (camera + install)
  • Firefox 88+ (no PWA install)

Tech

  • IndexedDB — local storage for folders + images
  • MediaDevices API — camera access
  • Web Share API — native share sheet
  • JSZip — zip generation
  • Service Worker — offline support