LogoKikoMart Docs

Delivery Partner App: Connect to Appwrite

Add your Appwrite credentials and register the Delivery App.

Make sure you've already run the database seeding script from the Store App.

Appwrite credentials#

Open lib/config/appwrite_config.dart (in some versions lib/app/appwrite/appwrite_config.dart) and fill in your values. The Delivery App also needs the deliveryman topic ID:

static const String apiEndpoint = 'https://fra.cloud.appwrite.io/v1';
static const String projectId = 'YOUR_PROJECT_ID';
static const String databaseId = 'YOUR_DATABASE_ID';
static const String postsBucketId = 'images';
static const String messagingProviderId = 'YOUR_FCM_PROVIDER_ID';
static const String notificationFunctionId = 'YOUR_NOTIFICATION_FUNCTION_ID';
static const String broadCastTopicId = 'YOUR_BROADCAST_TOPIC_ID';
static const String storeAdminTopicId = 'YOUR_STORE_ADMIN_TOPIC_ID';
static const String allDeliverymanTopicId = 'YOUR_DELIVERYMAN_TOPIC_ID';
ConstantWhere to find it
apiEndpoint, projectId Project settings
databaseIdDatabases → kiko_mart_db
postsBucketId ID of the images bucket
messagingProviderId Messaging → Providers → Notification Sender
notificationFunctionId Functions → notification_function
broadCastTopicId, storeAdminTopicId, allDeliverymanTopicId Messaging → Topics

Don't leave any value empty or as a placeholder. Missing values cause a Null cast error when the app starts.

Register the app in Appwrite#

  1. In your Appwrite project, go to Apps → + Add app.
  2. Choose Flutter as the platform and Android as the target, then click Continue.
  3. Enter a name, e.g. KikoMart Delivery.
  4. Enter the Delivery App package name, e.g. com.yourcompany.kiko_mart_delivery.
  5. Click Done.

Follow the same steps as for Android, but choose iOS as the target and enter your iOS bundle identifier.

New delivery partners who sign up in the Delivery App must be approved by a store admin in the Store Admin dashboard before they receive orders.

All three apps are set up. Next, set up the Landing Page or go straight to Deployment.