Khách hàng deploy app web → tự động có "Install-able" PWA. Người dùng cuối click 1 nút "Install" trên Chrome/Edge/Safari = app icon trên màn hình desktop / mobile, chạy như native app.
| Use case | Recommend |
|---|---|
| Web app cần "icon trên desktop / mobile" | ✅ PWA (Zeni Templates) |
| Offline-capable web app | ✅ PWA (auto-cache + offline.html) |
| App cần file system access đầy đủ (đọc/ghi mọi nơi) | ❌ Tauri / Electron (dùng Zeni Build Farm) |
| App cần native API (Bluetooth, USB, NFC) | ❌ Tauri / Electron |
| Mobile app App Store / Play Store | ❌ Flutter / React Native (dùng Zeni Build Farm) |
framework: nextjs-pwa
detect_files: next.config.js / next.config.mjs / next.config.ts
auto-inject: next-pwa plugin + manifest.webmanifest + sw.js + offline.html
default_port: 3000
framework: vite-pwa
detect_files: vite.config.js / vite.config.ts
auto-inject: vite-plugin-pwa + workbox + manifest.webmanifest + sw.js
default_port: 80 (nginx serve build)
cd my-nextjs-app
npm install -g @zenicloud/cli
zeni init # auto-detect Next.js PWA
zeni deploy
curl -X POST https://zenicloud.io/api/v1/deploy/quick?ws=myws \
-H "Authorization: Bearer $ZENI_TOKEN" \
-d '{"zip_base64":"...","name":"my-pwa","framework":"nextjs-pwa","port":3000}'
Zeni Cloud auto-inject PWA assets nếu:
nextjs-pwa hoặc vite-pwazeni init tự detect (nếu package.json có next-pwa / vite-plugin-pwa)| File | Chức năng |
|---|---|
public/manifest.webmanifest | Tên app, icon, theme color, display=standalone |
public/sw.js | Service worker — cache offline + runtime cache |
public/offline.html | Trang fallback khi mất kết nối |
public/zeni-pwa-register.js | Auto-register service worker |
Zeni Cloud · zenicloud.io · 100% Google Cloud Platform