# AltSignal — Release Checklist

Status: **CODE FULL-STACK READY.** Below is what to flip to go live.

## 1. External accounts (15 min)

| Service | Why | Action |
|---|---|---|
| **Resend** | Magic-link & welcome emails | Sign up at resend.com → API Keys → copy `re_...` → set `RESEND_API_KEY` |
| **Telegram BotFather** | Bot identity | Open @BotFather in Telegram → `/newbot` → name `AltSignal Alerts` → username `altsignal_bot` (or whatever's free) → copy token → set `TELEGRAM_BOT_TOKEN` + `TELEGRAM_BOT_USERNAME` |
| **Polar.sh** | Subscription billing | polar.sh → Sign up → Create organization "AltSignal" → API Keys → Sandbox first, prod later → set `POLAR_ACCESS_TOKEN` |
| **Polar products** | Pricing tiers | In Polar dashboard → Products → Create:<br>• `Pro` recurring $9.99/mo → copy ID → `POLAR_PRO_PRODUCT_ID`<br>• `Plus` recurring $19.99/mo → copy ID → `POLAR_PLUS_PRODUCT_ID` |
| **Polar webhook** | Subscription sync | Polar dashboard → Webhooks → Add `https://signal.pulsaria.com/v1/billing/webhook/polar` → Events: `subscription.created`, `subscription.updated`, `subscription.canceled`, `subscription.revoked`, `subscription.active` → copy secret → `POLAR_WEBHOOK_SECRET` |

## 2. DNS (5 min)

For domain `signal.pulsaria.com` (or fallback `signal.mindie.dev`):

```
CNAME signal → <vps-hostname>     (Cloudflare proxy: gray cloud)
```

Or if `pulsaria.com` not configured yet, use `signal.mindie.dev` which already has wildcard CNAME → VPS.

Update `WEB_HOST`, `API_HOST`, `WEB_BASE_URL`, `MAIL_FROM` accordingly.

## 3. Generate secrets (1 min)

```bash
# Strong DB password
openssl rand -hex 24
# JWT secret
openssl rand -hex 32
```

Put both in `.env`.

## 4. Deploy via Dokploy (10 min)

**Option A — Git source (recommended):**
1. Push this repo to GitHub (private OK)
2. Dokploy → New Project → Compose service
3. Source: Git → connect GitHub → select repo → branch `main` → compose path `infra/docker-compose.yml`
4. Environment: paste your `.env` contents
5. Deploy

**Option B — Local docker-compose:**
1. SCP the `altsignal/` folder to VPS
2. `cd altsignal && cp .env.example .env && nano .env`
3. `docker compose -f infra/docker-compose.yml up -d --build`

## 5. Post-deploy (10 min)

```bash
# DB migrate + seed smart-money wallets (auto-runs on container start)
# Watch logs to confirm
docker compose logs -f api

# Test
curl https://signal.pulsaria.com/v1/health
# → {"ok":true,"ts":...}
```

## 6. Set Telegram bot menu commands (1 min)

In BotFather → `/setcommands` → select bot → paste:

```
start - Welcome + link account
link - Link with code: /link CODE
alerts - Show your active alerts
pause - Pause alerts info
this - Not used (TimeChat command, ignore for AltSignal)
```

## 7. Test the full flow (5 min)

1. Visit `https://signal.pulsaria.com`
2. Click "Get early access" → enter your email
3. Check email → click magic link → land in `/dashboard`
4. Click "Telegram" → "Generate link code"
5. Open `@altsignal_bot` in Telegram → it should auto-link (deep link)
6. Or send `/link <code>` manually
7. Reload dashboard → "Telegram: Linked ✓"
8. Click "Alerts" → "Add alert" → pick `Liquidation` → `minUsd=100000` → Create
9. Wait for next major BTC liquidation (usually within minutes during active hours)
10. Confirm Telegram message arrives
11. Click "Billing" → "Upgrade to Pro" → Polar checkout → complete with sandbox card
12. Confirm tier upgrades to `PRO` after webhook fires (~5 sec)

## 8. n8n marketing (optional, +30 min)

Import workflows from `/home/claude/mindie/n8n-workflows/`:
- `altsignal-twitter-autopost.json`
- `welcome-drip-email-telegram.json`

Set n8n env vars:
- `ALTSIGNAL_API_URL=https://signal.pulsaria.com`
- `NOTIFICATION_TELEGRAM_CHAT_ID=<your tg id>`

Set `N8N_WAITLIST_WEBHOOK` in AltSignal env → restart api.

## 9. Smart-money wallet curation (post-launch)

Seed has 5 placeholder addresses. Replace with real high-PnL Hyperliquid traders:
- Find via Hyperliquid leaderboard: https://hyperliquid.xyz/leaderboard
- Update `prisma/seed.ts`
- Re-run: `pnpm prisma db seed`

## 10. Cost monitoring

| Cost | Amount | When |
|---|---|---|
| VPS (existing) | ~$25/mo | already paid |
| Domain | ~$12/yr | already paid |
| Resend | Free up to 3K emails/mo | only if you exceed |
| Polar | 4% + $0.40 per transaction | only on revenue |
| **Total fixed** | **$0/mo new** | breakeven at customer #1 |

## 11. Done. Now ship the marketing.

- Twitter thread: live screenshot of an actual alert + the latency claim
- Show HN: "I'm tired of catching liquidation cascades 20 minutes late, so I built this"
- r/Hyperliquid: value-first explainer + soft mention
- Telegram crypto groups: subtle cold drops with a free trial code

Target: 5 paying customers in 2 weeks = **$50/mo MRR**. Hit it, double down on whatever channel converted.
