---
name: Mitra App Context
description: Stack, purpose, and API conventions for the Halo Bestie mitra Flutter app
type: project
---

Flutter mobile app (iOS + Android) for trained mental health professionals (mitra/partners).

**Stack:** Flutter, Firebase Auth (`firebase_auth` + `google_sign_in`)

**Auth:** Google Sign-In (native), Apple Sign-In (native), Phone OTP — fully native, no WebView. JWT sent as `Authorization: Bearer` on every API call.

**API:** Calls `/api/mitra/` and `/api/shared/` routes only. Never call `/api/client/` or `/internal/`.

**Domain:** Mitra = trained mental health professional. Flow: register + credential upload → await control center approval → set availability → accept sessions → chat with client → receive payout.

**Important:** Mitra accounts require approval from control center before going live. Mitra role must be verified server-side on every relevant request — never rely on client-side role checks.
