In order for you to locally run Mooncake, you will need to satisfy the following requirements:
$ flutter version 1.19.0-1.0.pre $ flutter upgrade1
An Android/iOS emulator or physical device.
The directories are separated using the Clean Architecture layers. From the inner to the outer one:
entitiescontains the data structure definition;
usecasescontains the different use cases definition;
repositoriesact as interface adapters;
uicontain respectively the database/network interfaces and all the views definition.
To make the code more simple to maintain, we used the dependency injection technique. The whole injection is handled using the
dependencies Pub package and you can find the injector definition inside the
# Code generation
If you change the definition of classes marked with
@JsonSerializable() remember to run the following command to toggle the code generation and update the generated
toJson methods as well:
flutter pub run build_runner build
If you want to try a faster sync time, you can change it from withing the
main.dart file, setting the desired
syncPeriod when creating the
In order to constantly improve the application workings, we use Firebase Analytics to track completely anonymous usage of the application by the users. This include tracking when they log in, add/remove a reaction, create a post etc.
In order to do so, we use the Flutter Firebase Plugins.
When writing code we follow the Flutter formatting guideline. To ensure your files also follow the same formatting, please run the given commands once you edited or added new files:
flutter format .
If you want to write tests, please refer the Flutter testing guide.
If you have developed a new feature, or you simply want to make sure that all tests pass, execute the following command:
flutter test --coverage test
# Run the app
To run a local version of this application, you have two options.
# Run in debug mode
To run the app in debug mode, simply open your emulator or connect a physical device and then execute:
# Run in release mode
While in debug mode, the application is never fully compiled. To make sure the changes you have made will run properly, you need to run the application in release mode.
Please note that the release mode is available only on physical devices.
To run the app on release mode simply execute:
flutter run --release
# Android setup
To run the app in release mode on an Android device, you will need to follow these steps:
Open up the
android/local.propertiesfile that you should have.
Inside the file, put the following lines:
signing.storeFile= signing.storePassword= signing.keyPassword= signing.keyAlias=1
Generate a new Keystore and associated key to sign Mooncake. You can read how to do it here: Generate an upload key in Android Studio.
signing.keyAliasvalues with the ones of the Keystore file and key you just have generated.
If you are ready to run the app in release mode, here are the steps to follow: