Setup & Installation Guide (Android & Web)

This guide will help you install and configure AeroKites Edu on your system for Android and web platforms.

🖥️ System Details:
  • Flutter Version: 3.35.1
  • Dart Version: 3.9.0
  • Node.js Version: 24.6.0
  • npm Version: 11.5.1
  • Xcode Version: 16.x
  • macOS: Sequoia 15.6
  • Firebase SDK: 10.25.0
Prerequisites

📢 Note for iOS Setup:

The detailed setup and installation steps for iOS are covered separately from Step 14 onwards. Please refer to Step 14: iOS Setup & Installation for a complete guide.

Installation Steps

Step 1: Install Node.js & npm

CRITICAL: Node.js and npm are essential for Firebase Cloud Functions deployment. The project requires Node.js 18.x as specified in functions/package.json.

A. Download & Install Node.js
B. Verify Installation

Open a terminal/command prompt and run:

node --version npm --version

You should see output similar to:

v18.19.0 # Node.js version 10.2.4 # npm version
⚠️ Important Notes:
  • Node.js 18.x is required - The project's functions/package.json specifies Node.js 18
  • npm comes bundled - No separate npm installation needed
  • Restart terminal - After installation, restart your terminal/command prompt
  • Global packages - You'll need npm for installing Firebase CLI globally
C. Install Firebase CLI

After Node.js installation, install Firebase CLI globally:

npm install -g firebase-tools

Verify Firebase CLI installation:

firebase --version

Step 2: Extract the ZIP File

After purchasing the AeroKites Edu package, extract the ZIP file into your working directory. The extracted folder will have the following structure:

Project Folder Structure

Step 3: Install Flutter & Dart

Ensure you have Flutter and Dart installed. Run the following command to check:

flutter --version

If not installed, follow the official Flutter installation guide.

Step 4: Install Node.js Dependencies

Navigate to the functions directory and install Node.js dependencies:

cd functions npm install

This installs all required packages for Firebase Cloud Functions.

Step 5: Install Flutter Dependencies

Return to the project root and install Flutter dependencies:

cd .. flutter pub get

Step 6: Configure Firebase

To set up Firebase, follow these steps:

A. Update AndroidManifest.xml

Ensure the correct package name and permissions:

AndroidManifest.xml Update
B. Update build.gradle

Verify that applicationId matches the Firebase configuration:

Build Gradle Update
C. Download and Add Firebase Configuration Files
Firebase App Register
D. Update web/index.html

Add the correct Google Sign-In Client ID:

Note: The Web Client ID is auto-generated by Firebase when Firebase Authentication is enabled.

Web Index Update
E. Update MainActivity.kt

If you change the package name, update it inside MainActivity.kt as well.

MainActivity.kt Update

Step 7: Complete Firebase Configuration & Setup

6A. Configure Authentication Methods (Overview)

For complete authentication setup including Google Sign-In, Apple Sign-In, and Email OTP, please proceed to Step 9: Configure Authentication Methods. This step covers all authentication configurations in one place since they're all managed in the same Firebase Authentication page.

6B. Firebase Cloud Messaging (FCM) - Pre-Configured

Push notifications are automatically set up when you configure Firebase:

💡 No Manual FCM Configuration Required

The app automatically handles all FCM setup. Just ensure the web/firebase-messaging-sw.js file is not deleted during deployment.

🔔 CRITICAL: Firebase Messaging Service Worker

File: web/firebase-messaging-sw.js - DO NOT DELETE!

This file is essential for web push notifications to work. Buyers must replace the Firebase configuration values with their own project details.

Without this file: Web push notifications will fail completely! 🚨

6C. Deploy Cloud Functions

Deploy the Firebase Cloud Functions for backend processing:

firebase deploy --only functions

This deploys the email functionality and other backend services.

💡 Cloud Functions Details

For complete information about all cloud functions, deployment details, and configuration requirements, see Step 10: Firebase Rules & Functions Deployment.

The functions include: Push notifications, payment processing (Razorpay/Stripe), email services (with fallback SMTP), authentication, and user management.

Note: Primary SMTP settings are configured through the app's Settings screen, while the cloud functions contain fallback configurations.

Payment Webhooks: After deployment, you'll need to configure webhook URLs in Razorpay and Stripe dashboards. See Step 10 for complete webhook setup instructions.

📧 CRITICAL: Email Template Configuration Required

File: functions/index.js - Must be updated before deployment!

This file contains email templates and fallback SMTP configurations that need your own email credentials and domain information.

Without proper configuration: Email functionality will fail completely! 🚨

Email Configuration Overview

The Cloud Functions contain multiple email templates and fallback SMTP configurations that need to be updated:

What Buyers Must Update:
💡 Important Note:

Primary SMTP Configuration: The main SMTP settings are configurable through the app's Settings > Email Settings screen. The SMTP settings in functions/index.js are fallback configurations only.

