4.6 KiB
QRIS Soundbox Platform Package
Paket ini berisi blueprint final v1 untuk platform merchant aggregator QRIS + soundbox universal.
Isi paket
- 01-executive-blueprint.md
- 02-system-architecture.md
- 03-domain-modules.md
- 04-device-flows.md
- 05-api-contract-draft.md
- 06-mqtt-contract-draft.md
- 07-database-schema-draft.md
- 08-implementation-roadmap.md
- 09-screen-inventory.md
- 10-design-blueprint.md
- 11-low-fi-wireframes.md
Tujuan
Dokumen ini dibuat supaya tim bisa langsung mulai:
- desain UI/UX
- breakdown engineering
- desain backend
- integrasi device
- cicil implementasi per fase
Quick Start Implementasi (Lanjutan dari CODEx Handoff)
- Backend bootstrap Fase 1 sudah dibuat di
src/. - Fitur awal yang sudah aktif:
- request context +
request_iddi middleware - error envelope (
code,message,details,request_id,timestamp) - auth token minimal untuk endpoint admin
- middleware idempotency untuk endpoint sensitif
- request context +
- endpoint awal:
GET /healthGET /admin/health(denganAuthorization: Bearer <token>)POST /admin/loginPOST /admin/sample-idempotentPOST /admin/merchantsGET /admin/merchantsGET /admin/merchants/{id}PATCH /admin/merchants/{id}POST /admin/merchants/{merchantId}/outletsPOST /admin/merchants/{merchantId}/approvePOST /admin/merchants/{merchantId}/rejectGET /admin/outletsGET /admin/outlets/{id}POST /admin/outlets/{outletId}/terminalsGET /admin/terminalsGET /admin/terminals/{id}POST /admin/devicesGET /admin/devicesGET /admin/devices/{id}POST /admin/devices/{id}/bindPOST /admin/devices/{id}/unbindPOST /admin/devices/{id}/commandsGET /admin/devices/{id}/commandsGET /admin/devices/{id}/commands/{commandId}GET /admin/devices/{id}/notificationsGET /admin/devices/{id}/configPATCH /admin/devices/{id}/configGET /admin/devices/{id}/config/statusPOST /admin/devices/{id}/config/retry-pushGET /admin/devices/{id}/mqtt-messagesGET /admin/audit-logsGET /admin/ledger-entriesGET /admin/transactionsGET /admin/transactions/{transactionId}POST /admin/transactionsPOST /admin/transactions/expire-dueGET /admin/transactions/{transactionId}/eventsPOST /admin/transactions/{transactionId}/retry-notificationPOST /admin/seedPOST /device/transactions/dynamic-qrPOST /device/mqtt/uplink/dynamic-qr/requestGET /device/configPOST /device/config/ack
Menjalankan lokal
npm install
cp .env.example .env
npm run dev
npm run build && npm start
Cleanup data smoke test
PGHOST=127.0.0.1 PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=qris_soundbox_platform npm run smoke:cleanup
Cleanup hanya menarget entitas smoke (Smoke Merchant, PR-, DEV-) agar data seed demo tidak ikut terhapus.
PORT=3100 ADMIN_TOKEN=admin-dev-token DEVICE_TOKEN=device-dev-token INTEGRATION_WEBHOOK_SECRET=dev-callback-secret PGHOST=127.0.0.1 PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=qris_soundbox_platform npm run smoke:flow
Smoke flow akan melakukan create merchant/device/transaction + heartbeat + callback paid + verifikasi event/heartbeat/notification, duplicate callback, invalid signature, audit log, ledger placeholder, skenario terminal tanpa binding, dynamic QR API-direct, expiry sweep dynamic QR, dynamic QR MQTT, device config push/retry/status/ack, dan trace MQTT config ack.
Smoke test end-to-end (bootstrap + flow + cleanup)
PGHOST=127.0.0.1 PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=qris_soundbox_platform npm run smoke:e2e
Perintah ini menjalankan:
- cleanup data smoke
- start server lokal di port 3100
- wait sampai
/healthaktif - jalankan flow smoke lengkap
- hentikan server setelah selesai
Endpoint device lain
POST /device/commands/ack
Quick screen preview
GET /ui=> katalog halaman UI dari seluruhdesign/*.GET /ui/:page=> buka halaman berdasarkan slug (contoh:/ui/admin-login,/ui/admin-dashboard-overview,/ui/merchant-login).
Status lanjutan: Fase 1 core flow sudah tercakup smoke e2e. Fase 2 sudah aktif untuk capability resolver, dynamic QR API-direct, dynamic QR MQTT via outbox, dan device config push/status/retry/ack.
Catatan Fase 2 ops: endpoint daftar/detail device admin juga mengirim health_summary (status, score, age_seconds, reasons) untuk membantu triage device. UI device registry dan device technical detail sudah menampilkan health summary, config drift, dan retry config push.