
How I Built An Enterprise Team Collaboration App With AWS Backend
Steps to build a chat app for enterprise team communication in Flutter with AWS backend using a pre-built solution. The overall platform can be self-hosted on AWS, with storage in S3 bucket, SNS for push notifications, and Cognito for access permissions.
This guide shows you how to build an enterprise team collaboration app in Flutter. It covers requirements, SDK setup and the actual step-by-step build on how to use the code to handle messaging and calling infrastructure. I’ve used AWS here as a layer for storage, authentication, and push notifications.
Requirements
Before starting the build, here are the list of technologies to get started with:
Tech requirements:
- Flutter SDK (stable channel)
- MirrorFly License Key
- Android Studio or VS Code with Flutter/Dart plugins
- Android Lollipop 5.0 (API Level 21) or above
- iOS 13.0 and higher
- Java 8 or higher
- Gradle 4.1.0 or higher
- targetSdkVersion 34 or above
- compileSdk 34
- AWS Account
- Local AWS CLI configuration
Features to be integrated in this build:
- One-to-one and group messaging
- Voice and video calling
- File and media sharing
- Channels for team-wide announcements
- Push notifications
- Admin controls for managing users and permissions
- Media storage in Amazon S3, served through CloudFront
- User Directory & Admin Permissions (Amazon Cognito)
- Push Delivery (Amazon SNS)
Step-by-Step Guide to Build an Enterprise Team Collaboration App
Before starting the build for the communication app, ensure the following setup for AWS is done.

- To store media and files, create an S3 bucket team-app-media-prod
- Add Cloudfront in front of the S3 bucket as a delivery layer.
- Setup authentication and access permissions to users with Amazon Cognito
- Connect Apple Push Notification service (APNs) and Firebase Cloud Messaging (FCM) with Amazon SNS.
- For each of these AWS services, keep the credentials and ID ready for this build.
Step 1: Get MirrorFly License Key
- Sign up for MirrorFly Console
- Once you’re in the “Overview Page” you can find the license key for integration.
- Copy the license key from the “Application Info” section.
Step 2: Create Android Dependency
Add the below code to your root build.gradle file in your Android Folder
allprojects { repositories { ... ... jcenter() maven { url "https://repo.mirrorfly.com/release" } }}Also, include this in the app/build.gradle
android { compileSdk 34 ... defaultConfig { ... minSdkVersion 21 targetSdkVersion 34 // or higher }}Step 3: Create iOS Dependency
Add the below code at the end of ios/Podfile
post_install do |installer| installer.aggregate_targets.each do |target| target.xcconfigs.each do |variant, xcconfig| xcconfig_path = target.client_root + target.xcconfig_relative_path(variant) IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR")) end end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1' config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No' config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = 'arm64' shell_script_path = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh" if File::exist?(shell_script_path) shell_script_input_lines = File.readlines(shell_script_path) shell_script_output_lines = shell_script_input_lines.map { |line| line.sub("source=\"$(readlink \"${source}\")\"", "source=\"$(readlink -f \"${source}\")\"") } File.open(shell_script_path, 'w') do |f| shell_script_output_lines.each do |line| f.write line end end end end endend
Now, enable the below-mentioned capabilities
Goto Project -> Target -> Signing & Capabilities -> Click + at the top left corner -> Search for the capabilities belowWhen adding the Background Modes, enable the Remote Notifications to align with SNS/ APNs.
Capabilities – Add Groups

Step 4: Create Flutter Dependency
Add the below dependencies in pubspec.yaml
Dependencies:mirrorfly_plugin: ^1.5.0amplify_flutter: ^1.6.0amplify_auth_cognito: ^1.6.0amplify_storage_s3: ^1.6.0Run the flutter pub get command in your project directory.
import 'package:mirrorfly_plugin/mirrorfly.dart';import 'package:amplify_flutter/amplify_flutter.dart';import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';import 'package:amplify_storage_s3/amplify_storage_s3.dart';Step 5: Initialize MirrorFly Plugin
To initialize the MirrorFly plugin, use the below code in your main.dart before runApp()
void main(){ WidgetsFlutterBinding.ensureInitialized();
// Configure Amplify (Cognito auth + S3 storage) await Amplify.addPlugins([ AmplifyAuthCognito(), AmplifyStorageS3(), ]); await Amplify.configure(amplifyconfig);
Mirrorfly.initializeSDK( licenseKey: LICENSE_KEY, iOSContainerID: iOS_APP_GROUP_ID, chatHistoryEnable: ENABLE_CHAT_HISTORY, enableDebugLog: ENABLE_DEBUG_LOG, // to enable logs for debug flyCallback: (FlyResponse response) { runApp(const MyApp()); } );}
Step 6: Add Login Feature
Use the below code to login a user in sandbox Live mode. It will automatically establish a connection upon completion of registration and eliminate a separate login.
The user first signs in through the Cognito User Pool. After their identity is verified, MirrorFly also uses the same identity to authenticate them - user identity is consistent across both systems.
// Sign in via Cognito, then connect to MirrorFly with the verified identityfinal authResult = await Amplify.Auth.signIn( username: userIdentifier, password: password,); if (authResult.isSignedIn) {
Mirrorfly.login(userIdentifier: userIdentifier, fcmToken: token, isForceRegister: isForceRegister, identifierMetaData: identifierMetaData, flyCallback: (FlyResponse response) { if(response.isSuccess && response.hasData){ // you will get the user registration response var userData = registerModelFromJson(value); }});}
Step 7: Send a One-to-One Message
Add the below code to send a text message to other user
var textMessage = MessageParams.text( toJid: toJid, replyMessageId: replyMessageId, // Optional topicId: topicId, // Optional textMessageParams: TextMessageParams(messageText: messageText); Mirrorfly.sendMessage(messageParams: textMessage, flyCallback: (response){ if(response.isSuccess){ }});Instead of sending the attachments inline, they go through S3/ CloudFront
Future<void> sendFileMessage(String toJid, String localFilePath) async { final key = 'attachments/${DateTime.now().millisecondsSinceEpoch}'; await Amplify.Storage.uploadFile( localFile: AWSFile.fromPath(localFilePath), key: key, ).result; final fileUrl = 'https://your-distribution.cloudfront.net/$key'; var fileMessage = MessageParams.file( toJid: toJid, fileMessageParams: FileMessageParams(fileUrl: fileUrl), ); Mirrorfly.sendMessage(messageParams: fileMessage, flyCallback: (response) { if (response.isSuccess) { // message with the S3-backed, CloudFront-served URL is sent } });}
Step 8: Receive a One-to-One Message
Add the below code to enable listeners to receive new message from other user.
Mirrorfly.onMessageReceived.listen(result){ // you will get the new messages var chatMessage = sendMessageModelFromJson(result)}To enable push notifications in the background, route the device tokens to SNS platform endpoints.
Future<void> registerForPush(String token) async { await http.post( Uri.parse('https://your-api-id.execute-api.region.amazonaws.com/register'), body: jsonEncode({'token': token, 'platform': Platform.isIOS ? 'APNS' : 'GCM'}), );}
By this step you have a fully functional AWS-backed team collaboration app for your enterprise. But to add more features, make use of this documentation .
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article