Skip to content

feat(ops): live payments readiness, Meta WhatsApp auth & automated community onboarding - #49

Open
Satelink-Protocol wants to merge 2 commits into
mainfrom
feature/live-payments-meta-whatsapp-community-onboarding
Open

Satelink-Protocol wants to merge 2 commits into
mainfrom
feature/live-payments-meta-whatsapp-community-onboarding

Conversation

@Satelink-Protocol

Copy link
Copy Markdown
Contributor

Summary

This PR implements production-readiness improvements for NIGHTLIFEZ across all four required operational workstreams:

  1. UPI Payment Readiness & Reconciliation Visibility:

    • Added GET /api/admin/payments and GET /api/admin/payments/:id/audit providing financial ledger transparency, status filters, and paise aggregations.
    • Retained strict zero-trust invariants: live payments (ENABLE_LIVE_PAYMENTS=false) and UPI checkout (UPI_CHECKOUT_ENABLED=false) remain safely locked in production until merchant credentials and provider contracts are approved.
  2. Meta WhatsApp Cloud API Authentication:

    • Audited production environment: verified that missing Meta credentials fail closed with 503 guidance to Telegram authentication.
    • Preserved OTP rate limiting, cooldowns, hash salting, and account conflict protection.
  3. Automated Community Onboarding:

    • Added migration migrations/025_community_onboarding.sql (user_onboarding table).
    • Implemented lib/services/community-onboarding.js supporting Telegram numeric ID storage, welcome message delivery via @Nightlifez_bot only upon authorization, official community link dispatch, and WhatsApp channel follow tracking without false claims of membership.
    • Added attendee endpoints (GET /api/me/onboarding, POST /api/onboarding/track) and admin inspection (GET /api/admin/onboarding) with strict PII masking.
  4. Production Quality Assurance:

    • Added test/community-onboarding.test.js (6/6 tests passing).
    • Added test/production-quality-assurance.test.js verifying all 13 real-user journeys from Telegram/WhatsApp signup, multi-session switching, account linking, free booking, paid UPI checkout/webhook, duplicate protection, expiry, admin refund, to admin audit inspection (13/13 tests passing).
    • Fixed migration sequential count in test/migrations.test.js (23/23 migrations passing).
    • Ran 200/200 file lint check cleanly.

…13-journey QA suite

- Add migration 025_community_onboarding.sql with user_onboarding table
- Implement lib/services/community-onboarding.js with idempotent Telegram numeric ID binding and WhatsApp channel follow tracking
- Expose attendee /api/me/onboarding, /api/onboarding/track, and admin /api/admin/onboarding endpoints with PII masking
- Add /api/admin/payments and /api/admin/payments/:id/audit endpoints for financial reconciliation visibility
- Add test suites test/community-onboarding.test.js and test/production-quality-assurance.test.js covering all 13 real-user journeys
- Retain fail-closed live payment and WhatsApp flags until verified production credentials are provided
@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
strangersmeetup Ready Ready Preview Nov 15, 2026 2:34pm UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant