Product Scope & Requirements
Production Core Validated
ตกผลึกและ owner-test flow คนไข้/คลินิกแล้ว รวม pediatric/pregnancy routing, emergency hospital escalation, clinic opening gate, booking confirmation, proximity check-in, fair queue, profile approval และ billing; AI/clinical routing ยังปรับต่อจาก feedback ของหมอป๋อม
Planning
Architecture & Platform Strategy
Selected Baseline
เลือก SwiftUI iOS-first, Supabase Managed PostgreSQL Singapore + Auth/Storage/Realtime เป็น production core, Firebase Functions เป็น AI Gateway/automation/monitoring และ Firebase Crashlytics สำหรับ iOS โดยตั้งใจแยกหน้าที่ ไม่ใช่การย้ายฐานข้อมูลกลับ Firebase
Planning
Clinic Web App UI Stack
Production Deployed
Clinic Web App ใช้ Vite + React 19 + TypeScript + Tailwind CSS + Framer Motion และออกแบบ desktop-first สำหรับงานประจำวันของคลินิก พร้อม responsive fallback; deploy แยกที่ Cloudflare Pages project cliq-clinic / clinic.cliq.care และไม่ได้กำหนด installable/offline PWA เป็น requirement
Decision
Mobile UI/UX Direction
Implemented Baseline
ใช้ iOS-first, SwiftUI codebase เดียวแต่แยก account track ผู้ป่วย/คลินิก, borderless elevated cards, Liquid Glass capsule headers และ localized Thai/English components เป็น baseline แล้ว
Design Direction
Native App Stack
Selected
เลือก SwiftUI สำหรับสร้าง iOS App ก่อน ใช้ native iOS controls และเพิ่ม Liquid Glass แบบ progressive enhancement บนระบบที่รองรับ แล้วใช้เป็น functional/design reference สำหรับ Desktop-first Clinic Web App และ Android ทั้งสอง track โดย Web App ต้องปรับ interaction ให้เหมาะกับ desktop operations
Decision
iOS App Build Decisions
Owner Tested
SwiftUI, iOS/iPadOS 17, localization, app identity, repository boundary, navigation และ Patient + Clinic Staff vertical slice ผ่าน owner testing แล้ว รวม fresh LINE consent/profile/relaunch, email isolation, account deletion/re-registration, Push open/deep-link, doctor-assigned booking/queue, profile editing และไทย/อังกฤษบนอุปกรณ์จริง เจ้าของส่ง App Store Connect และ Google Play แล้ว ทั้งสองอยู่ In Review; ขั้นถัดไปคือผลตรวจและ controlled rollout
Build Gate
iOS Release Readiness
Owner-tested baseline • Final binary pending
P0/P1 release baseline ผ่าน owner testing แล้ว รวม DB-first booking/queue, email/LINE Auth isolation, mandatory patient profile, account deletion/re-registration, Push deep-link, clinic verification, profile-change approval, doctor evidence, billing, Crashlytics, localization/accessibility และ privacy manifest; เจ้าของส่ง Store แล้ว ทั้งสองอยู่ In Review ตามยืนยันวันที่ 1 ต.ค. 2026
Release Gate
Production Readiness
In Review
Production Supabase, migrations through 202609200001, email/LINE Auth separation, SMTP, platform admin, Admin PWA, restore drill, booking/queue, clinic review, verification/profile approval, doctor evidence, billing automation/payment review, Crashlytics, server monitoring, backup/incident/legal/clinical runbooks และ focused owner device smoke พร้อมแล้ว; ส่ง App Store Connect และ Google Play แล้ว ทั้งสองอยู่ In Review; รอผลตรวจและควบคุม launch จริง
Production Gate
Patient Platforms
Native Apps Only
กำหนด scope เป็น iOS และ Android App เท่านั้น ยกเลิก Patient PWA, LIFF และ LINE OA โดยคง Patient LINE Login ที่ใช้งานจริงไว้
Scope Decision
Desktop-first Clinic Web App
Production Shell Verified
เปิดใช้งานที่ clinic.cliq.care แยกใน project cliq-clinic แล้ว ใช้ production Supabase/Auth/RPC ชุดเดียวกับ iOS มี browser/Home Screen/Android manifest icons และ navigation หลักครบ 5 หน้า; ข้อมูลอัปเดตแบบ Realtime-triggered authoritative refresh พร้อม polling สำรองทุก 15 วินาทีและ refresh เมื่อกลับเข้า tab/focus/online เพื่อให้พฤติกรรมเทียบ iOS โดยขั้นถัดไปคือ full owner/role action smoke
Production Web
Cliq Team PWA
Ops + Billing Console
Admin PWA ที่ admin.cliq.care มี overview, clinic verification, profile-change review, logo/building/doctor/evidence preview, monitoring links, backend-driven billing พร้อม invoice/slip/payment confirmation และ Notification delivery dashboard ใช้งานจริง ส่วน general support, queue operations, review moderation, email delivery และ audit center ยังเป็น shell
Product Build
Native Mobile Apps
iOS Live • Android UAT Closed
iOS SwiftUI เป็น product/visual reference และ locked/read-only; Android Kotlin + Jetpack Compose ใช้ production contract เดียวกัน มี functional UAT baseline และงานแก้ visual/consent/permissions ในเดือนกันยายน ตอนนี้ package com.twofamus.cliq, source 1.0.0 (3) และมี signed AAB evidence หลัง package migration แล้ว ส่ง Google Play แล้วและอยู่ In Review; รอผลตรวจและเตรียม controlled rollout ส่วน recovery callback มีใน iOS source ปัจจุบัน ต้องตรวจ end-to-end บน release binary ของทั้งสองแพลตฟอร์ม
Product Build
Backend / API
iOS Connected • Production
iOS เชื่อม Supabase production ผ่าน repository/gateway สำหรับ Auth, snapshot, profile/media/schedule, verification/profile approval, doctor evidence, booking, proximity check-in, arrival, queue, walk-in/no-show, staff team, triage และ billing; Realtime มี schema/publication baseline ส่วน client ใช้ controlled refresh ในหลายหน้าจอ และ automated server monitoring ทำงานทุกห้านาทีแล้ว
Core Platform
Database / Storage
Source of Truth • Production
Production migrations ครอบคลุม identity/clinic/doctor schedule, booking/check-in/queue, verification, profile-change approval, doctor evidence, reviews, staff team, notification, consent/triage, backend-driven billing, monthly invoice, payment slip, observability events, RLS, Realtime, Storage, retention/legal hold และ LINE/email identity separation โดย runtime หลักใช้ PostgreSQL เป็น source of truth; migration ล่าสุดคือ 202609200001
Core Platform
Authentication & Roles
Foundation Implemented
Supabase Email/Password Auth, email confirmation, password recovery และ patient-only LINE Login เชื่อมกับ iOS แล้ว บัญชี LINE กับอีเมลแยก Auth identity กันอย่างเด็ดขาด ปิด Manual Linking, ไม่ขอ LINE email และบังคับกรอกชื่อ/เบอร์ผ่าน verified patient RPC; Resend/Supabase SMTP บน auth.cliq.care, track enrollment ผู้ป่วย/คลินิก, clinic membership แบบเจ้าของหนึ่งคนและพนักงาน, staff invitation และ RLS tenant boundary ใช้งานจริง โดยไม่มีบทบาทผู้ดูแลหรือการสืบทอดเจ้าของอัตโนมัติ
Security
AI Triage
Production-connected Validation
Hybrid Rule-based + GPT-5.4 mini ทำงานผ่าน production AI Gateway, prompt v0.15, red-flag override, de-identification, structured output, semantic teaching-example retrieval และ official specialty mapping; iOS เรียกใช้งานจริงได้ แต่ clinical review/false-negative validation ของหมอป๋อมยังดำเนินต่อ
Clinical & AI
Clinical Validation & QA
In Progress
กำลังทดสอบ AI triage แบบ batch ด้วยเคสจำลอง สร้าง Clinical Review PDF และนำ feedback ของหมอป๋อมกลับมาปรับ priority ของคลินิก สาขา และอนุสาขา
Clinical & AI
Patient LINE Login
Production
Patient LINE Login ใช้งานจริงผ่าน production Supabase custom OAuth2 provider และ LINE channel ที่ Published แล้ว โดยใช้เฉพาะ openid/profile, แยกจากบัญชีอีเมลและผ่าน owner real-device lifecycle smoke; LINE OA, LIFF และ Patient PWA ถูกตัดออกจาก product scope
Integration
Notification
Soft-launch baseline
in-app activity, account email และ APNs/FCM production delivery ใช้งานแล้ว พร้อม track separation, production read state, privacy-safe payload, per-track preference, event-driven wake, durable retry และ delivery dashboard; LINE OA ไม่อยู่ใน scope และ SMS ยังไม่ทำ
Integration
Billing & Payment
Backend-driven Billing Center
iOS render ข้อมูลและ action จาก backend: รอบบิล ยอดประมาณการ verified check-in invoice statement PromptPay QR อัปโหลดสลิป สถานะตรวจสอบ และ paid PDF; Admin PWA ออก invoice ดูหลักฐานและบันทึกชำระได้ พร้อมออก invoice อัตโนมัติหลังสิ้นเดือนเวลา 08:30
Business Model
Security / PDPA Controls
Technical Baseline
มี consent, server-side API key, de-identification, RLS, audit/activity, retention policy 2026-07-22-v1, daily expiry worker, audited scoped legal hold, privacy manifest, incident runbook, Crashlytics และ server alerts ที่ redact PII/symptom/token/payload แล้ว; formal controller/processor และ external privacy/security/legal approval ยังไม่ปิด
Governance
Clinic Soft Launch
Owner tested
ผ่านการทดสอบของ owner แล้ว และล้าง test accounts/clinic aliases สำหรับ retest รอบใหม่แล้ว ขั้นต่อไปคือ soft launch แบบควบคุมจำนวนคลินิกและผู้ใช้จริง พร้อม production safeguards
Operations