Skip to main content

System Requirements

Before installing, ensure your development environment meets these requirements:

Development Machine

  • OS: macOS 10.14 (Mojave) or later
  • RAM: 8 GB minimum (16 GB recommended)
  • Disk: 10 GB free space
  • Xcode: Latest version (for iOS development)
  • CocoaPods: Latest version

Required Software

Flutter SDK

Version: 3.7.2 or higherRequired for cross-platform development

Dart SDK

Version: Included with FlutterAutomatically installed with Flutter

Git

Version: 2.x or higherFor version control

Node.js

Version: 14.x or higherRequired for Firebase CLI

Step 1: Install Flutter SDK

1
Download Flutter
2
Visit the official Flutter website:
3
macOS
# Download Flutter SDK
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.7.2-stable.zip

# Extract the archive
unzip flutter_macos_3.7.2-stable.zip

# Move to desired location
sudo mv flutter /usr/local/flutter
Windows (PowerShell)
# Download from:
# https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.7.2-stable.zip

# Extract to C:\src\flutter
# Add to PATH via System Environment Variables
Linux
# Download Flutter SDK
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.2-stable.tar.xz

# Extract the archive
tar xf flutter_linux_3.7.2-stable.tar.xz

# Move to desired location
sudo mv flutter /usr/local/flutter
4
Add Flutter to PATH
5
Make Flutter accessible from your terminal:
6
macOS/Linux (Bash)
# Edit your shell profile
nano ~/.bashrc  # or ~/.zshrc for zsh

# Add this line:
export PATH="$PATH:/usr/local/flutter/bin"

# Apply changes
source ~/.bashrc  # or source ~/.zshrc
macOS/Linux (Fish)
# Edit Fish config
nano ~/.config/fish/config.fish

# Add this line:
set -gx PATH $PATH /usr/local/flutter/bin

