WELIFE Docs Swagger Admin Web

APP_DESIGN_BUILD → WELIFE mirror report

Ngày: 2026-08-12 Tham chiếu: D:\APP_DESIGN_BUILD (HomeFix) · Target: D:\welife Domain: D-TOOLING · WP: WP-ENV-EXPO-01 (+ UX/diff docs) Ranh giới: không merge CRM/construction BE · không copy app/ HomeFix


1. Env / tooling (đã mirror)

1.1 Profiles (giống APP .env / .env.staging / .env.production)

Profile File example Start
local mobile/.env.example npm run mobile:start
LAN / Expo Go .env.local (API = LAN IP) npm run mobile:start:lan
staging mobile/.env.staging.example → .env.local npm run mobile:start:staging
production mobile/.env.production.example → .env.local npm run mobile:start:prod

Scripts mới (mirror APP start / reset:metro, an toàn hơn):

Script Vai trò
mobile/scripts/start-expo.mjs Heap 8GB · --use-system-ca · profile warn · LAN IP · không ghi đè .env
mobile/scripts/reset-metro.ps1 Clear .expo/cache · chỉ free port 8081–8083 — không taskkill node.exe toàn máy
eas.json staging Profile EAS nội bộ + EXPO_PUBLIC_ENV=staging

Root aliases: mobile:start:lan · mobile:start:staging · mobile:start:prod · mobile:reset:metro.

1.2 Khác biệt cố ý vs APP

APP_DESIGN_BUILD WELIFE
taskkill /F /IM node.exe trong reset Chỉ kill listener :8081–8083
start-dev.js mutate .env → mock :3001 Không mutate env; API Nest thật
EXPO_PUBLIC_API_BASE_URL + API_KEY EXPO_PUBLIC_API_URL (đã có /api/v1) · không public API key
Perfex / Stripe publishable Không mang sang

2. Auth / Pay UX — pattern màn hình (không merge BE)

2.1 Auth

Pattern APP WELIFE hiện có Gợi ý UX (FE only)
login-unified — tab email | phone + OTP box + 2FA LoginScreen — password | email OTP + OtpCodeInput + 2FA step Giữ shell WELIFE/JPG; không port Zalo/biometric trừ khi WP riêng
otp-verify / forgot-password / reset-password ForgotPasswordScreen · VerifyEmailScreen Đủ
login-2fa / register-2fa TwoFaSetupScreen · login step=2fa Đủ
Biometric / trusted device Chưa Optional WP-FE-AUTH-BIO-01 sau OWNER
Auth theme constants (AUTH_THEME) theme/tokens.ts Giữ tokens WELIFE

Không làm: copy features/auth APP (chỉ index.ts) hay Nest HomeFix auth.

2.2 Pay / Wallet

Pattern APP WELIFE hiện có Gợi ý UX (FE only)
checkout/payment + usePayments (Stripe-style methods) settleOrderPayment + pickPaymentProvider (MoMo/VNPay/MOCK) Giữ gateway VN; không port Stripe
payment/success (spring icon + orderId) Alert / navigate sau settle — thiếu success screen riêng Optional PaymentResultScreen (success/pending) tái dùng FNB/Grocery/QR
payment/pending paymentStatus: PENDING khi mở payUrl Cùng result screen
payment/bank-transfer Không Không cần trừ WP bank
wallet/index WalletHomeScreen + methods/history WELIFE già đủ hơn APP wallet route
Deep link return paymentDeepLink.ts Giữ; align copy “Đang chờ cổng…” như APP pending

Không làm: merge services/payments Stripe / Perfex CRM.

2.3 Flow đề xuất (khi làm WP FE sau)

Cart/Checkout → OrdersApi.pay → settleOrderPayment
  ├─ MOCK → PaymentResult (PAID)
  └─ payUrl → open browser → deep link → PaymentResult (PENDING|PAID)

3. Diff features/ ↔ mobile/src/features/

3.1 Số liệu

APP features/ WELIFE mobile/src/features/
Folders 41 36
Tên trùng 5 auth · chat · notifications · payments · profile
Chỉ APP 36 —
Chỉ WELIFE — 31

3.2 Overlap (cùng tên)

Feature APP files WELIFE files Ghi chú
auth 1 25 APP auth mỏng; logic nằm app/(auth)
chat 59 3 APP rất dày (attachments/call); WELIFE + services WS
notifications 10 2 WELIFE mỏng nhưng API wired
payments 2 3 Khác PSP (Stripe vs MoMo/VNPay)
profile 37 6 APP gộp settings/gallery; WELIFE tách settings/kyc

3.3 Chỉ APP (không port nguyên khối)

Construction / CRM / AI design: architect, construction-map, digital-twin, foreman, indoor-map, progress-report*, projects, quality-*, site-panorama, workforce, …

Realtime / media APP-only: adb-call, call, live, live-map, player, videos, voice-realtime, …

Ops APP-only: inventory, tasks, reports, communication, …

3.4 Chỉ WELIFE (đúng sản phẩm siêu ứng dụng)

rides · fnb · grocery · hotels · rentals · parking · fuel · atm · charging · pharmacy · medical · schools · wallet · places · geo · delivery · transit · bills · qr · kyc · favorites · promotions · homeservices · assistant · social · …

3.5 Map ngữ nghĩa (không đổi tên folder)

APP WELIFE gần nhất
ai-assistant assistant
home-repair / services homeservices
geo-map geo (+ places)
posts social
cart / orders trong fnb / grocery (+ Orders API)
settings profile + Account stack
workforce app driver/ (surface khác)
search home / places search (chưa folder riêng)

4. Việc đã ship trong turn này

5. Next (không auto-IMP UI)

  1. OWNER: MoMo merchant · Firebase domains (nếu bridge)
  2. Optional FE: PaymentResultScreen theo pattern APP success/pending → IMP WP-FE-PAY-RESULT-01 (2026-08-12)
  3. Không mở WP construction từ APP
  4. Soft next: OWNER MoMo merchant · Firebase Admin SA · eas login preview