eSellify Documentation
Complete setup and deployment guide for your multi-platform e-commerce application.
v1.0 - Flutter + Firebase
💻
Platform
Android, iOS & Web
🔧
Framework
Flutter + Firebase
Key Features
📱
Multi-Platform
Build for Android, iOS, and Web from a single Flutter codebase.
🔐
Authentication
Phone, Google, and Apple sign-in powered by Firebase Authentication.
🛒
Shopping Cart
Full-featured cart with quantity management, coupons, and checkout flow.
🔔
Push Notifications
Real-time notifications via Firebase Cloud Messaging (FCM) on all platforms.
⚙
Admin Panel
Full-featured Flutter web admin dashboard for managing products, orders, and users.
💳
Payment Gateway
Multiple payment integrations including Stripe, Razorpay, PayPal, and COD.
What's Included
- Customer App - Flutter mobile app for Android & iOS
- Seller App - Flutter mobile app for sellers to manage products & orders
- Admin Panel - Flutter web-based admin dashboard
- Database Files - Pre-built Firestore database collections for quick setup
- Firestore Indexes - Optimized query indexes for better performance
- Documentation - This comprehensive setup guide
Before starting the setup, make sure you have the following tools and accounts ready.
Required Software
| Software |
Version |
Purpose |
| Flutter SDK |
Latest Stable |
Framework for building the app |
| Dart SDK |
Bundled with Flutter |
Programming language for Flutter |
| Android Studio |
Latest |
IDE & Android SDK/Emulator |
| Xcode (macOS only) |
Latest |
iOS development & simulator |
| Firebase CLI |
Latest |
Deploy and manage Firebase services |
| Git |
Latest |
Version control |
| VS Code / Android Studio |
Latest |
Code editor with Flutter/Dart plugins |
Required Accounts
- Google Account - For Firebase Console & Google Cloud
- Firebase Account - Project hosting, database, authentication, and functions
- Payment Gateway Account - Stripe, Razorpay, or PayPal for processing payments
- Apple Developer Account (optional) - Required for iOS deployment & Apple Sign-In
- Google Play Console (optional) - For publishing to Google Play Store
Important:
- Some Firebase features (phone authentication, etc.) require the Blaze plan
(pay-as-you-go). The free Spark plan has limitations.
- Ensure your system meets Flutter's minimum system requirements for your OS.
Follow these steps in order for a smooth setup experience. Each step links to the detailed section below.
Estimated Setup Time
Following this guide carefully, the complete setup typically takes 1-2 hours
depending on your familiarity with Flutter and Firebase.
To set up Flutter on both Windows and macOS, follow these step-by-step instructions.
Setting Up Flutter on Windows
System Requirements
- Operating System: Windows 10 or later (64-bit)
- Disk Space: At least 2.8 GB (excluding IDE and tools)
- Required Tool: Git for Windows
Download Flutter SDK
- Visit the official Flutter installation page.
- Download the latest stable version of the Flutter SDK (ZIP file).
- Extract the ZIP and move the flutter folder to a preferred location,
e.g., C:\src\flutter.
Add Flutter to System Path
- Open the Start Menu, search for "Environment Variables", and click "Edit the
system environment variables".
- In the System Properties window, click Environment Variables.
- Under User variables, locate the Path variable.
- If it exists, click Edit and append the path to flutter\bin
(e.g., C:\src\flutter\bin) at the end, separated by a semicolon.
- If it doesn't exist, click New, name it Path, and enter the
path to flutter\bin.
Verify Installation
- Open Command Prompt and run:
flutter doctor
- This will analyze your environment and report any missing dependencies (like Android Studio or
toolchains).
Install Android Studio
- Download Android Studio from developer.android.com.
- Launch the installer and complete the setup wizard, which installs:
- Android SDK
- Android SDK Command-line Tools
- Android SDK Build-Tools
- After installation, go to Android Studio > Settings > Plugins and install both
Flutter and Dart plugins.
Set Up an Android Emulator
- Open Android Studio.
- Go to Tools > AVD Manager.
- Follow the prompts to create and configure a new Android Virtual Device (AVD).
Final Setup Check
- Run the following again to ensure everything is configured:
flutter doctor
- Resolve any remaining issues shown in the output.
Setting Up Flutter on macOS
System Requirements
- Operating System: macOS 10.15 (Catalina) or later
- Disk Space: At least 2.8 GB (excluding IDE and tools)
- Required Tools: Git, Xcode (for iOS development)
Download Flutter SDK
Add Flutter to PATH
- Open your shell profile file (.zshrc or .bashrc) and add:
export PATH="$PATH:$HOME/development/flutter/bin"
- Then run source ~/.zshrc (or restart your terminal) to apply the changes.
Install Xcode
- Install Xcode from the Mac App Store.
- After installation, run the following commands to configure Xcode CLI tools:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
Install CocoaPods
- CocoaPods is required for iOS dependency management:
sudo gem install cocoapods
Verify Installation
flutter doctor
- Resolve any issues reported by Flutter Doctor before proceeding.
eSellify supports three authentication methods. Enable each one in the Firebase Console.
1. Enable Phone Authentication
- Go to the Firebase Console.
- Select your project from the dashboard.
- In the left sidebar, click on "Authentication".
- Navigate to the "Sign-in method" tab.
- Locate "Phone" and click on the edit icon.
- Toggle the switch to Enable phone authentication.
- Click Save.
2. Enable Google Sign-In
- Open the Firebase Console and choose your Firebase project.
- Go to the Authentication section from the sidebar.
- Under the "Sign-in method" tab, find "Google" and click the edit icon.
- Toggle the Enable switch.
- If prompted, configure the OAuth consent screen by providing:
- App name
- Support email
- Developer contact details
- Save your changes.
3. Enable Apple Sign-In
- Visit the Firebase Console and select your project.
- Go to Authentication > Sign-in method.
- Scroll to Apple and click the edit icon.
- Enable the provider and provide the required Apple Developer credentials:
- Team ID (from your Apple Developer account)
- Service ID
- Key ID
- Private Key (.p8 file)
- Save your configuration.
Note:
Apple Sign-In requires an active Apple Developer account ($99/year). It is mandatory for iOS apps
that offer third-party login options.
Import the pre-built database collections to quickly populate your Firestore database with the required
structure.
1. Install Node.js and npm
- Visit the official Node.js website: https://nodejs.org
- Download and install the LTS version compatible with your operating system.
- After installation, verify the setup using:
node -v
npm -v
2. Extract Database Files
- Locate your database.zip file from the project package.
- Extract its contents to a folder on your computer using your OS's built-in zip utility, WinRAR, or
7-Zip.
3. Open Terminal or Command Prompt
- Navigate into the extracted folder using your terminal:
cd path/to/extracted/folder
4. Generate Firebase Service Account Key
- Go to the Firebase Console.
- Select your project. Click the gear icon (⚙) next to "Project
Overview" in the top-left sidebar.
- Select "Project settings" from the dropdown menu.
- In the Project Settings page, click the "Service accounts" tab at the top (next to
General, Cloud Messaging, Integrations, etc.).
- You will see the Firebase Admin SDK section. Make sure "Node.js" is
selected as the platform (it should be selected by default).
- Click the Generate new private key button at the bottom of the page.
- A confirmation dialog will appear. Click "Generate key".
- A JSON key file will be downloaded automatically to your computer.
- Replace the existing config.json in your project folder with
this newly downloaded file (rename it to config.json if needed).
🔎
Navigation Path: Firebase Console → ⚙ (Gear Icon) → Project Settings
→ Service accounts tab → Firebase Admin SDK → Node.js → Generate new private key
5. Prepare config.json
- If config.json is not pre-existing:
- In Firebase Console, go to Project Settings > General.
- Scroll down to Your Apps > Firebase SDK snippet > Config.
- Copy the config object (not the script tag).
- Create a file named config.json in your project folder and paste the
config content inside.
6. Run Import Command
- Inside the extracted database folder, run:
npm install firestore-export-import
node import
Success:
Once the import completes, your Firestore database will have all the required collections and
documents.
Important Notes:
- Ensure you are inside the correct project directory before running any Firebase CLI
commands.
- You must have sufficient permissions (e.g., Editor or Owner role) in your Firebase
project to deploy indexes.
- Once deployed, Firestore queries will benefit from better performance as they'll
use the optimized indexes.
1. Navigate to Your Firebase Project Folder
- Open your terminal or command prompt.
- Use the cd command to move into your Firestore index project folder:
cd path/to/firestore_index
- Replace path/to/firestore_index with the actual directory path where your
Firestore project files are located.
Step A: Run firebase init
- Inside your project directory, initialize Firebase:
firebase init
- The terminal will display the Firebase ASCII logo and the message:
Terminal Output:
You're about to initialize a Firebase project in this directory:
C:\path\to\your\firestore_index
? Are you ready to proceed? (Y/n)
- Type y and press Enter to proceed.
Step B: Select Firebase Features
- You will see a list of Firebase features. Use the arrow keys to navigate and press
Space to select:
Select this option:
(*) Firestore: Configure security rules and indexes files for Firestore
Use arrow keys to move, Space to select, Enter to confirm.
Step C: Choose Firebase Project
- Select Use an existing project when prompted.
- A list of your Firebase projects will appear. Use the arrow keys to highlight your eSellify project
and press Enter.
Step D: Set Up Firestore Rules and Indexes
- When prompted for the Firestore rules file (firestore.rules), press Enter
to accept the default.
- If the file already exists, type y to overwrite.
- When prompted for the Firestore indexes file (firestore.indexes.json),
press Enter to accept the default. Overwrite if asked.
- You will see the message: Firebase initialization complete!
Step E: Deploy Firestore Indexes
- Now deploy the indexes defined in firestore.indexes.json:
firebase deploy --only firestore:indexes
Deployment Complete
- You should see the following output in your terminal:
Expected Terminal Output:
=== Deploying to 'your-project-id'...
i firestore: reading indexes from firestore.indexes.json...
i cloud.firestore: checking firestore.rules for compilation errors...
+ cloud.firestore: rules file firestore.rules compiled successfully
i firestore: deploying indexes...
+ firestore: deployed indexes in firestore.indexes.json successfully
+ Deploy complete!
Project Console: https://console.firebase.google.com/project/your-project-id/overview
Here you will find all the setup guides for Admin Panel configuration.
Important Notes:
- Some Firebase features require the Blaze plan.
- If you are on the free Spark plan, please upgrade to Blaze Plan for full
functionality.
Update HTML Title
- Open: web/index.html
- Inside the <head> section, update the content of the <title> tag:
<head>
...
<title>Your New App Name</title>
...
</head>
1. Install Firebase CLI Tools
npm install -g firebase-tools
2. Authenticate Firebase CLI
firebase login
- A browser window will open to complete authentication with your Google account.
3. Create a Firebase Project
- Create a project directly from the terminal:
firebase projects:create
OR
- Create one via the Firebase
Console.
- Enter a name and press Continue, then click Create Project.
- Now add an app in Firebase:
1
Add Firebase to your Flutter App:
- On the Firebase Project Overview page, you will see the text "Get started by adding
Firebase to your app" with platform icons (iOS, Android, Web, Unity, Flutter).
- Click the Flutter icon (the last icon, looks like a diamond shape).
- Firebase will show the "Add Firebase to your Flutter app" wizard with two commands.
2
Run the FlutterFire CLI commands shown in the wizard:
$ dart pub global activate flutterfire_cli
$ flutterfire configure --project=YOUR_PROJECT_ID
This automatically registers your per-platform apps with Firebase and adds a lib/firebase_options.dart configuration file to your Flutter project.
- After running both commands, click Next in the Firebase wizard.
- Then click Continue to console.
4. Initialize Firebase in Your Flutter App
- Open Android Studio and go to the Terminal tab.
- Run the initialization commands:
dart pub global activate flutterfire_cli
flutterfire configure --project=YOUR_PROJECT_ID
- The CLI will ask which platforms you want to configure. Since this is the Admin Panel:
Platform Selection (Admin Panel = Web only):
? Which platforms should your configuration support?
( ) android
( ) ios
( ) macos
(*) web <-- Select ONLY this
( ) windows
Use arrow keys and Space to select web only. Press Enter to confirm.
- When asked "firebase_options.dart already exists. Do you want to override it?", type
yes and press Enter.
- Setup is complete when you see: Firebase configuration file
lib/firebase_options.dart generated successfully.
1. Generate a Google Maps API Key
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the following APIs for your project:
- Maps SDK for Android
- Maps SDK for iOS
- Maps JavaScript API
- Go to APIs & Services > Credentials.
- Click "Create Credentials" > "API key".
- Copy the newly generated API key.
2. Add API Key to Flutter Web
- Open: web/index.html
- Inside the <head> section, add:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
Flutter Web
For Flutter web, the favicon represents your application in the browser tab.
Replace Favicon:
- Design your favicon in the proper size and format (typically favicon.ico
or PNG, 32x32 or 16x16 pixels).
- Go to your Flutter project's web/ directory.
- Replace the existing favicon.png or favicon.ico with your own file using the same filename to
maintain the reference.
Tip:
You can use online tools like favicon.io or
realfavicongenerator.net to generate favicons from your logo in all required sizes.
Note:
Run all commands below from the project folder in your Android Studio terminal or system terminal.
1. Create the Build for Server Upload
- Run the following commands in order:
flutter clean
flutter pub get
flutter build web --release
- You will see output like:
Compiling lib/main.dart for the Web...
✓ Built build\web 19.5s
- After running the above commands, Flutter generates the optimized build inside:
build/web/
- Upload the contents of the build/web/ folder to your server or hosting
provider (via FTP, cPanel, or SSH).
Note:
Run all commands below from the project folder in your terminal.
1. Build and Deploy Using Firebase Hosting
- Install Firebase CLI (if not already installed):
npm install -g firebase-tools
firebase login
- Initialize Firebase inside your project folder:
firebase init
Follow the Firebase Init prompts:
? Are you ready to proceed? (Y/n) y
? Which Firebase features do you want to set up?
(*) Hosting: Configure files for Firebase Hosting
and (optionally) set up GitHub Action deploys
=== Project Setup
? Please select an option: Use an existing project
i Using project your-project-id
=== Hosting Setup
? What do you want to use as your public directory? build/web
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? Set up automatic builds and deploys with GitHub? No
- You should see: + Firebase initialization complete!
- Now build the release version:
flutter build web --release
- Then deploy to Firebase Hosting:
firebase deploy
Expected Deployment Output:
=== Deploying to 'esellify-app'...
i deploying firestore, hosting
i hosting[esellify-app]: beginning deploy...
i hosting[esellify-app]: found 516 files in build/web
+ hosting[esellify-app]: file upload complete
+ hosting[esellify-app]: version finalized
+ hosting[esellify-app]: release complete
+ Deploy complete!
Project Console: https://console.firebase.google.com/project/esellify-app/overview
Hosting URL: https://esellify-app.web.app
Success:
Your Admin Panel is now live! Copy the Hosting URL shown in the output (e.g., https://esellify-app.web.app) to access your deployed admin panel.
Here you will find all the setup guides for configuring the Customer & Seller Apps (Android &
iOS).
Changing the package name of a Flutter project involves updating multiple files and configurations for
both Android and iOS platforms.
Android
Update the applicationId in build.gradle:
- Open: android/app/build.gradle
- Inside the defaultConfig block, find and replace the applicationId:
defaultConfig {
applicationId "com.new.package.name"
}
Rename Java Package Directories:
- Go to: android/app/src/main/java/
- Rename the directory folders to match your new package structure (e.g., com/new/package/name).
- Make sure the new folder path matches the applicationId you set above.
Update AndroidManifest.xml:
- Open: android/app/src/main/AndroidManifest.xml
- Update the package attribute in the root <manifest> tag:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.new.package.name">
</manifest>
Update Other Manifest Files:
- Also update the package attribute in:
- android/app/src/debug/AndroidManifest.xml
- android/app/src/profile/AndroidManifest.xml
iOS
Update PRODUCT_BUNDLE_IDENTIFIER in Xcode:
- Open the iOS project in Xcode: ios/Runner.xcworkspace
- Select the Runner target, then go to the Build Settings tab.
- Search for PRODUCT_BUNDLE_IDENTIFIER.
- Replace it with your new bundle identifier (e.g., com.new.package.name).
Update Bundle Identifier in Info.plist:
- Open: ios/Runner/Info.plist
- Locate the CFBundleIdentifier key and update its value.
Prerequisites
- Flutter SDK is installed
- A Flutter project is already created
- You understand the basic Flutter project structure
Android
Update AndroidManifest.xml:
- Navigate to: android/app/src/main/AndroidManifest.xml
- Find the application tag and modify the android:label attribute:
<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:label="Your App Name"
...>
</application>
Update strings.xml:
- Open: android/app/src/main/res/values/strings.xml
- Update the app_name string:
<string name="app_name">Your New App Name</string>
iOS
Update Info.plist:
- Go to: ios/Runner/Info.plist
- Locate the key for CFBundleName and change its value:
<key>CFBundleName</key>
<string>Your New App Name</string>
Update Display Name in Xcode:
- Open your project in Xcode: ios/Runner.xcworkspace
- Select the Runner target, click the General tab.
- Find the Display Name field and update it to your desired app name.
Android
Replace Default Icons:
- Create your custom app icons in various densities. Navigate to: android/app/src/main/res/
- Replace ic_launcher.png in each of these folders with your custom icon:
- mipmap-mdpi (48x48 px)
- mipmap-hdpi (72x72 px)
- mipmap-xhdpi (96x96 px)
- mipmap-xxhdpi (144x144 px)
- mipmap-xxxhdpi (192x192 px)
Update Icon Reference in AndroidManifest.xml:
- Open: android/app/src/main/AndroidManifest.xml
- Ensure the android:icon points to your custom icon:
<application
android:icon="@mipmap/ic_launcher"
...>
</application>
iOS
Replace AppIcon Set:
- Prepare your custom icons in iOS-specific sizes and formats.
- Replace the contents of: ios/Runner/Assets.xcassets/AppIcon.appiconset/
- Ensure your icon set follows Apple's size and naming requirements.
Tip:
Use tools like appicon.co or the flutter_launcher_icons
package to automatically generate all required icon sizes from a single source image.
Note:
This setup applies to both the Admin Panel, Customer App, and Seller App. The steps are identical.
1. Install Firebase CLI Tools
npm install -g firebase-tools
2. Authenticate Firebase CLI
firebase login
- A browser window will open to complete authentication with your Google account.
3. Create a Firebase Project
firebase projects:create
OR
- Create one via the Firebase
Console.
- Enter a name and press Continue, then click Create Project.
- Add your app in Firebase:
➤
On the Project Overview page, click the Flutter icon under "Get started by adding
Firebase to your app". The wizard will show two commands to run:
$ dart pub global activate flutterfire_cli
$ flutterfire configure --project=YOUR_PROJECT_ID
Run both in your project terminal. Then click Next → Continue to console.
4. Initialize Firebase in Your Flutter App
- Open Android Studio and go to the Terminal tab. Run:
dart pub global activate flutterfire_cli
flutterfire configure --project=YOUR_PROJECT_ID
- The CLI will ask which platforms to configure. For the Customer/Seller App:
Platform Selection (Customer/Seller App = Android & iOS):
? Which platforms should your configuration support?
(*) android <-- Select this
(*) ios <-- Select this
( ) macos
( ) web
( ) windows
Use arrow keys and Space to select android and ios. Press Enter.
- If prompted "firebase_options.dart already exists. Do you want to override it?", type
yes.
- Setup is complete when you see:
Firebase configuration file lib/firebase_options.dart generated successfully
with the following Firebase apps:
Platform Firebase App Id
android 1:XXXXXXXXX:android:XXXXXXXXX
ios 1:XXXXXXXXX:ios:XXXXXXXXX
1. Create a Firebase Project
- Go to the Firebase Console.
- Click "Add project" and follow the guided steps.
- After setup, you'll be redirected to the Firebase project dashboard.
2. Add Your Flutter App to Firebase
Android Setup:
- Click on the Android icon to register an Android app.
- Enter your Android package name (found in android/app/src/main/AndroidManifest.xml).
- Download the google-services.json file.
- Place it in: android/app/
iOS Setup:
- Click on the iOS icon to register your iOS app.
- Enter your iOS bundle ID (found in Xcode project settings).
- Download the GoogleService-Info.plist file.
- In Xcode:
- Open ios/Runner.xcworkspace.
- Drag and drop GoogleService-Info.plist into the Runner project (check
"Copy items if needed").
3. Add Firebase Packages
- Add the necessary Firebase packages to pubspec.yaml:
dependencies:
firebase_core: ^latest
firebase_auth: ^latest
cloud_firestore: ^latest
flutter pub get
4. Configure DefaultFirebaseOptions
- Use the FlutterFire CLI to auto-generate the configuration file:
flutterfire configure
- This creates lib/firebase_options.dart with platform-specific
configurations.
5. Initialize Firebase in main.dart
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
runApp(MyApp());
}
1. Generate a Google Maps API Key
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the following APIs:
- Maps SDK for Android
- Maps SDK for iOS
- Maps JavaScript API
- Places API
- Geocoding API
- Go to APIs & Services > Credentials.
- Click "Create Credentials" > "API key".
- Copy the generated API key.
2. Add API Key - Android
- Open: android/app/src/main/AndroidManifest.xml
- Inside the <application> tag, add:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY"/>
3. Add API Key - iOS
- Open: ios/Runner/AppDelegate.swift
- In the application(_:didFinishLaunchingWithOptions:) method, add:
import GoogleMaps
GMSServices.provideAPIKey("YOUR_API_KEY")
Security Tip:
- Restrict your API key in the Google Cloud Console to specific apps (using package name/bundle
ID) and specific APIs to prevent unauthorized usage.
SHA keys are required for Firebase services like Google Sign-In and Phone Authentication on Android.
1. Generate SHA Keys
For Windows (Debug Keystore):
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
For macOS/Linux (Debug Keystore):
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
- Look for the SHA1 and SHA256 values in the output and copy them.
2. Add SHA Keys to Firebase Console
- Open the Firebase Console and
select your project.
- Click the gear icon (⚙) next to "Project Overview" and select "Project
settings".
- Go to the "General" tab (first tab at the top).
- Scroll down to the "Your apps" section. Find your Android app.
- Under your Android app, you will see a section listing existing SHA certificate fingerprints (SHA-1
and SHA-256).
- Click the "Add Fingerprint" button.
- A dialog will appear with a "Certificate fingerprint" input field and toggle buttons
for SHA1 and SHA256.
- Paste your SHA-1 key, select SHA1, and click Save.
- Repeat for the SHA-256 key: click "Add Fingerprint" again, paste the SHA-256 key, select
SHA256, and click Save.
🔎
Navigation Path: Firebase Console → ⚙ Gear Icon → Project Settings
→ General tab → Your apps → Android app → Add Fingerprint
Important Notes:
- For release builds, use your custom release keystore (not the default debug
one).
- Keep your keystore file secure and never expose it publicly.
- You must regenerate SHA keys if you change your signing configuration or keystore.
Note:
Run all commands from your project folder in the terminal.
1. Generate APK (for direct installation)
flutter clean
flutter pub get
flutter build apk --release
- The release APK will be generated at:
build/app/outputs/flutter-apk/app-release.apk
2. Generate AAB (for Google Play Store)
flutter clean
flutter pub get
flutter build appbundle --release
- The release AAB file will be generated at:
build/app/outputs/bundle/release/app-release.aab
Difference between APK and AAB:
- APK: Universal package for direct installation or testing on devices.
- AAB: Optimized format required by Google Play Store. It generates smaller,
device-specific APKs automatically.
Using Command-Line Interface (CLI)
Open Terminal and navigate to your project:
cd path/to/your_flutter_project
Run the Flutter App:
flutter run
- This builds and runs your app on a connected device or emulator.
Using Android Studio
- Launch Android Studio and open your Flutter project.
- Click the green Run button in the toolbar.
- Choose your emulator or physical device from the device dropdown.
- Android Studio will build and launch your app automatically.
Using Visual Studio Code
- Launch VS Code and use File > Open Folder to open your Flutter project.
- Press Ctrl + Shift + P (or Cmd + Shift + P on
macOS) to open the Command Palette.
- Search for and select Flutter: Run.
- Choose your emulator or connected device from the list.
Useful Flutter Commands:
- flutter devices - List all connected devices
- flutter run -d chrome - Run on Chrome (web)
- flutter run -d <device_id> - Run on a specific device
- flutter run --release - Run in release mode
1. Get Notification Sender ID
- Open the Firebase Console.
- Click the gear icon (⚙) next to "Project Overview" → "Project
settings".
- Click the "Cloud Messaging" tab at the top.
- Under "Firebase Cloud Messaging API (V1)" (should show Enabled), you will see a "Sender ID" field.
- Copy the Sender ID value (a numeric string).
🔎
Navigation Path: ⚙ Gear Icon → Project Settings → Cloud Messaging tab
→ Sender ID
2. Get Web Push Certificate (VAPID Key)
- Stay on the same Cloud Messaging tab in Project Settings.
- Scroll down to the "Web configuration" section.
- You will see "Web Push certificates" with a description about Application Identity key
pairs.
- If no key pair exists, click Generate key pair.
- Once generated, you will see a table with columns: Key pair, Date added,
Status, Actions.
- Copy the long string under the "Key pair" column — this is your VAPID
Key (Web Push certificate key).
🔎
Navigation Path: Project Settings → Cloud Messaging tab → Web configuration
→ Web Push certificates → Copy Key pair
3. Get Web Client ID (for Google Sign-In)
- In the Firebase Console left sidebar, go to Authentication.
- Click the "Sign-in method" tab.
- Find "Google" in the providers list and click the edit (pencil) icon.
- In the Google provider settings, you will see a collapsed section called "Web SDK
configuration".
- Click on it to expand. You will see two fields:
- Web client ID — Copy this value
- Web client secret
- Copy the Web client ID for use in the Admin Panel.
🔎
Navigation Path: Authentication → Sign-in method → Google (edit) → Web
SDK configuration → Web client ID
4. Get Firebase Service Account JSON File
- Go to Project Settings (gear icon) → "Service accounts" tab.
- You will see the Firebase Admin SDK section with a code snippet.
- Click the Generate new private key button at the bottom.
- A JSON file will be downloaded automatically. Keep this file safe — you will upload it to the
Admin Panel.
🔎
Navigation Path: ⚙ Gear Icon → Project Settings → Service accounts tab
→ Generate new private key
5. Add All Keys in Admin Panel
- Open your Admin Panel (the deployed web app).
- In the left sidebar, go to Settings (expand it).
- Click "General Settings" or "Notification Settings".
- You will see a settings page with the following fields to fill:
Admin Panel → Settings → Notification Settings:
| Field |
What to Enter |
| Notification Sender Key |
The Sender ID copied from Cloud Messaging tab |
| Web Notification Key |
The VAPID Key copied from Web Push certificates |
| Client ID for Google Login |
The Web client ID from Authentication → Google |
| Upload JSON File |
The Service Account JSON file downloaded from Firebase |
- Fill in all fields and upload the JSON file.
- Click Save to apply the settings.
1. Add Notification Key in Admin Panel
- Refer to the Notification Setup section above.
- Make sure you have added the Web Notification Key in the Admin Panel.
2. Configure Firebase Messaging in Flutter Web
- Go to your project folder: web/
- Ensure the file firebase-messaging-sw.js exists. This file handles
background notifications for the web app.
How to get Firebase config values:
- Go to Firebase Console → Project Settings (⚙) → General tab.
- Scroll down to "Your apps" section. Under your Web app, you will see the Firebase
SDK snippet with a firebaseConfig object containing your keys.
Update firebase-messaging-sw.js:
- Open web/firebase-messaging-sw.js in your code editor.
- Replace the Firebase configuration values with your own project's config:
// Give the service worker access to Firebase Messaging.
importScripts('https://www.gstatic.com/firebasejs/10.7.1/firebase-app-compat.js');
importScripts('https://www.gstatic.com/firebasejs/10.7.1/firebase-messaging-compat.js');
// Your Firebase Config
firebase.initializeApp({
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
});
const messaging = firebase.messaging();
- Replace each YOUR_* placeholder with the actual values from your Firebase
project settings.
1. Update Firebase Credentials in Landing Page
- Open the index.html,
privacy-policy.html, and
terms-and-conditions.html file in the Landing Page folder using your code
editor (VS Code, Android Studio, etc.).
- Look for the firebaseConfig object inside a <script type="module"> tag. It will look like this:
// Your Firebase Config
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
};
2. Get Firebase Credentials
- Go to the Firebase Console.
- Select your project. Click on the gear icon (⚙) next to "Project Overview" in the
left sidebar.
- Select "Project settings".
- In the "General" tab, scroll down to "Your apps" section.
- Under Web apps, you will see your registered web app (e.g., "admin_panel
(web)").
- Below it, you will see the Firebase SDK snippet with the firebaseConfig object containing all your keys (apiKey, authDomain,
projectId, etc.).
No Web App shown?
If no Web App is listed, click "Add app" → select the Web icon
(</>) → enter a nickname → click "Register app". The
firebaseConfig will then appear.
3. Replace the Config
- Copy the entire firebaseConfig object from the Firebase Console.
- Go back to your Landing Page's index.html file.
- Replace the existing firebaseConfig values with your copied values.
- Save the file.
🔎
Navigation Path: Firebase Console → ⚙ Gear Icon → Project Settings
→ General tab → Your apps → Web app → SDK setup and configuration → Copy
firebaseConfig
Here are solutions to common issues you might encounter during setup.
Flutter Issues
"flutter" is not recognized as a command
- Ensure Flutter is added to your system PATH. Restart your terminal after making changes.
- On Windows, verify via System Properties > Environment Variables.
- On macOS/Linux, check your .zshrc or .bashrc
file.
flutter doctor shows issues
- Run flutter doctor -v for detailed output.
- Install missing components as indicated by the output.
- Accept Android licenses with: flutter doctor --android-licenses
Firebase Issues
Firebase CLI not found
- Install globally: npm install -g firebase-tools
- Verify with: firebase --version
Permission denied during firebase deploy
- Ensure you're logged in: firebase login
- Check that you have Editor or Owner role in the Firebase project.
Google Maps Issues
Map shows grey/blank
- Verify your API key is correct and not restricted to a different app.
- Ensure the required Google Maps APIs are enabled in the Google Cloud Console.
- Check that billing is enabled on your Google Cloud project.
Build Issues
Build fails with Gradle errors
- Run flutter clean followed by flutter pub get.
- Check that your minSdkVersion in android/app/build.gradle is compatible with all dependencies.
iOS build fails
- Run cd ios && pod install && cd .. to reinstall iOS dependencies.
- Open ios/Runner.xcworkspace in Xcode and check for signing/provisioning
issues.
Q: Do I need a Mac to build the iOS app?
Yes. Xcode is required for building iOS apps, and Xcode only runs on macOS. You can develop and test the
Android and Web versions on Windows or Linux.
Q: Which Firebase plan do I need?
The Blaze plan (pay-as-you-go) is recommended. phone authentication, and some other
features are not available on the free Spark plan. The Blaze plan still includes a free usage tier.
Q: Can I use my own backend instead of Firebase?
eSellify is designed to work with Firebase. Using a different backend would require significant
modifications to the codebase.
Q: How do I update the app after making changes?
After making code changes, rebuild the app using the appropriate build commands (flutter build apk, flutter build web, etc.) and
redeploy.
Q: The app crashes on startup. What should I check?
- Ensure google-services.json (Android) and GoogleService-Info.plist (iOS) are correctly placed.
- Verify Firebase is properly initialized in main.dart.
- Check the console logs for error messages using flutter run --verbose.
Q: Which payment gateways are supported?
eSellify supports Stripe, Razorpay, PayPal,
Flutterwave, and Cash on Delivery (COD). You can configure your
preferred gateway in the Admin Panel settings.
Q: How do I contact support?
Version 1.0
7 April 2026
Latest