docs
/
Appmint Mobile

Environment

Which backend a build talks to, how the development and production environments are chosen, and what the app stores on the device.

The app has exactly two environments, chosen at build time. There is no in-app server picker: a debug build talks to development, a release build talks to production, and the organization is part of the sign-in rather than a setting.

The two environments

EnvironmentConfig in lib/config/environment.dart is the single source:

KeyDevelopmentProduction
appengineEndpointhttp://192.168.1.239:3300https://appengine.appmint.io
apiBaseUrlhttp://192.168.1.239:4050/apihttps://api.appmint.io
appUrlhttp://192.168.1.239:4050https://appmint.io
defaultOrgIddemo(empty — typed at sign-in)

main.dart selects production when kReleaseMode is true and development otherwise. flutter run is therefore always development; flutter build apk, flutter build ipa and flutter build web --release are always production.

The development endpoint is a LAN address, not localhost

A phone on the same Wi-Fi cannot reach localhost on your Mac, so the development endpoint is the machine's LAN IP. Supply the intended endpoint with APPENGINE_URL when the machine or network changes.

Derived behaviour

Build-time endpoint overrides take precedence over the environment defaults. Pass --dart-define=APPENGINE_URL=<backend-url> for the backend and --dart-define=STUDIO_URL=<studio-url> for the web account-recovery destination. Use a reachable LAN address on a physical phone; localhost on that phone refers to the phone itself.

These defaults follow from the environment:

FlagDevelopmentProduction
enableDebugLogson — every request and response is logged to the consoleoff
enableCrashReportingoffon
enableAnalyticsoffon
"Fast Login (Dev)" buttonshownhidden — it is gated on kDebugMode, and the credentials are the demo organization's

Timeouts are 30 seconds for connect and receive, with 3 retries. Lists page at 20 by default and 100 at most.

Organization and tokens

The organization id is entered on the sign-in screen (or filled from defaultOrgId in development) and sent as a lowercase orgid header on every request. Sign-in returns an access token and a refresh token.

The app has no app credential: no App ID or app secret ships in it, and it does not use app/key or app/attest. Every call is made as the signed-in staff member, with their token in Authorization: Bearer (lib/services/http_client.dart). App sign-in (Phone apps without a secret) is for apps that act before a person signs in, such as a customer app or a site's chat widget.

Stored valueWhereKey
Access tokenSecure storage (Keychain / Keystore)access_token
Refresh tokenSecure storagerefresh_token
User recordShared preferencesuser_data
OrganizationShared preferencesorgId, remembered_org
Contact detailsShared preferencesuserEmail, userPhone
Saved sessionsShared preferencessaved_sessions

A 401 triggers one refresh (POST /profile/user/refresh) and one retry. A second failure signs the user out.

lib/config/legal_urls.dart holds the links surfaced in the app: privacy at https://appmint.io/privacy, terms at https://appmint.io/terms, and support to [email protected] with the subject "Appmint Mobile — Support Request".

Platform identifiers

Value
Android application idio.appmint.appmint_mobile
iOS bundle idio.appmint.appmintMobile
Current version1.0.2+9