Phase 2 scaffold: mitra online status & pairing logic
Add mitra online/offline status with heartbeat-based auto-offline, customer-mitra pairing via Valkey pub/sub blast, session management, and control center dashboard with real-time stats. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
CLAUDE.md
10
CLAUDE.md
@@ -30,7 +30,8 @@ Mental health chat platform connecting clients (users seeking support) with trai
|
||||
- **Control center is internal-only** — never expose its API routes to the public internet; protected via Nginx allow/deny + VPN
|
||||
- **Firebase Auth** tokens are verified on Fastify via JWT — user data lives in PostgreSQL, linked by Firebase UID
|
||||
- **Horizontal scaling** (Cloud Run) handles load — do not split into microservices prematurely
|
||||
- **Real-time features** (chat) are deferred to requirements phase
|
||||
- **Real-time features** use Valkey pub/sub for in-app events; FCM push notifications planned for next phase
|
||||
- **Pairing** uses blast-to-all-available-mitras with first-come-first-served acceptance
|
||||
|
||||
## Current Progress
|
||||
|
||||
@@ -40,7 +41,12 @@ Mental health chat platform connecting clients (users seeking support) with trai
|
||||
- mitra_app: OTP-only login
|
||||
- control_center: email/password login, mitra management, user management, anonymity settings
|
||||
- Docs: `requirement/phase1-plan.md`, `requirement/phase1-api-contract.md`, `requirement/client_app_mockup.html`
|
||||
- **Phase 2 (Sessions, Chat, Payments)** — not yet started, requirements not yet written
|
||||
- **Phase 2 (Mitra Online Status & Pairing)** — fully scaffolded
|
||||
- Backend: Valkey pub/sub, mitra online/offline status + heartbeat + auto-offline, pairing service, session management, dashboard stats
|
||||
- client_app: "Mulai Curhat" CTA, searching/found/no-bestie/session-active screens, PairingBloc
|
||||
- mitra_app: online/offline toggle, heartbeat + lifecycle handling, incoming request notification, active sessions screen
|
||||
- control_center: dashboard (auto-refresh), max customers per mitra config, session management + reroute, mitra online logs
|
||||
- Docs: `requirement/phase2.md`, `requirement/phase2-plan.md`
|
||||
|
||||
## Domain Concepts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user