# Pre-A2P launch checklist — VeronaWalk & Club Court Manager

Use this while **Twilio A2P 10DLC** is pending. Do **not** invite members to beta until the final gate is checked — unless you run an **email-only** pilot with explicit instructions.

**Recommended sign-in until A2P:** **Email link** on `/login` (magic link). Password also works if set.

---

## Gate: member beta release

Member testing (board pilot, TestFlight, “try the new system”) is OK when **all** are true:

- [ ] `emailReadyForLaunch` is true on `/api/site-status`
- [ ] Internal email-only UAT passed (see below)
- [ ] `TWILIO_A2P_APPROVED=true` in Vercel **or** test SMS delivers to a non–trial-verified US number
- [ ] Help page and login banner reviewed (`/help`, `/login`)

After A2P approval:

1. Set `TWILIO_A2P_APPROVED=true` in Vercel (Production + Preview) and redeploy  
2. Run `npm run check:pre-a2p https://www.veronawalksports.com`  
3. Send one test SMS login to a real member phone  
4. Invite 5–10 pilot members, then expand  

---

## 1. Email reliability (do now)

Email carries all sign-in and booking communication until SMS is live.

| Step | Command / action | Pass |
|------|------------------|------|
| Resend domain verified | Admin → Email → Check DNS, or Resend dashboard | `resendDomainVerified: true` on site-status |
| From address | `EMAIL_FROM=VeronaWalk Sports <noreply@veronawalksports.com>` | `emailFromAddress` shows VeronaWalk |
| Magic link | Login → Email link → roster email | Link arrives (check Spam) |
| Booking confirmation | Book a court as test member | Email + `.ics` attachment |
| Day-before reminder | Cron or wait for tomorrow’s batch | Reminder email to booker |
| Bulk email (optional) | Admin → Email → Send test to me | Formatting OK |

```bash
npm run test:auth https://www.veronawalksports.com -- --pre-a2p
npm run test-email   # if configured locally
```

---

## 2. VeronaWalk configuration (do now)

No A2P dependency — club ops on production admin:

| Item | Admin location |
|------|----------------|
| Court counts & hours per sport | Sections |
| Lead time, advance days, cancel notice | Sections |
| Court groups (skill / colors) | Court groups |
| Roster + ratings | Members → import if needed |
| Photo ID requirement | Per section if used |
| QR codes per sport | Sections |

Confirm **help page** matches your policy: `/help`

---

## 3. Internal UAT (email-only, do now)

Walk `docs/UAT-test-script.html` or `docs/FULL-TEST-PLAN.html` using **Email link** only:

- Sign in, book, cancel, invite by email (optional)
- Admin: schedule block, member add, bulk email to self
- Demo tenant smoke: `your-sports-club.clubcourtmanager.com`

```bash
npm run uat:prod
```

---

## 4. Twilio / A2P monitoring (passive)

While waiting on carriers:

| Step | Where |
|------|--------|
| Campaign status | Twilio → Regulatory Compliance → A2P 10DLC |
| Messaging Service | `TWILIO_MESSAGING_SERVICE_SID` in Vercel |
| Opt-in URLs live | `/login?tab=phone`, `/sms-opt-in`, `/privacy`, `/terms` |
| Recent delivery | `npm run check:twilio-recent` |
| **Admin → Launch tab** | Live status in the dashboard (no Terminal) |
| Full pre-A2P report | `npm run check:pre-a2p https://www.veronawalksports.com` |

Admin detail (optional token for Twilio log in Terminal):

`GET /api/site-status` → `smsDelivery`, `memberBetaReady`, `notes`

---

## 5. Engineering polish (shipped in repo)

- Web grid uses **club time** (`clubNowMinutes`), not phone timezone  
- Rules line shows **All times EDT/EST** (club timezone label)  
- Login **pre-A2P banner** when SMS not approved  
- Mobile app uses club date/time from API for grid greying  
- Mobile app: **Email link** sign-in (deep link); password also supported  

---

## 6. Club Court Manager SaaS (optional parallel)

Does not block VeronaWalk A2P gate:

- Platform email: `docs/RESEND-PLATFORM.md` (`noreply@clubcourtmanager.com`) — `npm run check:saas`
- Stripe live catalog: `docs/STRIPE-SETUP.md` — `npm run stripe:bootstrap`
- Marketing: `docs/STOREFRONT-CONTENT.md`
- **Defer** App Store / TestFlight wide beta until A2P if SMS is in your test script
- **Current decision:** TestFlight and member pilot **suspended** until A2P approved (Apple/Expo account can wait — repo is ready in `docs/TESTFLIGHT.md`)

---

## Environment: `TWILIO_A2P_APPROVED`

When Twilio shows campaign **Approved** and test texts deliver to arbitrary US mobiles:

```
TWILIO_A2P_APPROVED=true
```

Add in Vercel → **veronawalk-sports** → Production + Preview → **Redeploy**.

This flips `smsLaunchStatus` to `approved` and `memberBetaReady` to true (with email ready).

---

## Quick status commands

```bash
# Email + infra (A2P warnings OK)
npm run test:auth https://www.veronawalksports.com -- --pre-a2p

# Launch readiness summary
npm run check:pre-a2p https://www.veronawalksports.com

# Twilio message log
npm run check:twilio-recent

# Production probes
npm run uat:prod
```

---

*VeronaWalk Sports · Club Court Manager™ powered by StoufferAI*
