# ✅ Deployment Checklist - Print This!

Use this checklist to track your deployment progress. Check off each box as you complete it.

---

## 📋 PRE-DEPLOYMENT

### Account Creation
- [ ] Created GitHub account
- [ ] Created Vercel account (linked to GitHub)
- [ ] Created Neon account
- [ ] Created AWS account
- [ ] Created Resend account
- [ ] Created Mapbox account

---

## 🗄️ DATABASE SETUP (NEON)

- [ ] Created new Neon project named "zurich-connect"
- [ ] Copied **pooled** connection string (with "pooler")
- [ ] Copied **direct** connection string (without "pooler")
- [ ] Added `&schema=public` to pooled URL
- [ ] Added `?schema=public` to direct URL
- [ ] Saved as `DATABASE_URL` (pooled)
- [ ] Saved as `DIRECT_DATABASE_URL` (direct)

---

## 📸 AWS S3 SETUP

### Create Bucket
- [ ] Created S3 bucket with unique name
- [ ] Chose region (e.g., eu-north-1)
- [ ] Unchecked "Block all public access"
- [ ] Acknowledged the warning
- [ ] Saved bucket name as `AWS_BUCKET_NAME`
- [ ] Saved region as `AWS_BUCKET_REGION`

### Configure CORS
- [ ] Opened bucket Permissions tab
- [ ] Found CORS section
- [ ] Pasted CORS configuration
- [ ] Saved CORS settings

### Create IAM User
- [ ] Created IAM user "zurich-connect-s3-user"
- [ ] Attached "AmazonS3FullAccess" policy
- [ ] Created access key
- [ ] Saved Access Key ID as `AWS_PUBLIC_ACCESS_KEY`
- [ ] Saved Secret Access Key as `AWS_SECRET_ACCESS_KEY`

---

## 📧 EMAIL SETUP (RESEND)

- [ ] Logged into Resend
- [ ] Created new API key "Zurich Connect Production"
- [ ] Copied API key immediately
- [ ] Saved as `RESEND_API_KEY`
- [ ] Saved sender email as `RESEND_FROM_EMAIL` (onboarding@resend.dev)

---

## 🗺️ MAPS SETUP (MAPBOX)

- [ ] Logged into Mapbox
- [ ] Found default public token
- [ ] Copied token
- [ ] Saved as `NEXT_PUBLIC_MAPBOX_TOKEN`

---

## 🔐 GENERATE SECRETS

- [ ] Generated random secret (openssl rand -base64 32)
- [ ] Saved as `BETTER_AUTH_SECRET`

---

## 📤 GITHUB UPLOAD

- [ ] Created new GitHub repository "zurich-connect"
- [ ] Set visibility to Private
- [ ] Extracted ZIP file
- [ ] Uploaded all files and folders
- [ ] Verified upload includes:
  - [ ] src folder
  - [ ] prisma folder
  - [ ] public folder
  - [ ] package.json
  - [ ] All config files
- [ ] Committed changes
- [ ] Did NOT upload any .env files

---

## 🚀 VERCEL DEPLOYMENT

### Import Project
- [ ] Clicked "Add New Project" in Vercel
- [ ] Found "zurich-connect" repository
- [ ] Clicked "Import"

### Add Environment Variables
- [ ] Added `DATABASE_URL`
- [ ] Added `DIRECT_DATABASE_URL`
- [ ] Added `NODE_ENV` = production
- [ ] Added `BETTER_AUTH_SECRET`
- [ ] Added `AWS_BUCKET_NAME`
- [ ] Added `AWS_BUCKET_REGION`
- [ ] Added `AWS_PUBLIC_ACCESS_KEY`
- [ ] Added `AWS_SECRET_ACCESS_KEY`
- [ ] Added `NEXT_PUBLIC_MAPBOX_TOKEN`
- [ ] Added `RESEND_API_KEY`
- [ ] Added `RESEND_FROM_EMAIL`
- [ ] Left `NEXT_PUBLIC_APP_URL` empty (for now)

### Deploy
- [ ] Clicked "Deploy" button
- [ ] Waited for build to complete (2-5 mins)
- [ ] Saw success message/confetti

