Skip to content

Installation Guide

This guide covers setting up ShopSync for development. If you just want to use the app, see the Quick Start Guide instead.

Prerequisites

Before you begin, ensure you have the following installed:

Required Software

Software Minimum Version Recommended Download
Flutter SDK 3.6.0 Latest stable flutter.dev
Dart SDK 3.0.0 Included with Flutter -
Git 2.x Latest git-scm.com
Android Studio 2021.1+ Latest developer.android.com

Optional Tools

  • VS Code with Flutter extension (alternative to Android Studio)
  • Xcode (for iOS development, macOS only)
  • Chrome (for web development and debugging)

System Requirements

=== "Windows" - Windows 10 or later (64-bit) - Disk Space: 2.8 GB (IDE + SDK) - RAM: 8 GB recommended

=== "macOS" - macOS 10.15 (Catalina) or later - Disk Space: 2.8 GB (IDE + SDK) - RAM: 8 GB recommended - Xcode for iOS development

=== "Linux" - Ubuntu 20.04 or later (or equivalent) - Disk Space: 2.8 GB (IDE + SDK) - RAM: 8 GB recommended

Step 1: Install Flutter

Follow the official Flutter installation guide for your operating system:

````powershell # Download Flutter SDK from flutter.dev # Extract to C:\src\flutter # Add to PATH: C:\src\flutter\bin

flutter doctor
```

```bash # Using Homebrew brew install flutter

# Or download from flutter.dev
# Extract and add to PATH
export PATH="$PATH:`pwd`/flutter/bin"

flutter doctor
```

```bash # Download Flutter SDK cd ~/development tar xf ~/Downloads/flutter*linux**.tar.xz

# Add to PATH in ~/.bashrc or ~/.zshrc
export PATH="$PATH:$HOME/development/flutter/bin"

flutter doctor
```

Verify Installation

Run flutter doctor to check your installation:

flutter doctor
````

Expected output:
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.35.3, on macOS 14.0) [✓] Android toolchain - develop for Android devices [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.85.0) [✓] Connected device (3 available)
!!! tip "Fix Any Issues"
If `flutter doctor` shows issues, follow the provided instructions to resolve them.

## Step 2: Clone the Repository

Clone the ShopSync repository from GitHub:

```bash
git clone https://github.com/ASDev-Official/ShopSync.git
cd ShopSync

Step 3: Install Dependencies

Install all required Dart packages:

flutter pub get

This will download all dependencies defined in pubspec.yaml.

Step 4: Configure Firebase

ShopSync uses Firebase for authentication and data storage. You'll need to set up your own Firebase project.

See the detailed Firebase Setup Guide for step-by-step instructions.

Quick summary:

  1. Create a Firebase project
  2. Enable Authentication (Google Sign-In)
  3. Create a Firestore database
  4. Download configuration files:
  5. google-services.json for Android
  6. GoogleService-Info.plist for iOS (if applicable)
  7. Add files to the appropriate directories

Step 5: Verify Setup

Run the app to verify everything is set up correctly:

# List available devices
flutter devices

# Run on a specific device
flutter run -d <device-id>

# Or let Flutter choose
flutter run

IDE Setup

Android Studio

  1. Install Flutter Plugin

  2. Open Android Studio

  3. Go to SettingsPlugins
  4. Search for "Flutter"
  5. Click Install
  6. Restart Android Studio

  7. Configure Flutter SDK

  8. Go to SettingsLanguages & FrameworksFlutter

  9. Set the Flutter SDK path
  10. Click Apply

  11. Open Project

  12. FileOpen
  13. Select the ShopSync directory
  14. Wait for indexing to complete

VS Code

  1. Install Extensions

  2. Open VS Code

  3. Install the Flutter extension
  4. Install the Dart extension

  5. Configure Flutter

  6. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)

  7. Type "Flutter: Select Flutter SDK"
  8. Select your Flutter SDK path

  9. Open Project

  10. FileOpen Folder
  11. Select the ShopSync directory

Platform-Specific Setup

Android Setup

  1. Install Android Studio

Download from developer.android.com

  1. Install Android SDK

Android Studio will prompt you to install the SDK on first launch.

  1. Accept Licenses
flutter doctor --android-licenses
  1. Add Configuration Files

Copy google-services.json to:

android/app/google-services.json
  1. Create a Virtual Device (Optional)

  2. Open AVD Manager in Android Studio

  3. Click Create Virtual Device
  4. Choose a device definition
  5. Select a system image
  6. Click Finish

Web Setup

  1. Enable Web Support
flutter config --enable-web
  1. Verify Chrome Installation
flutter devices

You should see Chrome listed as an available device.

  1. Run on Web
flutter run -d chrome

iOS Setup (macOS only)

macOS Required

iOS development requires a macOS computer.

  1. Install Xcode

Download from the Mac App Store.

  1. Install Command Line Tools
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
  1. Accept License
sudo xcodebuild -license accept
  1. Add Configuration Files

Copy GoogleService-Info.plist to:

ios/Runner/GoogleService-Info.plist
  1. Install CocoaPods
sudo gem install cocoapods
cd ios
pod install

Building for Production

Android APK

flutter build apk --release

Output: build/app/outputs/flutter-apk/app-release.apk

Android App Bundle (for Play Store)

flutter build appbundle --release

Output: build/app/outputs/bundle/release/app-release.aab

Web

flutter build web --release

Output: build/web/

Troubleshooting

Common Issues

Flutter command not found

Make sure Flutter is in your PATH. Run:

echo $PATH

If Flutter isn't listed, add it to your shell configuration file.

Android licenses not accepted

Run:

flutter doctor --android-licenses

Accept all licenses when prompted.

Firebase configuration missing

Ensure you've completed the Firebase Setup and added the configuration files to the correct directories.

Gradle build failed

Clean the build:

cd android
./gradlew clean
cd ..
flutter clean
flutter pub get
CocoaPods not found (iOS)

Install CocoaPods:

sudo gem install cocoapods

Getting Help

If you encounter issues:

  1. Check the FAQ
  2. Search existing issues
  3. Ask in GitHub Discussions
  4. Create a new issue

Next Steps

Now that you have ShopSync installed:


Happy coding! 🚀