Skip to content

Latest commit

 

History

History
190 lines (130 loc) · 4.92 KB

README.md

File metadata and controls

190 lines (130 loc) · 4.92 KB

Afrodite

Afrodite is a dating app. This repository contains the frontend part. Backend repository

The app is under development and it is not ready for production.

Profiles view screenshot

Features

Check features.md.

Building and running

Tagged development preview versions (0.x) of frontend and backend with the same minor version number are compatible with each other. Main branch might be broken or incompatible with the backend.

  1. Install dependencies.

  2. Add placeholder files. If building for iOS then also add missing iOS project files.

  3. Build and run the frontend.

flutter devices
flutter run --release -d DEVICE
  1. Optionally install development dependencies.

  2. Optionally add push notification and Sign in with Google support.

Dependencies

Android builds (on Ubuntu 22.04 and macOS)

  1. Install Rust.

  2. Install Android Rust 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
  1. Install Flutter.

iOS builds (on macOS)

  1. Install Rust.

  2. Install iOS Rust targets.

rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
rustup target add x86_64-apple-ios
  1. Install CocoaPods.

    https://guides.cocoapods.org/using/getting-started.html#sudo-less-installation

  2. Install Flutter.

Development dependencies

Makefile commands starting with watch requires fswatch.

# Ubuntu
sudo apt install fswatch
# macOS with Homebrew package manager
brew install fswatch

Commands make watch-translations, make watch-translations-linux and make update-translations requires xml2arb.

Commands make watch-freezed-code and make update-freezed-code requires icegen.

Command make update-api-bindings requires openapi-generator-cli.

  1. Install node version manager (nvm) https://github.com/nvm-sh/nvm
  2. Install latest node LTS with nvm. For example nvm install 18
  3. Install openapi-generator from npm. npm install @openapitools/openapi-generator-cli -g
  4. Start backend in debug mode.
  5. Run make update-api-bindings.

Command make update-licenses-for-native-utils requires cargo-about.

Placeholder files needed for compiling the project

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 "";
}

Add missing iOS project files

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.

About Assets

Sign in with Google buttons are from https://developers.google.com/static/identity/images/signin-assets.zip ZIP file found from https://developers.google.com/identity/branding-guidelines.

Add push notification and Sign in with Google support

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

Questions and answers

Check backend README.md.

Contributions

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).

License

MIT License or Apache License 2.0