# TySchell.com — developer handoff

## What’s in the zip

Latest commit: `bb63477` (XRP favicon + this handoff). Branch: `cursor/phase1-mind-experience-a927`.

| File | Contents |
|------|----------|
| `tyschell-com-phase1-source.zip` (~24 MB) | Full Next.js project **including `.git`** |
| `tyschell-com-phase1-source-nogit.zip` (~12 MB) | Same source **without `.git`** — lighter drop for servers |
| `DEVELOPER-HANDOFF.md` | These directions (also in the zip at `tyschell.com/docs/DEVELOPER-HANDOFF.md`) |

**Excluded from both zips:** `node_modules/`, `.next/` (rebuild on the server).

## Stack

- **Next.js 16** (App Router) · **React 19** · **TypeScript** · **Tailwind 4** · **Motion**
- Node.js **20+** (LTS recommended)
- Immersive monochrome site: opening → mind hub → six interiors + site music

## Brand / SEO (live)

- **Title:** Ty Schell \| Visionary Entrepreneur, Technologist & Artist  
- **Description:** Step inside the mind of Ty Schell—a visionary entrepreneur, technologist, and artist pioneering innovation through blockchain, business, and music. Discover the vision behind the ventures, creativity, and legacy.  
- **Tagline:** Inside the Anatomy of a Visionary Mind  
- **OG image:** `/assets/ty-schell-opening-portrait.jpg`  
- **Favicon:** XRP mark (`/favicon.ico`, PNG sizes, apple-touch-icon)  
- Constants: `src/lib/brand.ts`

---

## Local verify

```bash
unzip tyschell-com-phase1-source.zip   # or the -nogit zip
cd tyschell.com
npm install
npm run build
npm run start
# → http://localhost:3000
```

Dev mode: `npm run dev`

---

## Deploy to production server

### 1. Prerequisites on the server

- Node.js **20.x or 22.x** LTS (`node -v`)
- `npm` (ships with Node)
- Reverse proxy (nginx / Caddy / Cloudflare) terminating **HTTPS** for `tyschell.com`
- Process manager: **systemd**, **PM2**, or a platform (Vercel / Railway / etc.)

### 2. Place the code

```bash
# example paths — adjust to your convention
sudo mkdir -p /var/www/tyschell.com
cd /var/www/tyschell.com
# upload + unzip the handoff zip here so the app root is:
# /var/www/tyschell.com/tyschell.com   OR move contents up one level
unzip /path/to/tyschell-com-phase1-source-nogit.zip
cd tyschell.com   # directory that contains package.json
```

### 3. Install & build

```bash
npm ci          # or: npm install
npm run build   # produces .next/
```

### 4. Run the Node server

Next.js production server listens on **port 3000** by default:

```bash
npm run start -- -H 0.0.0.0 -p 3000
```

**PM2 example:**

```bash
npm install -g pm2
pm2 start npm --name tyschell -- start -- -H 0.0.0.0 -p 3000
pm2 save
pm2 startup
```

**systemd sketch** (`/etc/systemd/system/tyschell.service`):

```ini
[Unit]
Description=TySchell.com Next.js
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/tyschell.com/tyschell.com
ExecStart=/usr/bin/npm run start -- -H 127.0.0.1 -p 3000
Restart=on-failure
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
```

### 5. Reverse proxy (nginx)

Point the public host at the Node process — **do not** expose 3000 publicly if you can avoid it:

```nginx
server {
  listen 443 ssl http2;
  server_name tyschell.com www.tyschell.com;

  # ssl_certificate / …;
  # ssl_certificate_key / …;

  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}
```

Redirect `www` → apex (or the reverse) as you prefer. Issue TLS with Certbot / Cloudflare.

### 6. DNS

- `A` / `AAAA` (or CNAME) for `tyschell.com` → your server or CDN  
- Optional: Cloudflare proxy in front for CDN + SSL

### 7. Platform alternative (Vercel)

From the app root:

```bash
npx vercel --prod
```

Set the production domain to `tyschell.com` in the Vercel dashboard. No nginx needed.

---

## Post-deploy checklist

- [ ] https://tyschell.com loads (opening → mind)
- [ ] Favicon shows XRP mark
- [ ] `/technology` … `/contact` all 200
- [ ] Site music unlocks after first click on opening
- [ ] External brand links open correctly ($WASH → https://washtoken.io)
- [ ] Contact form: expect **503 / not connected** until mail backend is wired — do **not** fake success

## Known deferred items

- **Contact API** (`POST /api/contact`) — returns `not_connected` until email/provider is configured
- Large static media under `public/assets/` (portrait, family photo, summit photo, MP3) — ensure deploy uploads include `public/`

## Rebuild after content/code changes

```bash
cd /var/www/tyschell.com/tyschell.com
git pull   # if using git zip + remote
npm ci
npm run build
pm2 restart tyschell   # or: systemctl restart tyschell
```
