This project contains the TIM reference implementation of a Messenger Client instance. It is based on the following technologies:
- Flutter
- Dart
- make sure docker is installed and docker deamon is running
- build image and start container
docker build . -t "timref_web" && docker run -p 8989:80 timref_web- alternatively you can use docker-compose
docker-compose up
this will build the web client and start a server on
IMPORTANT: Choose flutter sdk version 3.10.X - newer versions are not supported!
- Flutter 3.10.4+
- download SDK:
- see general installation instructions
- consider using Flutter Version Manager
- for Android
- Android Studio
- for iOS
- Xcode
- CocoaPods
- not necessary but recommended
- SdkMan! to switch between different java versions.
- brew or similar to install some of the dependencies
- Android Studio as standard tooling for Android-/Flutter development
To run the web client the following are required (see Requirements for helpful links).
- Flutter 3.10.4
- Browser: Current version of Google Chrome is the recommended browser. Firefox, Safari and Microsoft Edge are supported by flutter as well but are not as thoroughly tested as Google Chrome.
After running:
$ ./run.sh webthe web client can be accessed under http://0.0.0.0:8989.
- run
flutter doctorafterwards and also after each of the following steps, it will tell you what is missing$ flutter doctor
- install Android Studio
- if
flutter doctorcould not locate the JRE within the Android installation: https://stackoverflow.com/a/75134478- Install the flutter plugin. This will also install the dart plugin.
- if
- if you have IntelliJ installed
- you can use IntelliJ to import this project. When opening the project IntelliJ will install additional plugins ( restart required)
- it will install the flutter plugin plus the dart plugin. you will need to configure the path to the dart sdk (this was installed in a previous step)
- you may also need to configure the path to the android sdk in the android plugin
- install Android toolchain
- check that sdkmanager is available:
~/Library/Android/sdk/tools/bin/sdkmanager --version - install tools:
~/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest" - apparently this installer requires java. I had to ensure to use the correct java version as i would otherwise get
this exception:
java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchemai have used java 8 for the install tools step: e.g.sdk use java 8.0.362-zulu. - to accept the licenses i needed to use java 11:
- e.g.
sdk use java 11.0.18-zulu flutter doctor --android-licenses
- e.g.
- check that sdkmanager is available:
- insert your own
google-services.json-file intoandroid/app/for the push notifications to work - build the debug apk (for usage by the
messenger-testtreiber-api):
flutter build apk --debug- the .apk will be available in
build/app/outputs/flutter-apk/app-debug.apk
- the .apk will be available in
-
How to build for TestDriver application
Add
--dart-define=ENABLE_TEST_DRIVER=true --dart-define=ENABLE_DEBUG_WIDGET=trueto your build command. -
How to add visible DebugWidget
Add
--dart-define=ENABLE_DEBUG_WIDGET=true --dart-define=DEBUG_WIDGET_VISIBLE=trueto your build command.
To run all test cases in this repository use
$ flutter testPlease use dart format to properly format your code and flutter analyze scan for issues. You should do this before every commit:
dart format lib/tim test/tim
flutter analyze lib/tim test/timImmediate dependencies are listed in pubspec.yaml and pubspec.lock.
You can use the command flutter pub deps to print all dependencies.
Use flutter pub deps --no-dev instead to print runtime dependencies only, excluding development tooling.
A license report can be created by activating and using the dart license checker. Go to the directory that contains the wanted pubspec.yaml (e.g. the project directory in this case) and run:
$ dart pub global activate dart_license_checker
$ dart_license_checkerThis gives you all immediate dependencies, but there is a flag to get all transitive dependencies instead:
$ dart_license_checker --show-transitive-dependenciesSome licenses are returned as unknown, because they are not correctly displayed by https://pub.dev/. Therefore we added a list of licenses and of all transitive dependencies as text files.
Refer to this guide.
Further information about the usage of the HBA authentication is listed here.
Further information about privacy is listed here.
- Connection to the homeserver (Synapse) via Messenger Proxy
- Connection to Keycloak for authentication
- Connection to the VZD in order to change visibility
- Connection to Push Gateway for receiving Push Notifications
