Note: This repository was previously known as swiftcomp-flutter and the app as SwiftComp. It was renamed to CompositesAI to better reflect the AI-first direction of the project.
CompositesAI is an AI-powered platform designed specifically for the composites engineering industry. Ask questions about material design, calculations, and process optimization in natural language — and get instant, expert-level answers.
- AI chat assistant for composites engineering — ask anything and get domain-specific answers instantly.
- Voice input — dictate questions hands-free.
- Image and file attachments — add context to your conversations.
- Lamina stress/strain calculator for a single layer with arbitrary fiber orientation.
- Lamina engineering constants calculator.
- Laminate stress/strain calculator.
- Laminate plate properties calculator, including ABD matrices.
- Laminate 3D properties calculator.
- UDFRC rules-of-mixtures calculator for unidirectional fiber-reinforced composites.
- Account flows for sign in, sign up, password reset, profile settings, and provider sign-in.
- Localized UI for English, Simplified Chinese, and Traditional Chinese.
- Flutter and Dart
- Provider for app state
- GetIt for dependency injection
- Local packages for domain, data, infrastructure, and shared UI components
composite_calculatorfor composite mechanics calculationsspeech_to_textfor voice inputimage_pickerfor photo and file attachments- Fastlane metadata and lanes for mobile release workflows
- Flutter stable. CI currently uses Flutter
3.44.8. - Dart
>=3.3.0 <4.0.0. - Xcode and CocoaPods for iOS builds.
- Android Studio or Android SDK tooling for Android builds.
The repository includes an .fvmrc that tracks the Flutter stable channel. If you use FVM:
fvm install
fvm flutter pub getlib/
app/ App shell and dependency injection
generated/ Generated localization files
l10n/ ARB localization sources
presentation/ Chat, tools, auth, and settings UI
util/ Shared app utilities
packages/
domain/ Use cases, entities, and repository contracts
data/ Repository implementations and API-facing data logic
infrastructure/ Auth, HTTP, token, feature flag, and platform services
ui_components/ Shared reusable UI widgets
test/ App-level widget and view model tests
integration_test/ Integration test entry point
android/ Android app and Fastlane config
ios/ iOS app and Fastlane config
- Clone the repository:
git clone https://github.com/banghuazhao/CompositesAI-flutter.git
cd CompositesAI-flutter- Create local configuration files as needed. At minimum, local development and CI expect a
.envfile to exist:
touch .envThe app also declares msal_config.json as an asset for Microsoft authentication. Keep environment-specific credentials out of commits.
- Install dependencies:
flutter pub get- Run the app:
flutter runSelect an iOS simulator, Android emulator/device, or supported web target when prompted.
Android requests its Google ID token using GOOGLE_SIGNIN_SERVER_CLIENT_ID,
which falls back to GOOGLE_SIGNIN_CLIENT_ID_WEB. This must be the registered
Web OAuth client. The backend's GOOGLE_ID_TOKEN_AUDIENCES must include that
client alongside the existing iOS and web audiences. Preserve the existing
entries when adding a client; an explicit list replaces the backend's
GOOGLE_CLIENT_ID fallback.
The backend's saved oauth.google.id_token_audiences configuration overrides
its environment value. Check both before deploying. If the environment is the
source, recreate the backend container after changing it so the new value is
loaded. Keep token audience and issuer validation enabled.
The Android app derives its Microsoft redirect URI from the installed signing
certificate, so Google Play app signing and direct installation can use their
respective callbacks. Keep the supported callback paths in
android/app/src/main/AndroidManifest.xml registered under the Android platform
of the existing Microsoft Entra app registration, using package name
com.banghuazhao.swiftcomp. The Play signing hash is
pzpR9AJC9oa2pobIHnmAa9Y2A4A=; its redirect URI is
msauth://com.banghuazhao.swiftcomp/pzpR9AJC9oa2pobIHnmAa9Y2A4A%3D.
Retain existing registered callbacks when adding this one. The bundled
MICROSOFT_ANDROID_REDIRECT_URI no longer selects the Android runtime callback.
Google Play's App content > Sign in details must declare that the app requires sign-in details and provide a reusable account with an app email and password. Use a dedicated ordinary user account with access to the app's reviewable features. Store credentials in the console, never in this repository.
Reviewer instructions: Open CompositesAI and tap Sign In to Chat. Enter the provided username and password in the Email and Password fields, then tap Sign in. Use email/password login rather than a social sign-in button. No verification code or external account is required. After saving the sign-in details, send the changes for review from Publishing overview.
Run the same checks used by CI:
flutter analyze --no-fatal-infos --no-fatal-warnings
flutter testContributions are welcome. Please read CONTRIBUTING.md before submitting a pull request.
CompositesAI is released under the MIT License. See LICENSE for details.



