Mobile App — Overview
WhatsMine Agent is the official Flutter (Android & iOS) companion app. It gives support agents the WhatsMine team inbox in their pocket — a mobile mirror of the web inbox that talks to the same server over the mobile REST API.
🧭 Where it lives in the codebase:
Chat-Agent-App/at the project root. The Laravel server in this repo already exposes everything the app needs — no extra backend package to install.
What it is (and isn't)
- ✅ A companion client. It signs in with an agent's existing WhatsMine credentials and lets them read and reply to conversations on the move.
- ❌ Not an admin or signup app. Agent accounts, channels, plans and billing stay in the WhatsMine web app / admin. The mobile app never creates accounts or manages billing.
Feature parity with the web inbox
| Area | What the app does |
|---|---|
| Login | Secure sign-in to any WhatsMine server via Sanctum tokens, stored in the device keychain/keystore. |
| Inbox list | Folder tabs (All / Mine / Unassigned / Resolved / Snoozed), channel & label filters, contact search, unread + channel badges, pull-to-refresh, infinite scroll. |
| Conversation thread | Inbound/outbound bubbles, day separators, delivery ticks (queued → sent → delivered → read → failed), and rendering for text, image, video, audio, document, location, template, interactive & reactions — including WhatsApp *bold* _italic_ ~strike~ formatting. |
| Composer | Text, emoji, attachments (camera / gallery / files), /shortcut canned replies, WhatsApp templates, and 24-hour session-window awareness (locks text and suggests a template when the window closes). |
| Inbox actions | Assign to a teammate, change status, attach/detach labels, AI ↔ human hand-off, and internal team notes. |
| Realtime | Optional live new-messages, typing indicators and assignment updates over the Pusher protocol (hosted Pusher or self-hosted Reverb). |
| Contact profile | Details, custom fields and recent conversations. |
| Settings | Theme (system/light/dark), notifications, sound, language, legal links and an in-app Account & data / deletion path for store policy. |
Supported channels
The unified inbox covers every channel the workspace has connected: WhatsApp, Facebook Messenger, Instagram, SMS and email.
Architecture at a glance
| Concern | Choice |
|---|---|
| State management | Riverpod (Notifier, FamilyNotifier, FutureProvider) |
| Networking | Dio with a Sanctum bearer interceptor + normalised errors |
| Routing | go_router with auth-driven redirects |
| Realtime | pusher_channels_flutter + Laravel /broadcasting/auth |
| Secure storage | flutter_secure_storage (token) + shared_preferences (settings) |
| Media | image_picker, file_picker, cached_network_image, audioplayers |
| i18n | English, Spanish, French, Arabic (RTL) and Bangla |
Chat-Agent-App/lib/
├── main.dart # bootstrap: load prefs + token, ProviderScope
└── src/
├── app.dart # MaterialApp.router + theming
├── core/ # config, theme, network, storage, realtime, router, utils
├── models/ # API DTOs (conversation, message, contact, …)
├── services/ # one service per API area (auth, inbox, conversation, contact)
├── providers/ # Riverpod controllers (auth, inbox list, conversation, settings)
├── widgets/ # shared UI (avatar, badges, chips, states)
└── features/ # screens: auth, inbox, conversation, contact, settings
The app is bound to the mobile API contract under /api/v1/auth/* and /api/v1/mobile/*, plus broadcast channels conversation.{id} / workspace.{id}. See Configuration → Mobile API contract for the full endpoint list.
Next steps
- Setup — install the toolchain, fetch packages, run on a device.
- Configuration — point the app at your server + realtime.
- Usage — a guided tour for agents.
- Publishing — release builds and App Store / Play compliance.