Shonzone / Shonzone - Complete Setup & Deployment Guide
This documentation is designed so you can set up, modify, and publish your app to the Play Store without requiring any technical assistance.
1. App Configuration (app_config.dart)
All main app settings are located in lib/utils/app_config.dart. Follow the details below to make changes:
- App Name & Identity:
appName: Change the display name of the app.reelsHandleName: Username shown in the Reels section (e.g., #Shonzone).signupSubTitle: Signup screen tagline.
- WooCommerce Setup:
websiteUrl: Your website URL (e.g., https://yourstore.com/).consumerKey&consumerSecret: WooCommerce REST API keys.
- Social & Support:
whatsappNumber: Customer support number (+91 format).supportEmail: Official support email address.instagramUrl: Instagram handle link for your store.
- OneSignal:
oneSignalAppId: Paste your dashboard ID here.
- WebView Checkout Toggle:
true: Checkout opens on the website page (recommended for special payment gateways).false: App uses its internal address form.
2. App Logo & Images (Size & Name)
Replace images in the assets/images/ folder. Do not delete old files, just replace them with the same name:
- App Icon:
launcher_icon.png(Size: 1024x1024 px). - Splash Screen Logo:
splash_logo.png(Size: 512x512 px or larger). Appears in a circle on splash screen. - Placeholders: Replace
your_logo.pngandsecure_payments.pngwith your brand graphics.
After replacing images, run:
flutter pub run flutter_launcher_icons
3. Reels & Short Videos (ACF Setup)
Reels feature is connected to WooCommerce products. Steps to set up:
- Install and activate the Advanced Custom Fields (ACF) plugin in WordPress.
- Create a Field Group named "Product Video".
- Add a new field:
- Field Label: Product Video URL
- Field Name:
product_video_url_(exactly this name) - Field Type: Text (URL)
- Set Location Rules:
Post Typeis equal toProduct. - Edit any product: "Product Video URL" box appears below.
- Paste your short video direct link (.mp4 file URL).
- The app will automatically display this video in the Reels section.
4. Firebase Setup & Cloud Firestore Rules
Place google-services.json in android/app/ folder.
Cloud Firestore Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// 1. USER PROFILE & ADDRESS BOOK RULES
// A user can only read and write their own data (Profile and Addresses).
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
// This automatically allows the addresses collection and any future sub-collections.
match /{allPaths=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
// 2. REELS LIKES RULES
// Everyone can read the likes count, but only logged-in users can like/unlike.
match /reels_likes/{docId} {
allow read: if true;
allow write: if request.auth != null;
// User-specific likes sub-collection
match /users/{uid} {
allow read, write: if request.auth != null && request.auth.uid == uid;
}
}
// 3. REELS COMMENTS RULES
// Everyone can read comments, but only logged-in users can post/edit/delete.
match /reels_comments/{docId} {
allow read: if true;
allow write: if request.auth != null;
// Individual comments inside 'list'
match /list/{commentId} {
allow read: if true;
allow write: if request.auth != null;
}
}
// 4. GLOBAL FALLBACK (Security Layer)
// Login is mandatory for any other unexpected data.
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
Storage Rules:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
// User Profiles folder: Everyone can view profile images,
// but only the authenticated owner can upload or modify their own file.
match /user_profiles/{fileName} {
allow read: if true;
allow write: if request.auth != null && fileName.startsWith(request.auth.uid);
}
// Review Images folder: Everyone can view review images,
// but only authenticated (logged-in) users can upload files.
match /review_images/{fileName} {
allow read: if true;
allow write: if request.auth != null;
}
// Default rule: For all other paths, authentication is required
// for both read and write access.
match /{allPaths=**} {
allow read, write: if request.auth != null;
}
}
}
5. Package Name Change
Package name must be unique (e.g., com.mybrand.store). Run:
flutter pub run rename setBundleId --targets android --value com.newname.app
Important: Update Firebase and OneSignal dashboards with the new package name to avoid breaking Google Login or Notifications.
6. Firebase SHA-1 (Debug Key)
For Google Login and OTP, SHA-1 is required:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Go to Firebase Console → Project Settings → Add Fingerprint and paste SHA-1.
7. Keystore Generation (Release Build)
Create the .jks file before publishing:
keytool -genkey -v -keystore c:\Users\user\upload-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
8. Build APK & AAB
- For Testing (APK):
flutter build apk --release - For Play Store (AAB):
flutter build appbundle
Output file: build/app/outputs/bundle/release/app-release.aab
9. Play Store Upload Guide
- Create a new app in Google Play Console.
- Upload the AAB file, add screenshots (Phone & 10-inch Tablet), and Privacy Policy link.
- Submit for review. It may take 2–4 days.
10. Firebase Analytics Integration (Production Mode)
Firebase Analytics automatically tracks user actions.
adb shell setprop debug.firebase.analytics.app com.newname.app
11. Release Signing Setup (key.properties)
storePassword=your_password
keyPassword=your_password
keyAlias=upload
storeFile=upload-key.jks
⚠️ Always back up the .jks file and key.properties. Without them, you cannot update the app on the Play Store.
12. Generating SHA Fingerprints from Release Keystore
keytool -list -v -keystore android/app/upload-keystore.jks -alias upload