Building a Flutter + Salesforce Sample App: Building and Deploying (3/3)

In the previous articles, we covered how to configure Salesforce, Firebase, and your environment files. Now that everything is set up, it’s time to run, build, and deploy the Salesforce Sample App.

Running the Flutter App Locally

The project includes a Makefile designed to streamline development. Instead of manually typing long Flutter commands, you can use a single entry point:

make dev

This launches an interactive menu that lets you choose how you want to run the app.

Web

  • Runs on port 8686, matching the Salesforce OAuth callback.
  • Starts a local development server with hot reload.

Mobile (iOS or Android)

  • Automatically opens the Simulator or Emulator.
  • Passes environment configurations so you don’t have to.

This workflow ensures quick feedback loops during development without the overhead of manual command management.

Deploying Firebase Cloud Functions

Backend logic—such as token handling, Salesforce API proxying, and secure server operations—lives under the functions directory as a TypeScript project. Deploying your backend is also handled through a single Makefile command:

make deploy-functions

This performs two critical steps:

  1. Ensures all TypeScript and Firebase dependencies are ready.
  2. Uploads only the Cloud Functions without affecting other Firebase services.

Once deployed, your backend will instantly be live, powering authentication and Salesforce data access for your app.

Leave a comment