WhatsMine Documentation
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Mobile App
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Mobile App
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
  • Mobile App

    • Mobile App — Overview
    • Mobile App — Setup
    • Mobile App — Configuration
    • Mobile App — Usage
    • Mobile App — Publishing & Store Compliance

Mobile App — Configuration

Everything the app needs is configured in one file — lib/src/core/config/app_config.dart — with the connection-critical values also overridable per build via --dart-define. There is no in-app settings screen for the server or realtime; this keeps the app a locked-down companion client.

All settings in one place

AppConfig (lib/src/core/config/app_config.dart):

SettingDefaultWhat it does
appNameWhatsMineDisplay name across the app.
baseUrlhttps://whatsmine-demo.spagreen.netThe WhatsMine server the app connects to. Override per build with SERVER_URL.
apiPrefix/api/v1REST prefix appended to baseUrl.
broadcastAuthPath/broadcasting/authEndpoint Laravel uses to authorise private/presence channels.
pusherKey(empty)Pusher/Reverb key. Empty = realtime disabled. Override with PUSHER_KEY.
pusherClustermt1Pusher cluster. Override with PUSHER_CLUSTER.
defaultLanguageenInitial UI language. Override with DEFAULT_LANG.
supportedLanguagesen, es, fr, ar, bnLanguages shown in the in-app picker.
deviceNameWhatsMine Agent (Flutter)Reported to the server when issuing the Sanctum token.
conversationsPerPage / messagesPerPage30 / 50Pagination — keep in sync with the backend.
connectTimeout / receiveTimeout20s / 30sDio networking timeouts.
maxAttachmentBytes20 MBMax upload size — keep in sync with the backend.
privacyPolicyUrl…Legal links surfaced in Settings (required for store review).
termsUrl…
supportUrl…
accountDeletionUrl…Linked from Settings → Account & data (store policy).

Server URL & realtime (build-time)

Edit the defaults in app_config.dart, or pass them per build so one codebase can target dev / staging / production:

flutter run \
  --dart-define=SERVER_URL=https://your-domain.com \
  --dart-define=PUSHER_KEY=your_pusher_key \
  --dart-define=PUSHER_CLUSTER=mt1 \
  --dart-define=DEFAULT_LANG=en

Realtime is optional

Leave PUSHER_KEY empty to disable realtime — the app still works via pull-to-refresh, and opening a conversation always loads the latest messages. When a key is set, the app authorises private channels through the server's /broadcasting/auth using the agent's token.

Your PUSHER_KEY / PUSHER_CLUSTER must match the server's broadcast settings (hosted Pusher or self-hosted Reverb). Configure those on the backend under Admin → Real-time Settings — see Integrations → Real-time & Push.

Legal & store links

Point these at your hosted pages before submitting to either store — they are surfaced in Settings and required for review:

static const String privacyPolicyUrl = 'https://your-domain.com/privacy-policy';
static const String termsUrl          = 'https://your-domain.com/terms';
static const String supportUrl        = 'https://your-domain.com/support';
static const String accountDeletionUrl= 'https://your-domain.com/account-deletion';

A starter privacy policy lives at Chat-Agent-App/docs/PRIVACY_POLICY_TEMPLATE.md.

Branding & customisation

The app ships with the WhatsMine brand (green #467235 / amber #FFBF00, sourced from the project .branding): themed UI, branded login logo, launcher icons and native splash.

WhatWhere
Brand colours & themelib/src/core/theme/app_theme.dart
App name, server, legal URLslib/src/core/config/app_config.dart
Channel colours/iconslib/src/core/constants/channels.dart
Logo / icon source imagesassets/images/app_icon.png, assets/images/splash_logo.png

To re-brand, replace those images + colours, then regenerate native assets:

dart run flutter_launcher_icons         # app launcher icons (Android + iOS)
dart run flutter_native_splash:create   # native splash screens

The display name WhatsMine Agent is set in Android AndroidManifest.xml (android:label) and iOS Info.plist (CFBundleDisplayName).

Languages (i18n)

UI strings live in lib/l10n/app_*.arb (en, es, fr, ar, bn). Agents pick a language in Settings; defaultLanguage sets the initial one. Arabic renders right-to-left automatically. To add a language, add an app_<code>.arb, list it in supportedLanguages, and run flutter pub get (codegen is on via generate: true).

Mobile API contract

The app is bound to these server endpoints (all under baseUrl + /api/v1, Bearer-token auth via Sanctum). They live in Chat-Agent-App/lib/src/core/network/api_endpoints.dart and map 1:1 to app/Http/Controllers/Api/V1/Mobile* on the server.

AreaMethod & path
AuthPOST /auth/login (public), POST /auth/logout, GET /auth/me, POST /auth/profile
Inbox bootstrapGET /mobile/inbox/setup, /mobile/inbox/templates, /mobile/inbox/labels, /mobile/inbox/canned-replies
ConversationsGET /mobile/conversations, GET /mobile/conversations/{uuid}, GET …/{uuid}/messages, POST /mobile/conversations (start)
Replies & actionsPOST …/{uuid}/reply, PATCH …/{uuid}/assign, PATCH …/{uuid}/status, POST …/{uuid}/typing, POST …/{uuid}/handover
NotesGET …/{uuid}/notes, POST …/{uuid}/notes
LabelsPOST …/{uuid}/labels, DELETE …/{uuid}/labels/{labelId}
ContactsGET /mobile/contacts/search, GET /mobile/contacts/{id}
Broadcastchannels conversation.{id} / workspace.{id}; events MessageSent, MessageReceived, MessageStatusUpdated, TypingChanged, ConversationAssigned

Demo mode

When the server runs with APP_DEMO_MODE=true, the /api/v1/mobile/* routes allow reads but block writes (replies, assigns, status changes) — the app stays a consistent read-only showcase and shows a demo banner. See Getting Started → Demo Mode.

Last Updated: 6/29/26, 12:25 PM
Prev
Mobile App — Setup
Next
Mobile App — Usage