Web Push / PWA Deployment Checklist (MintCondition)
This checklist documents what must be done before enabling Web Push in production.
1) Safety behavior (already implemented)
If Web Push is not configured, MintCondition now safely skips push work and keeps existing email notifications unchanged.
- Missing VAPID keys: push is disabled automatically.
- Push subscription endpoints: return success/no-op when push is not configured.
- Push send failures: errors are caught and logged; they do not break request/notification flows.
2) Required platform prerequisites
- HTTPS is required for service workers and Web Push.
- Confirm production is served over HTTPS (Render custom domain/SSL is fine).
- Keep existing static asset pipeline working (
collectstaticin deploy process).
3) Environment variables for Render
Add these environment variables in Render for your web service:
WEBPUSH_VAPID_PUBLIC_KEYWEBPUSH_VAPID_PRIVATE_KEYWEBPUSH_VAPID_SUBJECT(recommended:mailto:admin@mintcondition.ai)
Notes:
- If these are not set, push notifications are skipped (safe behavior).
- Existing email notifications still send as before.
4) Generate VAPID keys
Generate one keypair and store securely (do not commit key files).
Option A (using installed py-vapid CLI):
./env/bin/vapid --gen --json
./env/bin/vapid --applicationServerKey --private-key private_key.pem
Use:
Application Server Keyvalue asWEBPUSH_VAPID_PUBLIC_KEY- private key (PEM content or configured key value) as
WEBPUSH_VAPID_PRIVATE_KEY
Option B:
npx web-push generate-vapid-keys
5) Database migration
Run migrations before release:
python manage.py migrate
This creates notifications_webpushsubscription via migration:
notifications.0003_webpushsubscription
6) Post-deploy smoke test (production)
- Log in with a real user.
- Go to Account Settings -> Notifications.
- Click "Enable Notifications" and allow browser permission.
- Trigger a known email notification flow (task update, reservation update, invoice send, etc.).
- Confirm:
- email still arrives,
- push notification appears,
- tapping push opens a relevant MintCondition page.
7) iPhone-specific note
Web Push on iPhone requires:
- Safari,
- site added to Home Screen,
- notifications granted for that web app instance.
If not installed to Home Screen, iPhone push may not appear.
8) Rollback safety
To disable push quickly without code rollback:
- remove
WEBPUSH_VAPID_PUBLIC_KEYand/orWEBPUSH_VAPID_PRIVATE_KEYfrom environment.
Result:
- push becomes a no-op,
- email notifications continue normally.