### Update App URL
- [ ] Copied deployment URL
- [ ] Went to Settings → Environment Variables
- [ ] Updated `NEXT_PUBLIC_APP_URL` with deployment URL
- [ ] Saved changes
- [ ] Went to Deployments tab
- [ ] Clicked "Redeploy" on latest deployment
- [ ] Confirmed redeploy

---

## 🌱 DATABASE SEEDING

### Install Vercel CLI
- [ ] Ran: `npm install -g vercel`
- [ ] Verified installation

### Setup and Seed
- [ ] Ran: `vercel login`
- [ ] Logged in successfully
- [ ] Navigated to project folder
- [ ] Ran: `vercel link`
- [ ] Selected correct project
- [ ] Ran: `vercel env pull .env.local`
- [ ] Ran: `npx prisma migrate deploy`
- [ ] Saw migration success
- [ ] Ran: `npm run seed`
- [ ] Saw all success messages:
  - [ ] ✅ Created guide users
  - [ ] ✅ Created explorer users
  - [ ] ✅ Created comprehensive tours
  - [ ] ✅ Created tour images
  - [ ] ✅ Created bookings
  - [ ] ✅ Created reviews
  - [ ] 🎉 Seed completed successfully!

---

## ✅ TESTING

### Basic Tests
- [ ] Opened deployment URL in browser
- [ ] Homepage loads correctly
- [ ] Can see tour listings (6 tours)
- [ ] Search bar works
- [ ] Filters work
- [ ] Clicked on a tour - details page loads
- [ ] Maps display correctly on tour pages
- [ ] Tour images load

### Account Tests
- [ ] Created new account
- [ ] Received welcome email (check spam folder)
- [ ] Logged in successfully
- [ ] Logged out successfully
- [ ] Can view profile
- [ ] Avatar/profile image loads

### Advanced Tests (Optional)
- [ ] Made a test booking
- [ ] Booking appears in dashboard
- [ ] Can upload profile picture
- [ ] Switched role to Guide
- [ ] Can create a tour (as guide)
- [ ] Left a review on a tour

### Technical Tests
- [ ] Opened browser console (F12)
- [ ] No red errors in console
- [ ] Network tab shows resources loading
- [ ] No 404 errors

---

## 📊 POST-DEPLOYMENT

### Monitoring Setup
- [ ] Bookmarked Vercel dashboard
- [ ] Bookmarked Neon console
- [ ] Bookmarked AWS console
- [ ] Bookmarked Resend dashboard
- [ ] Bookmarked Mapbox account

### Security
- [ ] Saved all credentials in password manager
- [ ] Enabled 2FA on GitHub (if not already)
- [ ] Enabled 2FA on Vercel (if available)
- [ ] Enabled 2FA on AWS (recommended)
- [ ] Deleted any local .env files with credentials

### Documentation
- [ ] Saved deployment URL
- [ ] Documented any custom changes
- [ ] Noted any issues encountered
- [ ] Saved this checklist for reference

---

## 🎉 COMPLETION

- [ ] Website is live and accessible
- [ ] All features work correctly
- [ ] Database is seeded with sample data
- [ ] All credentials are safely stored
- [ ] Monitoring is set up
- [ ] Tested on mobile device
- [ ] Tested on desktop browser
- [ ] Shared URL with stakeholders

---

## 📝 NOTES

Use this space to write down important information:

**Deployment URL:**
_____________________________________________

**Date Deployed:**
_____________________________________________

**GitHub Repository:**
_____________________________________________

**Issues Encountered:**
_____________________________________________
_____________________________________________
_____________________________________________

**Custom Changes Made:**
_____________________________________________
_____________________________________________
_____________________________________________

**Next Steps:**
_____________________________________________
_____________________________________________
_____________________________________________

---

## 🆘 TROUBLESHOOTING QUICK REFERENCE

**Site won't load?**
→ Check Vercel logs, verify env variables

**Database errors?**
→ Check connection strings have `?schema=public`

**Images won't upload?**
→ Check AWS credentials, S3 CORS, public access

**Maps not showing?**
→ Verify NEXT_PUBLIC_MAPBOX_TOKEN

**Emails not sending?**
→ Check RESEND_API_KEY, verify sender email

**Build failing?**
→ Check Vercel build logs for specific errors

---

**✅ ALL DONE! Congratulations on your successful deployment! 🎉**

---

_Deployment completed by: _________________ Date: _____________
