Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.
/ superapp_archive Public archive

The Archived Super-app, to remind us of our roots

Notifications You must be signed in to change notification settings

heacare/superapp_archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

711 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Happily Ever After

format-code backend app app-build fastlane-beta

Story

When Happily Ever After started, we had a vision for universal preventive healthcare. Our initial approach was a superapp that did everything, which we quickly realised was vastly inferior to a solution promoting collaboration and a federation of interoperable apps (go web3!). Thus, Happily Ever After evolved from an all-in-one health super app, to an ecosystem that prides itself on collaboration, open-source tools and shared meaning.

We are archiving this project here to remind us of our roots, and to be public about our past experiments and their outcomes ✨

Developing (App)

Requirements

  1. Flutter
  2. (Android) Android SDK
    • Android Studio
    • or Android SDK command-line tools and JDK
      • Set ANDROID_SDK_ROOT
        export ANDROID_SDK_ROOT="$HOME/android-sdk"
        
        • Add the above to your .bashrc or .zshrc
      • Extract command-line tools into $ANDROID_SDK_ROOT/cmdline-tools/latest
        mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools"
        cd "$ANDROID_SDK_ROOT/cmdline-tools"
        unzip $PATH_TO_ZIP
        mv cmdline-tools latest
        
      • Add $ANDROID_SDK_ROOT/cmdline-tools/latest/bin to PATH
        export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$PATH"
        
        • Add the above to your .bashrc or .zshrc
      • Install Android 12 SDK
        sdkmanager "platform-tools" "build-tools;32.0.0" "platforms;android-32"
        
      • Accept licenses
        flutter doctor --android-licenses
        
    • or brew install android-sdk
  3. (iOS) Xcode
    • Install command-line tools
      sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer`
      sudo xcodebuild -runFirstLaunch
      
    • Accept licenses
      sudo xcodebuild -license
      
  4. Existing emulator
    • (Android) Create device using AVD Manager or avdmanager
      sdkmanager "system-images;android-31;google_apis_playstore;x86_64"
      avdmanager create avd --name flutter_emulator --package "system-images;android-31;google_apis_playstore;x86_64" --device pixel_5
      flutter emulators --launch flutter_emulator
      
    • You might want to enable hardware keyboard by setting this property in ~/.android/avd/flutter_emulator.avd/config.ini:
      hw.keyboard = yes
      
    • (iOS) Start Simulator
      flutter emulators --launch apple_ios_simulator
      
  5. Check Flutter setup
    flutter doctor
    

Setup

git clone git@github.com:happilyeveraftercorp/hea.git
cd hea/app

If you're working on iOS, run the following to obtain the code-signing certificates:

bundle exec fastlane development_pull

If you're working on Android, ask Ambrose for the debug keystore file. See the section on Google Maps and Google Fit for more details.

Running

flutter pub run build_runner build # only when schemas have changed
flutter run
flutter run --device-id DEVICE_ID
# For a list of devices
flutter devices

Adding Flutter dependencies

flutter pub add NAME

Even on Linux, you might need to update Podfile.lock by installing CocoaPods and running pod update:

gem install cocoapods
cd ios; pod update; cd ..

Managing code-signing certificates

To synchronise the list of development devices, run:

bundle exec fastlane development_sync

For other operations, see the documentation for the match command-line tool.

Configuring Firebase

You only need to do this to change the Firebase project

  1. dart pub global activate flutterfire_cli
    • Depends on Firebase CLI
      • npm install -g firebase-tools
      • Login with your Google Account that has been granted access to the development Firebase project
  2. flutterfire configure --project happily-ever-after-4b2fe --ios-bundle-id care.hea.app --android-app-id care.hea.app
Firebase project Purpose
happily-ever-after-4b2fe Development, testing and inital version

Google Maps and Google Fit

Current API keys:

  • Google Fit
    • Relies on the app's certificate, so the debug keystore SHA-1 needs to be registered in CGP
    • Ambrose owns an already-registered debug keystore file.
  • Google Maps (Ambrose's private project)
    • Eventually need to be replaced with an official release API key in the project and add security measures

Developing (Backend)

Requirements

Setup

git clone git@github.com:happilyeveraftercorp/hea.git
cd hea/backend

Running

docker-compose -f docker-compose.dev.yml up -d db adminer

About

The Archived Super-app, to remind us of our roots

Resources

Stars

Watchers

Forks

Contributors 7