← back to Nineoh Guide

DEPLOY.md

65 lines

# Deploy runbook — Unofficial 90210 Guide

Everything here is **gated** (your accounts / 2FA / spend). I've prepped each track
so your part is just the interactive steps. Green-lit 2026-07-25.

---

## Track A — Web live on Vercel + Neon

**You do (accounts):**
1. Create a **Neon** project → copy the pooled connection string.
2. Populate it (one command, from the repo):
   ```bash
   DATABASE_URL="postgres://…neon-pooled…" bash db/setup-prod.sh
   ```
   (schema → episodes → cast → bios → recaps → cast photos → Beverly Hills photos → news)
3. **Vercel** → New Project → import this repo → set **Root Directory = `apps/web`**
   (Next.js auto-detected). Add env vars:
   - `DATABASE_URL` = the Neon string
   - `NEXT_PUBLIC_SITE_URL` = your chosen public URL (e.g. https://yourdomain.com)
   - `NEXT_PUBLIC_DMCA_EMAIL`, `NEXT_PUBLIC_PRIVACY_EMAIL` = real inboxes
4. Deploy. Verify `/`, `/episodes`, `/cast`, `/news`, `/sitemap.xml`.
5. Submit the sitemap in Google Search Console.

**I've prepped:** `db/setup-prod.sh` (idempotent populator), all ingest scripts read
`DATABASE_URL`, SITE_URL/emails are env-driven, sitemap+robots+JSON-LD ready.

---

## Track B — iOS on TestFlight (Expo EAS)

**You do (Apple + Expo login):**
```bash
cd apps/mobile
eas login                      # your Expo account
eas init                       # writes real extra.eas.projectId into app.json
# set the API base to your Vercel URL for the build:
eas env:create --name EXPO_PUBLIC_API_BASE --value "https://yourdomain.com" --environment production
eas build -p ios --profile preview   # prompts for Apple login + 2FA (only you can)
```
Then in **App Store Connect**: create the app record for bundle id
`com.abrams.nineohguide` (change first if you prefer), add yourself as an internal
TestFlight tester once the build uploads (~1 day Apple review).

**I've prepped:** `apps/mobile/app.json` + `eas.json` (dev/preview/production profiles),
App.tsx reads `EXPO_PUBLIC_API_BASE` first, watchlist + spoiler guard + easter eggs.

**Do NOT** run `eas submit` (public App Store) until the content review below is done.

---

## Track C — Human content review (do before public)

The 114 recaps + 14 bios are AI-drafts (`*_status = 'ai-draft'`). Review workflow:
```bash
node db/review.mjs status            # see what's ai-draft vs reviewed
node db/review.mjs read 1            # read Season 1 recaps to check them
node db/review.mjs ok-recaps 1       # mark Season 1 recaps reviewed
node db/review.mjs ok-bios           # mark bios reviewed
```
Edit any recap in `db/recaps/s<N>.json` (or a bio in `db/bios.json`) and re-run
`node db/apply-recaps.mjs <N>` / `node db/apply-bios.mjs` to update.

Keep all photo attribution captions displayed — CC-BY-SA requires it.