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.6
  • Dart Version: 3.9.2
  • Node.js Version: 24.6.0
  • npm Version: 11.5.1
  • Xcode Version: 16.x
  • macOS: Sequoia 15.6
  • Firebase SDK: 14.12.1
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.

Create Admin User - Complete Setup Guide

Follow these steps in order to create your first admin user. Each step is required for authentication to work.

Step 1: Create Firebase Auth User
  1. Go to Firebase Console > Authentication > Users
  2. Click "Add User" button
  3. Enter Admin Email (e.g., admin@yourschool.com)
  4. Enter a temporary password
  5. Click "Add User"
  6. Copy the User UID - you'll need this for all next steps
Create Firebase Auth User Firebase User Created - Copy UID
Step 2: Create School Document
  1. Go to Firestore Database
  2. Click "Start Collection"
  3. Collection ID: schools
  4. Click "Next"
  5. Document ID: Enter a unique ID like school_123456 (remember this for later)
  6. Leave fields empty for now, click "Save"
School Document Created
Step 3: Create Admin Subcollection
  1. Click on the school document you just created
  2. Click "Start Collection" (to create a subcollection)
  3. Collection ID: admins
  4. Click "Next"
  5. Document ID: Paste the User UID from Step 1
  6. Add fields:
    • email (string): Your admin email
    • role (string): admin
    • schoolId (string): The school document ID from Step 2
    • name (string): Admin name (optional)
  7. Click "Save"
Admins Subcollection Document Created
Step 4: Create userSchoolMapping Document (Required for Login)
  1. Go back to Firestore root level (click "Firestore Database" in sidebar)
  2. Click "Start Collection"
  3. Collection ID: userSchoolMapping
  4. Click "Next"
  5. Document ID: Paste the same User UID from Step 1
  6. Add fields:
    • email (string): Your admin email
    • role (string): admin
    • schoolId (string): The school document ID from Step 2
  7. Click "Save"
userSchoolMapping Document Created
⚠️ Critical Notes:
  • Collection Structure: schools → school_123456 → admins → {User UID} (with email, role, schoolId fields)
  • Document ID for both admins and userSchoolMapping: Must be the exact Firebase Auth User UID
  • schoolId field: Must match the Document ID you used in the schools collection
  • userSchoolMapping is REQUIRED: Without this document, login will fail even if other documents exist
  • Collection order matters: Create Firebase Auth user first, then school document, then admins subcollection, then userSchoolMapping
  • Field names: Must be exactly as shown (email, role, schoolId) - case sensitive
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!