Documentation Index
Fetch the complete documentation index at: https://docs.cubby.pro/llms.txt
Use this file to discover all available pages before exploring further.
PWA Support
Every app deployed to Cubby is automatically installable as a Progressive Web App (PWA). Users can add your app to their home screen on iOS, Android, and desktop — no App Store required.What Cubby Does Automatically
When you deploy an app, Cubby auto-generates a web app manifest at/api/manifest/<appId>. This manifest tells the browser how to install your app as a PWA.
The auto-generated manifest includes:
- App name (from your cubby.yaml)
- Display mode:
standalone(runs without browser UI) - Theme color: Deterministic color based on your app name
- Icons: Multiple sizes (72x72 through 512x512) for all devices
- Orientation: Portrait-primary
- Generates icons if your project is missing the required 192x192 and 512x512 PNG icons
- Generates manifest.json if none exists in your project
- Warns you if your layout file is missing a
<link rel="manifest">tag
icons-generated, manifest-generated, and manifest-link-injected.
Installing Your App
Once deployed, users can install your app from the browser:iOS (Safari)
- Open your app URL in Safari
- Tap the Share button (square with arrow)
- Scroll down and tap Add to Home Screen
- Tap Add
Android (Chrome)
- Open your app URL in Chrome
- Chrome may show an install banner automatically
- Or tap the three-dot menu and select Add to Home Screen
- Tap Install
Desktop (Chrome)
- Open your app URL in Chrome
- Click the install icon in the address bar (monitor with down arrow)
- Click Install
PWA install requires HTTPS, which Cubby provides automatically for all deployed apps.
Adding Offline Support
Offline support is not automatic. By default, your app requires an internet connection. To enable offline support, you need to add a service worker. Here’s a basic service worker with a cache-first strategy:Service Worker Caching Best Practices
The Problem
When your service worker opens a cache with a hardcoded name like this:The Solution
Version your cache names using a build hash or version number:How It Works
- You deploy a new version with a new
BUILD_HASH - The browser detects the service worker file has changed
- The new SW installs and opens a cache with the new name (e.g.,
my-cache-20260402a) - The activate event deletes old caches (e.g.,
my-cache-20260401a) - Users get fresh assets on next load
Example: Properly Versioned Service Worker
Cubby’s deploy verification pipeline warns you if it detects a service worker with a static cache name. Look for the
sw-cache-versioning check in your deploy report.Customizing Your PWA
To override the auto-generated manifest, include your ownmanifest.json in your project’s public/ directory. Cubby respects user-provided manifests and will not overwrite them.
Your custom manifest should include at minimum:
Related
- Deploy Verification - How Cubby validates your app
- Architecture - How apps are deployed and served
cubby deploy- Deploy your app