Common Setup

Configuration shared by the web backend, the Customer App and the Seller App — documented once, here.
Version: 1.0.0
Applies to: Web · Customer App · Seller App

Developed By: BugBuild Labs

What Is Shared

A few settings are not specific to one part of Sellino — the Laravel web backend, the Customer App and the Seller App all depend on them. Rather than repeat those steps in three guides, they live on this page and every other guide links here.

Do this once. Complete this page a single time, then follow the app-specific steps in the Customer App and Seller App guides — they only cover what actually differs between the two apps.

Push Notifications (Firebase) — How It Works

Web backendCustomer AppSeller App

Sellino sends push notifications through Firebase Cloud Messaging (FCM) — order updates, delivery, returns/refunds, payouts and admin announcements. Push is optional: leave it off and everything else keeps working, only the phone-level alerts are missing.

Setup has two halves, and both are needed:

Server side — the backend sends

One Firebase service-account JSON uploaded in the admin panel under Settings → Push Notifications. Covers Android and iOS, for both apps.

App side — the phone receives

Each app needs its own Firebase config file (google-services.json / GoogleService-Info.plist). iOS needs one extra step — the APNs Auth Key.

Also worth knowing: in-app notifications (the bell icon and its list) are pulled from the backend over the API and always work with no setup at all. Firebase only affects notifications that reach the phone while the app is closed.

Note: Firebase is a Google service. A project is free to create, but any usage beyond its free tier is billed by Google and is not included in this item.

Work through steps 1 → 6 below. Steps 3–5 are iOS only — skip them if you only ship on Android.

1 · Create the Firebase Project

One project covers everything — the backend, the Customer App and the Seller App. Do not create separate projects per app.

  1. Open the Firebase console and create a project (or open an existing one).
  2. Go to Project settings → Service accounts and click Generate new private key. A .json file downloads — this is the service-account JSON the backend uses in step 6.
  3. Inside the same project, register the apps you plan to ship:
    • Android app for the Customer App (its applicationId)
    • Android app for the Seller App (its applicationId)
    • the matching iOS apps (their bundle ids), if you build for iOS

Keep the service-account JSON private. It can send notifications on your behalf. Never commit it to a public repository and never bundle it inside the mobile apps — it belongs on the server only.

Rebranded already? Register the Firebase apps with the final package / bundle ids you chose during rebranding, not the shipped defaults. Changing the id later means registering the app again and downloading a new config file.

Firebase consolecreate project
Service accountsgenerate private key

2 · Android Config File

Customer AppSeller App

In the Firebase console, open the Android app you registered and download google-services.json. Place it in the app's android/app/ folder:

CustomerAppCode/android/app/google-services.json    <- from the Customer App's Firebase Android app
SellerAppCode/android/app/google-services.json      <- from the Seller App's Firebase Android app

Each app gets its own file — the file is tied to the package id it was generated for. Rebuild the app after adding it.

Package id must match. If applicationId in android/app/build.gradle.kts differs from the id registered in Firebase, the build fails or push silently never arrives. Rebrand first, then download the config file.

3 · iOS Config File iOS only

Customer AppSeller App

Download GoogleService-Info.plist from the iOS app you registered in Firebase, then add it to ios/Runner/ through Xcode — open the project, right-click the Runner group, choose Add Files to "Runner", and tick Copy items if needed plus the Runner target.

CustomerAppCode/ios/Runner/GoogleService-Info.plist
SellerAppCode/ios/Runner/GoogleService-Info.plist

Copying the file in Finder is not enough. If it is not added to the Runner target in Xcode, it never lands in the built app and Firebase fails to initialise at runtime.

4 · iOS APNs Auth Key iOS only — required

Apple does not let Firebase deliver to iPhones on its own. You create an APNs Auth Key (a .p8 file) in your Apple Developer account and hand it to Firebase. Without this, push on iOS silently never arrives — no error, just nothing.

  1. Sign in to the Apple Developer portal and open Certificates, Identifiers & Profiles → Keys:
    https://developer.apple.com/account/resources/authkeys/list
  2. Create a new key, tick Apple Push Notifications service (APNs), and download the .p8 file. Note the Key ID shown next to it, and your Team ID (top-right of the portal, or under Membership).
  3. In the Firebase console go to Project settings → Cloud Messaging → Apple app configuration → APNs Authentication Key and upload the .p8 together with the Key ID and Team ID.

