Whisp
Documentation

Deployment Checklist - Team Features

Complete pre-deployment checklist for deploying team collaboration features to production. Follow each step carefully to ensure a smooth launch.

Pre-Deployment Requirement: Use this checklist before deploying team features to production. All items must be checked off before going live.

1. Database Setup

Migrations

  • ☐ All 14 migrations applied to production database
  • ☐ Run supabase db push to production
  • ☐ Verify tables exist: organizations, team_members, subscriptions, invitations
  • ☐ Verify view exists: annotations_with_team_info
  • ☐ Test RLS policies work correctly
  • ☐ Backup database before deployment
Verify tables exist:
sql
SELECT tablename FROM pg_tables
WHERE schemaname = 'public'
AND tablename IN ('organizations', 'team_members', 'subscriptions', 'invitations');

-- Verify view exists
SELECT viewname FROM pg_views
WHERE schemaname = 'public'
AND viewname = 'annotations_with_team_info';

2. Environment Variables

Required Variables

Critical: Ensure you're using LIVE Stripe keys, not test keys!
bash
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Stripe (PRODUCTION KEYS!)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Stripe Product IDs
STRIPE_PRICE_PRO=price_...  # Pro plan price ID
STRIPE_PRICE_TEAM=price_... # Team plan price ID

# Application
NEXT_PUBLIC_BASE_URL=https://yourdomain.com
NODE_ENV=production

Verification Checklist

  • ☐ All environment variables set
  • ☐ Using LIVE Stripe keys (not test keys)
  • ☐ Stripe webhook secret matches production webhook
  • ☐ Base URL is production domain (no localhost)
  • ☐ No test/development values

3. Stripe Configuration

Products & Prices

1

Create Pro Plan

In Stripe Dashboard, create "Pro Plan" product:
  • Recurring: Monthly
  • Price: $19.00 USD
  • Copy Price ID to STRIPE_PRICE_PRO
2

Create Team Plan

In Stripe Dashboard, create "Team Plan" product:
  • Recurring: Monthly
  • Price: $15.00 USD per seat
  • Billing scheme: Per-unit
  • Copy Price ID to STRIPE_PRICE_TEAM

Webhook Configuration

  • ☐ Created webhook endpoint: https://yourdomain.com/api/webhooks/stripe
  • ☐ Selected required events:
    • checkout.session.completed
    • customer.subscription.created/updated/deleted
    • invoice.payment_succeeded/failed
  • ☐ Copied signing secret to STRIPE_WEBHOOK_SECRET
  • ☐ Tested webhook with Stripe CLI

Customer Portal

  • ☐ Enabled Customer Portal in Stripe Dashboard
  • ☐ Configured settings:
    • Allow customers to update payment methods
    • Allow customers to view invoice history
    • Allow subscription cancellation
    • Allow subscription quantity changes

4. Application Testing

Core Flows

Authentication:

  • ☐ Sign up works
  • ☐ Sign in works
  • ☐ Password reset works
  • ☐ Session persistence works

Team Creation:

  • ☐ Can subscribe to Team plan
  • ☐ Can create organization after subscription
  • ☐ Owner is automatically added with color
  • ☐ Team dashboard loads

Member Management:

  • ☐ Can send invitation
  • ☐ Invitation email received
  • ☐ Can accept invitation
  • ☐ Member gets unique color

Billing:

  • ☐ Checkout flow completes
  • ☐ Webhook creates subscription record
  • ☐ Customer Portal link works
  • ☐ Seat changes sync from Stripe

5. Security Verification

Authentication & Authorization

  • ☐ All protected routes require authentication
  • ☐ RLS policies prevent unauthorized access
  • ☐ API endpoints validate user permissions
  • ☐ Session cookies are httpOnly and secure

Data Validation

  • ☐ Input sanitization on all forms
  • ☐ SQL injection prevention (parameterized queries)
  • ☐ XSS prevention (proper escaping)

Stripe Security

  • ☐ Webhook signature verification enabled
  • ☐ Stripe secret keys stored securely (not in code)
  • ☐ Customer Portal requires authentication

6. Monitoring & Logging

Error Tracking

  • ☐ Sentry/error tracking tool configured
  • ☐ Error boundaries in React components
  • ☐ API error logging enabled
  • ☐ Stripe webhook failures monitored

Analytics

  • ☐ Usage analytics configured
  • ☐ Conversion tracking for subscriptions
  • ☐ Team creation funnel tracking
  • ☐ Member invitation success rate

7. Rollback Plan

If Critical Issues Arise

Have a clear rollback plan in place before deploying.

Database Rollback

bash
# Revert migrations if needed
supabase db reset
supabase db push --include-migration [last-good-migration]

Application Rollback

  • ☐ Have previous working version tagged in git
  • ☐ Can deploy previous version quickly
  • ☐ Database changes are backward compatible

8. Post-Deployment Verification

Immediate Checks (Within 1 hour)

  • ☐ Visit production site, test authentication
  • ☐ Create test team
  • ☐ Send test invitation
  • ☐ Complete test purchase (refund after)
  • ☐ Verify webhook receives events
  • ☐ Check error logs for issues
  • ☐ Test extension in production

24-Hour Checks

  • ☐ Review error logs
  • ☐ Check Stripe dashboard for charges
  • ☐ Verify all webhooks processed
  • ☐ Monitor user signups
  • ☐ Check support tickets

7-Day Checks

  • ☐ Review analytics data
  • ☐ Analyze conversion funnel
  • ☐ User feedback survey
  • ☐ Performance metrics review
  • ☐ Plan next iteration
Useful Commands
bash
# Check deployment status
vercel --prod  # or your deployment command

# Check database connection
psql $DATABASE_URL -c "SELECT COUNT(*) FROM organizations;"

# Test webhook locally
stripe listen --forward-to localhost:3000/api/webhooks/stripe

# Database backup
pg_dump $DATABASE_URL > backup_$(date +%Y%m%d).sql
Sign-Off

Once all checks are complete:

  • Deployment Date: _____________
  • Deployed By: _____________
  • All checks passed: ☐ Yes ☐ No
Related Documentation
For comprehensive testing, see the Test Plan. For team management, see the Admin Guide.