# Deployment Checklist Use this checklist to ensure a smooth deployment to production or staging. ## Pre-Deployment ### Code Quality - [ ] All tests passing (E2E_TESTING.md) - [ ] No critical bugs open - [ ] Code reviewed and approved - [ ] CHANGELOG.md updated - [ ] Version tagged in git ### Database - [ ] Migrations tested locally - [ ] Migrations run on staging - [ ] Seed data prepared (if needed) - [ ] Backup created - [ ] RLS policies verified ### Configuration - [ ] Environment variables documented - [ ] .env.production.example updated - [ ] Secrets not in repository - [ ] Docker files tested locally - [ ] Health check endpoint working ### Documentation - [ ] DEPLOYMENT.md reviewed - [ ] README.md up to date - [ ] API changes documented - [ ] Known issues documented ## Deployment ### Coolify Setup - [ ] Resource created in Coolify - [ ] Git repository connected - [ ] Branch configured (main/develop) - [ ] docker-compose.prod.yml path set - [ ] Environment variables added - [ ] Domain configured (optional) - [ ] SSL enabled ### Supabase Setup - [ ] Project created - [ ] Migrations run - [ ] RLS policies enabled - [ ] Auth providers configured - [ ] Storage buckets created - [ ] API keys copied ### Build & Deploy - [ ] Triggered deployment - [ ] Build logs checked (no errors) - [ ] Container started successfully - [ ] Health check passes ## Post-Deployment Verification ### Health Checks - [ ] `/api/health` returns 200 OK - [ ] Homepage loads - [ ] Auth works (sign up/in) - [ ] Database connection works ### PWA - [ ] Manifest loads correctly - [ ] Service worker registers - [ ] Install prompt appears - [ ] Offline mode works - [ ] Icons display correctly ### Functionality - [ ] Can create account - [ ] Can sign in - [ ] Can add inventory item - [ ] Can edit item - [ ] Can delete item - [ ] Can add tags - [ ] Can scan barcode (if implemented) ### Performance - [ ] Page load < 3s - [ ] Lighthouse score > 90 (PWA) - [ ] No console errors - [ ] No network errors ### Cross-Browser - [ ] Chrome (desktop) - [ ] Firefox (desktop) - [ ] Safari (desktop) - [ ] Chrome (mobile) - [ ] Safari (iOS) ## Monitoring ### Setup - [ ] Uptime monitoring configured - [ ] Error tracking enabled (optional) - [ ] Log aggregation set up - [ ] Alerts configured - [ ] Metrics dashboard created (optional) ### Checks - [ ] CPU usage normal - [ ] Memory usage normal - [ ] Disk space sufficient - [ ] No error spikes ## Security ### Verification - [ ] HTTPS enabled - [ ] SSL certificate valid - [ ] No credentials exposed - [ ] Firewall configured - [ ] Supabase RLS enabled - [ ] Strong admin passwords ### Compliance - [ ] Privacy policy added (if required) - [ ] Terms of service added (if required) - [ ] Cookie notice (if applicable) - [ ] GDPR compliance (if EU users) ## Communication ### Team - [ ] Deployment announced - [ ] Access details shared - [ ] Rollback plan communicated - [ ] Support plan established ### Users - [ ] Announcement prepared - [ ] Migration guide ready (if needed) - [ ] Support channels available - [ ] Feedback mechanism in place ## Backup & Recovery ### Backups - [ ] Database backup verified - [ ] Volume backup taken - [ ] Backup restore tested - [ ] Backup schedule configured ### Disaster Recovery - [ ] Rollback plan documented - [ ] Emergency contacts listed - [ ] Recovery time objective (RTO) defined - [ ] Recovery point objective (RPO) defined ## Post-Launch (24-48h) ### Monitoring - [ ] Check logs for errors - [ ] Review uptime metrics - [ ] Analyze user behavior - [ ] Check resource usage ### Optimization - [ ] Identify slow queries - [ ] Optimize heavy assets - [ ] Review caching strategy - [ ] Tune resource limits ### Feedback - [ ] Collect user feedback - [ ] Log issues found - [ ] Prioritize fixes - [ ] Plan next iteration ## Sign-Off **Deployed by:** ___________________ **Date:** ___________________ **Environment:** Production / Staging **Version:** ___________________ **Status:** ✅ Success / ⚠️ Issues / ❌ Failed **Notes:** _____________________________________________ _____________________________________________ _____________________________________________ **Next Review:** ___________________ --- ## Rollback Criteria Trigger rollback if: - [ ] Critical bug discovered - [ ] Data loss occurring - [ ] Service unavailable > 15 min - [ ] Security vulnerability found - [ ] Performance degraded > 50% **Rollback Procedure:** 1. In Coolify → Previous deployment → Redeploy 2. Or: `git revert` and redeploy 3. Notify team and users 4. Investigate root cause 5. Fix and redeploy --- **Remember:** It's better to delay than to deploy broken code. Take your time with this checklist!