The .p8 downloads only once. Apple will not let you download it a second time — store it somewhere safe. If you lose it, revoke the key and create a new one.

One key covers everything. A single APNs Auth Key works for every app under the same Apple Developer team — you do not need a separate key for the Customer App and the Seller App. It also works for both development and production builds.

Portal layout changes. Apple reorganises the developer portal fairly often. If the link above does not land on the Keys page, sign in at developer.apple.com/account and look for Certificates, Identifiers & Profiles, then Keys. An Apple Developer Program membership is required — a free account cannot create APNs keys.

5 · Xcode Capabilities iOS only

Open the app's ios/Runner.xcworkspace in Xcode, select the Runner target → Signing & Capabilities, and add:

  • Push Notifications
  • Background Modes → tick Remote notifications

Do this for each iOS app you build (Customer App and Seller App). Make sure a valid Team is selected for signing at the same time.

6 · Admin Panel — Settings → Push Notifications

Web backend

The final step, and the one that actually turns sending on. In the admin panel open Settings → Push Notifications:

  1. Tick Enable push notifications.
  2. Upload the service-account JSON from step 1 — the Project ID fills in automatically.
  3. Click Test connection and confirm it succeeds before moving on.

Devices register themselves whenever a user signs in to either app, so notifications reach the right person across all of their devices — nothing to configure per user.

Non-technical step. This one is done entirely from the admin panel in a browser — no code, no terminal. Steps 1–5 are the developer's side of the same feature.

Settings → Pushenable + upload JSON
App notificationorder / delivery alerts

Verify & Troubleshoot

Test on a real device, not an emulator — the iOS simulator cannot receive push at all, and Android emulators need Google Play services.

  • Nothing arrives on Android — check google-services.json sits in android/app/, that its package id matches applicationId, and that the app was rebuilt after the file was added.
  • Android works, iOS does not — almost always the missing APNs Auth Key in the Firebase console, or the Xcode capabilities from step 5.
  • Test connection fails in the admin panel — the uploaded JSON is not a service-account key (it is the wrong file type), or the server cannot reach Google over HTTPS.
  • Only some users get notified — devices register on sign-in. A user who has never signed in on that device has no token yet.
  • In-app bell works but the phone stays silent — that is exactly the split described above: the API side is fine, the Firebase side is not finished.

API Base URL & HTTPS

Customer AppSeller App

Both apps are just clients of your backend, and both use the same config layout — one file per environment:

Customer App -> lib/core/env/prod_env.dart   (kBaseUrl)   ← release builds
                lib/core/env/dev_env.dart    (kBaseUrl)   ← debug / profile builds
Seller App   -> lib/core/env/prod_env.dart   (kBaseUrl)
                lib/core/env/dev_env.dart    (kBaseUrl)

prod -> 'https://yourdomain.com/api/v10'

Release builds always read prod_env.dart, and refuse to start if the URL still points at a dev host or the App API key is still empty.

HTTPS is not optional. Modern Android and iOS block plain HTTP and self-signed certificates by default — the app will show network errors that look like a broken backend. Confirm https://yourdomain.com/api/v10 loads in a browser before building either app.

Image URLs are resolved from the API origin automatically in both apps, so there is no separate media URL to configure. Detailed, app-specific configuration lives in the Customer App and Seller App guides.

Real-time Chat Key

Web backendSeller App

Live chat runs on Laravel Reverb. The key set in the backend's .env and the key compiled into the Seller App must be identical, or the socket connects and then silently drops:

backend .env               -> REVERB_APP_KEY=sellino-app-key
app lib/core/env/prod_env.dart -> static const String kReverbAppKey = 'sellino-app-key';

The scheme (http/https) is derived from the API base URL, so there is nothing else to set on the app side. Server-side Reverb installation — daemon, Supervisor, proxy — is covered in Real-time Chat (Reverb).

Check the admin panel first. The same credentials can be stored in Dashboard → Settings → Realtime (Websocket), and a value saved there overrides the .env key. If chat will not connect after editing .env, open that page and confirm the App Key matches — or clear the field to fall back to .env.

Done here? Head back to Quick Start to continue, or open the Web (Admin), Customer App or Seller App guide for the parts specific to each.