# Reload config
source ~/.config/fish/config.fish
Windows (PowerShell as Admin)
# Add to System PATH
[System.Environment]::SetEnvironmentVariable(
  'Path',
  [System.Environment]::GetEnvironmentVariable('Path', 'Machine') + ';C:\src\flutter\bin',
  'Machine'
)
7
Verify Installation
8
Confirm Flutter is correctly installed:
9
flutter --version
10
Expected output:
11
Flutter 3.7.2 • channel stable
Framework • revision xxx
Engine • revision xxx
Tools • Dart 3.7.2 • DevTools 2.x.x
12
Run Flutter Doctor
13
Check for any missing dependencies:
14
flutter doctor -v
15
This command checks:
16
  • ✓ Flutter SDK installation
  • ✓ Connected devices
  • ✓ Android toolchain (if developing for Android)
  • ✓ Xcode (if developing for iOS on macOS)
  • ✓ VS Code / Android Studio setup
  • 17
    Address any issues marked with [✗] or [!] before proceeding.

    Step 2: Set Up Development Environment

    Choose your preferred IDE:

    Install VS Code

    Download from code.visualstudio.com

    Install Flutter Extensions

    1. Open VS Code
    2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
    3. Install:
      • Flutter (by Dart Code)
      • Dart (automatically installed with Flutter)

    Configure VS Code

    settings.json
    {
      "dart.flutterSdkPath": "/usr/local/flutter",
      "dart.debugExternalLibraries": true,
      "dart.debugSdkLibraries": false,
      "[dart]": {
        "editor.formatOnSave": true,
        "editor.rulers": [80]
      }
    }
    

    Step 3: Android Setup (Optional)

    If developing for Android:
    1
    Install Android Studio
    2
    Required even if using VS Code (for Android SDK).
    3
    Install Android SDK
    4
  • Open Android Studio
  • Go to SDK Manager
  • Install:
    • Android SDK Platform (API 33 or higher)
    • Android SDK Build-Tools
    • Android SDK Platform-Tools
    • Android SDK Command-line Tools
  • 5
    Accept Android Licenses
    6
    flutter doctor --android-licenses
    
    7
    Type y to accept all licenses.
    8
    Create Android Emulator
    9
    # List available device definitions
    flutter emulators
    
    # Create new emulator
    avdmanager create avd -n flutter_emulator -k "system-images;android-33;google_apis;x86_64"
    
    # Launch emulator
    flutter emulators --launch flutter_emulator
    

    Step 4: iOS Setup (macOS Only)

    1
    Install Xcode
    2
    Download from the Mac App Store (free, requires Apple ID).
    3
    Install Command Line Tools
    4
    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -runFirstLaunch
    
    5
    Install CocoaPods
    6
    sudo gem install cocoapods
    
    7
    Accept Xcode License
    8
    sudo xcodebuild -license accept
    
    9
    Create iOS Simulator
    10
    # Open simulator
    open -a Simulator
    
    # Or launch via Flutter
    flutter emulators --launch apple_ios_simulator
    

    Step 5: Firebase Setup

    1
    Install Firebase CLI
    2
    Install globally via npm:
    3
    npm install -g firebase-tools
    
    4
    Verify installation:
    5
    firebase --version
    
    6
    Install FlutterFire CLI
    7
    dart pub global activate flutterfire_cli
    
    8
    Add to PATH if needed:
    9
    # macOS/Linux
    export PATH="$PATH:$HOME/.pub-cache/bin"
    
    # Add to ~/.bashrc or ~/.zshrc for persistence
    
    10
    Authenticate with Firebase
    11
    firebase login
    
    12
    This opens a browser for Google authentication.
    13
    Create Firebase Project
    14
    Via Console
    1. Go to Firebase Console
    2. Click Add project
    3. Enter project name (e.g., “restaurant-reservations”)
    4. Accept terms and click Continue
    5. Disable Google Analytics (or configure)
    6. Click Create project
    7. Wait for provisioning to complete
    Via CLI
    # Create new Firebase project
    firebase projects:create restaurant-reservations
    
    # Set default project
    firebase use restaurant-reservations
    
    15
    Enable Firestore Database
    16
  • In Firebase Console, navigate to BuildFirestore Database
  • Click Create database
  • Select location (choose closest region)
  • Start in Test mode for development
  • Click Enable
  • 17
    Test mode allows unrestricted access. Update security rules before production:
    rules_version = '2';
    service cloud.firestore {
      match /databases/{database}/documents {
        match /{document=**} {
          allow read, write: if request.auth != null;
        }
      }
    }
    
    18
    Enable Firebase Authentication
    19
  • Go to BuildAuthentication
  • Click Get started
  • Enable providers:
    • Email/Password: Toggle on
    • Google: Toggle on, add support email
  • Click Save
  • 20
    Configure Firebase Hosting (Optional)
    21
    For web deployment:
    22
    # Initialize hosting
    firebase init hosting
    
    # Select options:
    # - Public directory: build/web
    # - Single-page app: Yes
    # - GitHub auto-deploy: No (or Yes if desired)
    

    Step 6: Clone and Configure Project

    1
    Clone Repository
    2
    git clone <repository-url>
    cd app_restaurante
    
    3
    Install Dependencies
    4
    flutter pub get
    
    5
    This installs packages from pubspec.yaml:
    6
    dependencies:
      flutter:
        sdk: flutter
      
      # Firebase
      firebase_core: ^3.3.0
      firebase_auth: ^5.1.0
      cloud_firestore: ^5.6.12
      google_sign_in: ^6.2.1
      
      # State Management
      flutter_bloc: ^8.1.3
      
      # Dependency Injection
      get_it: ^7.6.4
      
      # Routing
      go_router: ^13.0.0
      
      # Utilities
      uuid: ^4.0.0
    
    7
    Configure Firebase for Flutter
    8
    Run FlutterFire configuration:
    9
    flutterfire configure
    
    10
    Configuration steps:
    11
  • Select Firebase project: Choose your created project
  • Select platforms:
    • Android
    • iOS
    • Web
    • macOS (optional)
    • Windows (optional)
  • Android package name: Use com.example.app_restaurante or customize
  • iOS bundle ID: Use com.example.appRestaurante or customize
  • 12
    This generates lib/firebase_options.dart with platform-specific configuration.
    13
    Create Firebase Configuration File
    14
    Create .firebaserc in project root:
    15
    {
      "projects": {
        "default": "your-firebase-project-id"
      }
    }
    
    16
    Replace your-firebase-project-id with your actual project ID from Firebase Console.
    17
    Configure Firestore Security Rules
    18
    Update firestore.rules:
    19
    rules_version = '2';
    service cloud.firestore {
      match /databases/{database}/documents {
        // Business profiles - owners only
        match /negocios/{negocioId} {
          allow read: if true;
          allow write: if request.auth != null && request.auth.uid == resource.data.propietarioId;
        }
        
        // Tables - public read, owner write
        match /mesas/{mesaId} {
          allow read: if true;
          allow write: if request.auth != null;
        }
        
        // Reservations - authenticated users
        match /reservas/{reservaId} {
          allow read: if request.auth != null;
          allow create: if true; // Allow guest reservations
          allow update, delete: if request.auth != null;
        }
        
        // Operating hours - public read, owner write
        match /horarios/{horarioId} {
          allow read: if true;
          allow write: if request.auth != null;
        }
      }
    }
    
    20
    Deploy rules:
    21
    firebase deploy --only firestore:rules
    
    22
    Download Google Services Files
    23
    Android
    1. In Firebase Console, go to Project Settings
    2. Select your Android app
    3. Download google-services.json
    4. Place in: android/app/google-services.json
    iOS
    1. In Firebase Console, go to Project Settings
    2. Select your iOS app
    3. Download GoogleService-Info.plist
    4. Place in: ios/Runner/GoogleService-Info.plist
    Update Xcode:
    • Open ios/Runner.xcworkspace in Xcode
    • Drag GoogleService-Info.plist into Runner folder
    • Ensure “Copy items if needed” is checked

    Step 7: Initialize Database

    Set up initial data in Firestore:

    Create Business Collection

    1. Go to Firestore Database
    2. Click Start collection
    3. Collection ID: negocios
    4. Add first document:
    {
      "nombre": "Demo Restaurant",
      "email": "[email protected]",
      "telefono": "+1234567890",
      "direccion": "123 Main Street",
      "propietarioId": "<your-auth-uid>",
      "maxDiasAnticipacionReserva": 14,
      "duracionPromedioMinutos": 60,
      "imagenUrl": null
    }
    

    Create Tables Collection

    Collection ID: mesas
    // Mesa 1
    {
      "nombre": "Mesa 1",
      "capacidad": 2,
      "negocioId": "<negocio-document-id>",
      "activa": true
    }
    
    // Mesa 2
    {
      "nombre": "Mesa 2",
      "capacidad": 4,
      "negocioId": "<negocio-document-id>",
      "activa": true
    }
    

    Create Operating Hours

    Collection ID: horarios
    {
      "negocioId": "<negocio-document-id>",
      "diaSemana": 1,  // Monday = 1, Sunday = 7
      "horaApertura": "11:00",
      "horaCierre": "22:00",
      "cerrado": false
    }
    
    Repeat for all 7 days of the week.

    Step 8: Build and Run

    1
    Verify Configuration
    2
    Run Flutter doctor to ensure everything is set up:
    3
    flutter doctor -v
    
    4
    All checks should show [✓].
    5
    Check Connected Devices
    6
    flutter devices
    
    7
    Expected output:
    8
    2 connected devices:
    
    Pixel 5 (mobile) • emulator-5554 • android • Android 13 (API 33)
    Chrome (web)     • chrome        • web     • Google Chrome 110.0
    
    9
    Run in Debug Mode
    10
    flutter run
    
    11
    Or specify a device:
    12
    # Run on specific device
    flutter run -d <device-id>
    
    # Run on Android emulator
    flutter run -d emulator-5554
    
    # Run on iOS simulator
    flutter run -d "iPhone 14 Pro"
    
    # Run on Chrome
    flutter run -d chrome
    
    13
    Build Release Version
    14
    Android APK
    # Build APK
    flutter build apk --release
    
    # Output: build/app/outputs/flutter-apk/app-release.apk
    
    # Build App Bundle (for Play Store)
    flutter build appbundle --release
    
    iOS
    # Build iOS (requires macOS and Xcode)
    flutter build ios --release
    
    # Create IPA archive
    cd ios
    xcodebuild -workspace Runner.xcworkspace \
      -scheme Runner \
      -configuration Release \
      -archivePath build/Runner.xcarchive \
      archive
    
    Web
    # Build web application
    flutter build web --release
    
    # Deploy to Firebase Hosting
    firebase deploy --only hosting
    

    Verification Checklist

    • Flutter 3.7.2+ installed
    • flutter --version works
    • flutter doctor shows no errors
    • PATH configured correctly
    • Firebase project created
    • Firestore enabled
    • Authentication enabled (Email, Google)
    • firebase_options.dart generated
    • .firebaserc configured
    • Security rules deployed
    • Repository cloned
    • Dependencies installed (flutter pub get)
    • Google services files in place
    • Build succeeds without errors
    • Business document created
    • Tables added to Firestore
    • Operating hours configured
    • Test data populated

    Troubleshooting Common Issues

    Android toolchain issues:
    flutter doctor --android-licenses
    
    Xcode issues (macOS):
    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -runFirstLaunch
    
    Command-line tools not found:
    • Open Android Studio → SDK Manager → SDK Tools
    • Install “Android SDK Command-line Tools”
    Error: “FirebaseException: [core/no-app]”Solution:
    1. Verify firebase_options.dart exists
    2. Check main.dart initializes Firebase:
    await Firebase.initializeApp(
      options: DefaultFirebaseOptions.currentPlatform,
    );
    
    1. Run flutterfire configure again
    Android: Place google-services.json in android/app/iOS:
    1. Open ios/Runner.xcworkspace in Xcode
    2. Right-click Runner folder
    3. Add Files to “Runner”
    4. Select GoogleService-Info.plist
    5. Check “Copy items if needed”
    Error: “Could not resolve firebase-bom”Solution: Update android/build.gradle.kts:
    dependencies {
      classpath("com.google.gms:google-services:4.4.0")
    }
    
    Then run:
    cd android
    ./gradlew clean
    cd ..
    flutter clean
    flutter pub get
    flutter run
    
    Solution:
    cd ios
    pod repo update
    pod install --repo-update
    cd ..
    flutter clean
    flutter run
    
    If still failing:
    sudo gem install cocoapods
    pod setup
    

    Environment Variables

    For production deployment, configure:
    .env.example
    # Firebase Configuration
    FIREBASE_PROJECT_ID=your-project-id
    FIREBASE_API_KEY=your-api-key
    
    # Email Service
    EMAIL_SERVICE_URL=https://your-function-url
    
    # SMS Service (optional)
    SMS_API_KEY=your-sms-api-key
    
    Never commit .env files to version control. Add to .gitignore.

    Next Steps

    Now that your environment is set up:

    Quickstart Guide

    Create your first reservation in under 10 minutes

    Architecture Overview

    Understand the system design and code structure

    API Reference

    Explore use cases and repository interfaces

    Deployment Guide

    Deploy to production environments

    Additional Resources

    For questions or issues, check the project repository’s Issues section or consult the team documentation.

    Build docs developers (and LLMs) love