Skip to content

Install & connect the mobile app

The BottleCRM mobile app is a Flutter application that ships in the same repository (Django-CRM/mobile/) and talks to your backend over the same JSON API.

Building from source

cd Django-CRM/mobile
flutter pub get
flutter run                 # dev build on a connected device or simulator

For production builds:

flutter build apk --release            # Android
flutter build appbundle --release      # Android App Bundle
flutter build ios --release            # iOS (on macOS)

Connecting to your backend

On first launch the app asks for the server URL. Enter the base URL of your CRM (e.g. https://crm.acme.com), the app appends /api/ itself.

Then sign in with the same options as the web app:

  • Google OAuth
  • Magic link (the app opens the link from the email and completes the exchange)

Tokens are stored in the device's secure storage (Keychain on iOS, Keystore on Android) and refreshed automatically.

Switching organizations

Tap the avatar in the top-right of the home screen → Switch organization. This calls the same POST /api/auth/switch-org/ endpoint the web app uses and replaces the local token pair.

Offline behaviour

The app caches recently-viewed records for offline reading but does not support offline writes. Every create/edit requires a live connection so the backend can apply tenant-scoped validation.

Push notifications

Lead alerts reach the Android app as push notifications through Firebase Cloud Messaging: a lead assigned to you, a new lead nobody owns (to admins), a lead who enquired again, and the waiting reminder an admin can turn on. Each person switches them off under Profile. Tapping one opens the lead, or the contact when a converted lead enquires again. iOS push waits for an iOS release.

A push reaches only an app built with the same Firebase project as the server. On a self-hosted install, build the app with your own project's google-services.json, create a service account that can only send messages (Firebase Cloud Messaging API Admin), and set FCM_SERVICE_ACCOUNT_FILE to its key file for both the API and the Celery worker. Without it, alerts stay in-app and by email.