Cross-cutting — Infra, Ops, Manual Tasks (~7 sessions, ~2 days)

Items that span phases or are manual user tasks. Not blocked by single phase but typically run in parallel with Phase 0-1.


Tracking matrix

IDTitleTrackJiraCCRiskOwnerStatus
X.I-1Create LIFF apps in LINE Console (3 per env)In/amanualLr_gotoBacklog
X.I-2Cloudflare/nginx routing for LIFF endpointsIINFRA-?1MJulianBacklog
X.I-3Staging Pasukuru tenant + Curva LineAccount setupIINFRA-?1LJulianBacklog
X.I-4BullMQ Board exposed for webhook DLQ monitoringIPASS-?0.5LJulianBacklog
X.I-5Cron for failed-webhook alert (Slack/email if DLQ > 10)IPASS-?0.5LJulianBacklog
X.T-1Joint smoke test script (automated)Tboth1LJulianBacklog
X.T-2Load test: 1000 concurrent LIFF identifiesTPASS-?1MJulianBacklog
X.D-1Document admin training (1-page)In/a0.5LJulianBacklog

Total: 5.5 CC sessions + 1 manual.


X.I-1 — LIFF apps creation (MANUAL)

Owner: r_goto (LINE Developer Console access)

Required apps (per env staging + prod = 6 total):

For each env:

  1. Pasukuru Shop — endpoint URL https://shop.passkuru.com/liff/shop (or per 1.D-1 final choice)
  2. Pasukuru Carthttps://shop.passkuru.com/liff/cart
  3. Pasukuru Accounthttps://shop.passkuru.com/liff/account

Each LIFF app needs:

  • Size: Full
  • Scopes: profile openid email (email if enabled)
  • Endpoint URL: HTTPS only
  • LINE Login channel: existing or new

Output: 6 LIFF IDs to drop into env vars.


X.I-2 — Nginx/Cloudflare routing

Goal: Route LIFF endpoint URLs to Pasukuru FE on VPS (Next.js, port 3200 currently).

Files to update:

  • /etc/nginx/sites-available/passkuru.cocon-lab.com (or new shop.passkuru.com)
  • Cloudflare DNS for shop.passkuru.com
  • Cloudflare TLS via DNS-01

Rules:

  • /liff/shop → Next.js
  • /liff/cart → Next.js
  • /liff/account → Next.js
  • Set-Cookie SameSite=None; Secure headers passed through

Acceptance:

  • HTTPS green via Let’s Encrypt (DNS-01)
  • LINE Console URL verification passes for each LIFF endpoint
  • No mixed-content warnings

X.I-3 — Staging tenants

Setup:

  • Pasukuru staging tenant (admin account, domain shop-staging.passkuru.com)
  • Curva staging LineAccount linked via existing handshake
  • Test products (3-5)
  • Test member with line_user_id from a real LINE dev account

Document credentials in 1Password / vault (NOT in git).


X.I-4 — Webhook DLQ monitoring

Goal: See failed webhooks in real time.

Steps:

  1. Add bull-board package to Pasukuru BE
  2. Mount at /admin/queues behind admin JWT
  3. Document URL + access in vault

X.I-5 — Failure alerting

Goal: If curva-webhook DLQ > 10 jobs OR Curva inbound 5xx rate > 5% in 5min → alert.

Implementation:

  • Cron task on Pasukuru BE checks queue depth every 5 min
  • If threshold breached → POST to Slack webhook OR send email via existing Mailer
  • Coordinated alert key (don’t spam every 5 min)

X.T-1 — Joint smoke test script

Goal: Automatable end-to-end test runnable against staging.

Script (Node.js, run from VPS):

  1. Curva: Create test order via test endpoint (helper)
  2. Pasukuru: Mark paid via test helper
  3. Wait 10s
  4. Assert: Curva log table has webhook entry
  5. Assert: Pasukuru DLQ size unchanged
  6. Assert: Member.line_user_id exists for test user
  7. Assert: Curva LineFollower has pasukuru_member_id (Phase 3+)
  8. Output: green/red summary

Run: pnpm smoke:integration:staging — exit code 0 = pass.


X.T-2 — Load test

Tool: k6 or autocannon Scenarios:

  • 1000 concurrent POST /integration/line/identify (simulating mass LIFF entry)
  • 100 concurrent webhook deliveries Curva-side
  • Sustained 10 RPS for 10 min

Acceptance:

  • p95 latency < 500ms identify
  • p95 latency < 200ms webhook receive
  • 0% 5xx
  • DB connection pool not exhausted

X.D-1 — Admin training doc

Goal: 1-page guide for Curva admin to use new features.

Sections:

  1. Connect Pasukuru shop (existing handshake)
  2. Auto-register LIFF apps (1.C-12 button)
  3. Build Flex Msg with Pasukuru products (2.C-5)
  4. Add Pasukuru shop button to RichMenu (2.C-6)
  5. Use Abandoned Cart Scenario template (2.C-8)
  6. Get receipts in chat automatically (works once 2.C-7 deployed)

Format: Markdown in vault pages/concepts/curva-pasukuru-admin-guide.md. Optionally screenshot when UI ready.


Cross-cutting exit checklist

  • All 6 LIFF apps registered (3 staging + 3 prod)
  • DNS + nginx + TLS green for shop.passkuru.com
  • Staging environment fully wired
  • BullMQ board accessible
  • Alerts configured + tested
  • Smoke test script in repo + scheduled (cron or CI)
  • Load test results documented
  • Admin training doc in vault