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 Customer App also needs the
Stripe payment function 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 apiKey = 'YOUR_APPWRITE_API_KEY';
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 stripePaymentFunctionId = 'YOUR_STRIPE_FUNCTION_ID';
| Constant | Where to find it |
|---|---|
apiEndpoint, projectId |
Project settings |
databaseId | Databases → kiko_mart_db |
apiKey |
API key you created |
postsBucketId |
ID of the
images bucket
|
messagingProviderId |
Messaging → Providers → Notification Sender |
notificationFunctionId |
Functions → notification_function |
broadCastTopicId, storeAdminTopicId |
Messaging → Topics |
stripePaymentFunctionId | Functions → stripe_payment |
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. - Enter the Customer App package name, e.g.
com.yourcompany.kiko_mart_user. - Click Done.
Follow the same steps as for Android, but choose iOS as the target and enter your iOS bundle identifier.
The Customer App is ready. Next, set up the Delivery Partner App.
