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';
| Constant | Where to find it |
|---|---|
apiEndpoint, projectId |
Project settings |
databaseId | Databases → 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#
- In your Appwrite project, go to Apps → + Add app.
- Choose Flutter as the platform and Android as the target, then click Continue.
- Enter a name, e.g.
KikoMart Delivery. - Enter the Delivery App package name, e.g.
com.yourcompany.kiko_mart_delivery. - 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.