For complete email configuration instructions, see Step 10: Firebase Rules & Functions Deployment which includes detailed email template customization.

6D. Update Firebase Config

The app uses a file named firebase_options.dart to store Firebase configuration for all platforms (Android, iOS, Web).

In this project, the file is located at:

lib/firebase_options.dart

To generate your own configuration file after purchase:

flutterfire configure

This command will generate firebase_options.dart by default in the lib/ folder, which is the correct location for this project.

Important Notes:

Add Admin User & Configure SMTP Settings

Before using the app, you need to manually add an Admin User to Firebase Authentication and Firestore. Additionally, configure the SMTP email settings for notifications and registration.

A. Add Admin Email in Firebase Authentication

Navigate to Firebase Console > Authentication > Users and click Add User.

Firebase Add User

Enter the Admin Email and a temporary password, then click Add User.

Firebase User Created
B. Create Required Firestore Collections & Documents

The new setup process requires creating collections and documents in a specific order. Follow these steps:

Step 1: Create the "schools" Collection

Go to Firestore Database > Start Collection and create a collection named schools.

Create Firestore Collection
Step 2: Add First School Document

Click on the schools collection, then click "Add document" to create your first school.

In the "Add a document" dialog:

Add Document to Schools Collection
Step 2A: Create "admins" Subcollection

After creating the school document, click on it to open it, then click "Start collection" to create a subcollection named admins.

School Document Opened for Subcollection Creation
Step 2B: Add Admin Document to Subcollection

In the admins subcollection, click "Add document" to create the admin user.

In the "Add a document" dialog:

Create userSchoolMapping Collection Add Admin Document to Subcollection
Step 3: Create the "userSchoolMapping" Collection

Go back to the root level and create another collection named userSchoolMapping.

Add Document to userSchoolMapping Collection
Step 4: Add User-School Mapping Document

Click on the userSchoolMapping collection, then click "Add document" to create the mapping.

In the "Add a document" dialog:

Add userSchoolMapping Document with Fields Create Admins Subcollection
⚠️ Important Notes:
  • Collection Structure: schools → school_123456 → admins → admin_001 (with email & role fields)
  • Document ID for userSchoolMapping: Must be the exact Firebase Auth User UID
  • schoolId field: Must match the Document ID you used in the schools collection
  • Collection order: Create schools collection first, then admins subcollection, then userSchoolMapping
  • Field names: Must be exactly as shown (email, role, schoolId)
  • Admin details: Are stored in the admins subcollection under each school, not directly in the school document
C. Configure SMTP Email Settings

Email notifications in the app are used for user registration, inquiry confirmations, and other communications. The system uses custom SMTP configuration for sending emails.

Navigate to Settings > Email Settings in the application to configure your SMTP settings:

Email Settings Configuration

Configure the following SMTP settings:

Popular SMTP configurations:

After entering the details, click Save and test the configuration by sending a test email to a recipient.

⚠️ Important SMTP Configuration Notes

Port Selection: Most email providers work best with port 587 (TLS). If you experience connection timeouts, try switching between port 587 and 465.

SSL/TLS Settings: Ensure "Use SSL" is checked when using port 465, and unchecked when using port 587.

🔧 Common SMTP Issues & Solutions

Connection Timeout Errors: If you see "Unexpected socket close" or connection timeout errors:

Popular Provider Settings:

D. User Signup/Login Workflow

The user registration and authentication process follows this structured workflow:

Adding Parent or Inquiry Details by Admin
Parent/Staff Completes Registration
UID Creation Using Authentication Methods
Logging In & Setting Password
Inquiry Management & Registration

🎨 App Icon & Branding Customization

Customize the app with your school's branding by replacing icons and logos in the following locations:

📱 Android App Icons

Location: android/app/src/main/res/mipmap-*/

Sizes: 48x48 to 192x192 px

Format: PNG files

🍎 iOS App Icons

Location: ios/Runner/Assets.xcassets/AppIcon.appiconset/

Sizes: 20x20 to 1024x1024 px

Format: PNG files (no transparency)

🌐 Web Icons & PWA

Location: web/icons/ and web/favicon.png

Sizes: 192x192, 512x512 px

Format: PNG files

🎨 Static Logos

Location: assets/images/logo/

Files: logo.png, logo-sm.png, appstore.png, playstore.png

Usage: Login screens, navigation, store listings

💡 Icon Generation Tools

Use these online tools to generate all required icon sizes from your high-resolution logo:

⚠️ Important Notes:

  • Icon changes require a full app restart (not hot reload)
  • iOS App Store requires exactly 1024x1024 px icon
  • Test on physical devices after making changes
  • Keep original files as backup before replacing
🚨 CRITICAL: Firebase Messaging Service Worker

File: web/firebase-messaging-sw.js - DO NOT DELETE!

This file is essential for web push notifications to work. Buyers must replace the Firebase configuration values with their own project details.

Without this file: Web push notifications will fail completely!