diff --git a/docs/superpowers/specs/2026-05-03-whatsapp-bot-design.md b/docs/superpowers/specs/2026-05-03-whatsapp-bot-design.md index d438ba7..c4d8efe 100644 --- a/docs/superpowers/specs/2026-05-03-whatsapp-bot-design.md +++ b/docs/superpowers/specs/2026-05-03-whatsapp-bot-design.md @@ -47,7 +47,7 @@ Two app containers + one external dependency. Communication between apps goes th │ └───────────┬───────────┘ │ │ │ │ │ ▼ │ -│ aaPanel reverse proxy ─► bot.04080616.xyz │ +│ aaPanel reverse proxy ─► wabot.04080616.xyz │ │ │ └─────────────────────────────────────────────────────────────────────┘ │ │ @@ -129,7 +129,7 @@ cm_whatsapp_bot_v1/ | Postgres role | dev role with limited grants | prod role | | Telegram bot | separate dev bot (`@..._dev_bot`) — operator's QR codes never go to prod chat | production bot | | WhatsApp accounts | mock/test phone | operator's real 10+ accounts | -| Web URL | `http://localhost:3000` | `https://bot.04080616.xyz` (subdomain to be confirmed) | +| Web URL | `http://localhost:3000` | `https://wabot.04080616.xyz` | | Hot reload | yes (Next.js HMR + tsx watch) | no | | Volumes | `./dev-data/{media,sessions}` bind mounts | named volumes | @@ -152,7 +152,7 @@ scripts/publish.sh v1.0.0 ───► gitea.04080616.xyz/ IMAGE_TAG=v1.0.0 pulls images, runs containers aaPanel proxy → - bot.04080616.xyz → web:3000 + wabot.04080616.xyz → web:3000 ``` Image tags: @@ -176,7 +176,7 @@ id uuid pk telegram_user_id bigint unique — primary identity (whitelist key) display_name text role text — 'admin' (only role for v1) -default_timezone text — IANA, e.g. 'Asia/Kuala_Lumpur' +default_timezone text — IANA, default 'Asia/Kuala_Lumpur' created_at timestamptz whatsapp_accounts — each WA account the operator manages @@ -422,12 +422,15 @@ All scripts live in `scripts/`. Patterned on `cm_bot_v2`. | `link-account.sh` | CLI helper to start a WA pairing flow without going through Telegram. Emits QR straight to the terminal. Useful for the dev mock account. | | `local_build.sh` | One-liner foreground compose up. Convenience. | -## 15. Open questions for implementation phase +## 15. Confirmed values & remaining pre-deploy checks -- Confirm subdomain choice: `bot.04080616.xyz` vs `whatsapp.04080616.xyz` vs other. -- Confirm Postgres connectivity from Docker bridge (`172.16.0.0/12`) is allowed in the existing `pg_hba.conf` on `192.168.0.210`. If not, add the entry before first deploy. -- Confirm operator's IANA timezone for `default_timezone` seed value. -- Decide media retention default (proposing 90 days; sweeper job runs daily). -- Decide whether to enforce a minimum interval between recurring fires (proposing 5 minutes). +Confirmed during brainstorming: -These don't block design approval — they're settled during the writing-plans phase or first implementation step. +- **Web URL:** `https://wabot.04080616.xyz`. +- **Default timezone:** `Asia/Kuala_Lumpur` (seeded into `operators.default_timezone`). +- **Media retention:** 90 days. Sweeper job runs daily, deletes media not referenced by any reminder older than retention. +- **Minimum interval between recurring fires:** 5 minutes (enforced at the schedule-validation layer to prevent runaway loops). + +Pre-deploy check (not blocking design; verified during first implementation step): + +- **Postgres connectivity:** confirm `pg_hba.conf` on `192.168.0.210` allows the Docker bridge subnet (`172.16.0.0/12`) and `listen_addresses` covers the LAN interface. Add the entry before first deploy if missing.