Afrodite is a permissively licensed dating app based on profile browsing. This repository contains the frontend part.
The app is under development and it is not ready for production.
- Install node version manager (nvm) https://github.com/nvm-sh/nvm
- Install latest node LTS with nvm. For example
nvm install 18
- Install openapi-generator from npm.
npm install @openapitools/openapi-generator-cli -g
- Start Afrodite backend in debug mode.
- Generate bindings
openapi-generator-cli generate -i http://localhost:3000/api-doc/app_api.json -g dart -o api_client
dart run build_runner build
brew install dnsmasq
/opt/homebrew/etc/dnsmasq.conf
listen-address=::1,127.0.0.1
address=/DOMAIN/10.0.2.2
port=5353
And start DNS
/opt/homebrew/opt/dnsmasq/sbin/dnsmasq -d -q --keep-in-foreground -C /opt/homebrew/etc/dnsmasq.conf
./Library/Android/sdk/platform-tools/adb devices
telnet 127.0.0.1 5554
Run make update-localizations
The localizations are in the translations
Android Studio project to make
editing translations easier.
-
Install native code building dependencies. Instructions for that are in this file.
-
Start Android emulator and run
flutter run
.
Google Sign In with buttons are from https://developers.google.com/static/identity/images/signin-assets.zip zip file found from https://developers.google.com/identity/branding-guidelines
-
Install Rust
-
Instal targets
rustup target add aarch64-linux-android
rustup target add armv7-linux-androideabi
rustup target add i686-linux-android
rustup target add x86_64-linux-android
-
Build app normally
-
If Rust dependencies are changed download cargo about and update LICENSE file of native_utils_ffi Dart package:
cargo install cargo-about --locked
make update-licenses-for-native-utils
- Install cocoapods
https://guides.cocoapods.org/using/getting-started.html#sudo-less-installation
-
Xcode and related tools are also needed
-
Install Rust targets
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
rustup target add x86_64-apple-ios
If you modify the Firebase projects from Firebase web UI, you can update Firebase related config using command
flutterfire configure
Install instructions for that tool is at https://firebase.google.com/docs/flutter/setup?platform=android
Create Visual Studio Code launch configuration like this:
{
"name": "app (Flutter Chrome)",
"program": "lib/main.dart",
"deviceId": "chrome",
"request": "launch",
"type": "dart",
"args": [
"--wasm",
"--web-hostname",
"localhost",
"--web-port",
"51758",
"--web-browser-flag",
"--disable-web-security",
]
}
The port must be 51758 as Sign in with Google authorized JavaScript origins config currently includes URL http://localhost:51758
The backend runs on port 3000 so web security needs to be disabled.
Add web client ID by modifying web/index.html line
<meta name="google-signin-client_id" content="TODO">
Add iOS client ID by modifying ios/Runner/Info.plist location
<!-- Copied from downloaded OAuth 2 client info. Value for key REVERSED_CLIENT_ID. -->
<string>TODO</string>
Enable gradle plugin for Google Services from android/app/build.gradle
// START: FlutterFire Configuration
// Uncomment the following line if you have google-services.json added
// id 'com.google.gms.google-services'
// END: FlutterFire Configuration
Also add files
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
lib/firebase_options.dart
lib/sign_in_with_google_ids.dart
firebase.json
lib/firebase_options.dart
import 'package:firebase_core/firebase_core.dart';
class DefaultFirebaseOptions {
static const FirebaseOptions currentPlatform = FirebaseOptions(
apiKey: '',
appId: '',
messagingSenderId: '',
projectId: '',
);
}
lib/sign_in_with_google_ids.dart
String signInWithGoogleBackendClientId() {
return "";
}
The file ios/Runner.xcodeproj is not included in the repository as it contains development team ID. It can be created with following commands
cd afrodite-frontend
flutter create --platforms ios --project-name app .
Other new files or changes which flutter create
command creates can be
removed.
Only bug fixes or documentation improvements are accepted at the moment.
Contributions must have the same license as the project (dual-licensed with MIT and Apache 2.0).
MIT License or Apache License 2.0