Skip to content

Latest commit

 

History

History
210 lines (155 loc) · 6.04 KB

README.md

File metadata and controls

210 lines (155 loc) · 6.04 KB

DEMOCRACY-Client  

Build Status

The Client for the DEMOCRACY App. This includes iOS and Android generated from the same Codebase.

Systemmap

Systemmap

Tech Stack

More Dependecies

Projekt Struktur

Prerequisites

  • Node.js
  • Android Studio or Android SDK follow the installation Instructions here
  • [optional][windows] install windows-build-tools for node
    npm install --global --production windows-build-tools
    (installs python) (requireds administrator rights)
    

Contribute

Note- It is necessary to copy the .env.example to .env to start the local development.

Install Dependencies

git clone https://github.com/demokratie-live/democracy-client
cd democracy-client
yarn install
yarn pods (macOS only)

Setup React-Native Environment

ReactNative Setup

Android Workaround (currently handled by postinstall script) facebook/react-native#25822

open node_modules/@react-native-community/cli-platform-android/native_modules.gradle
replace:
def command = "node ./node_modules/react-native/cli.js config"
with
def command = "node ../../node_modules/react-native/cli.js config"

Start Developing UI

Android

cd packages/mobile-ui
yarn android
(if that gets stuck use two terminals. One for `yarn start` and one for `yarn android`)
(also make sure to use the correct java8 version: `export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/`)
(also make sure to use the correct android sdk root: `export ANDROID_SDK_ROOT=/home/{username}/Android/Sdk`)
(ignore metro bundler errors)
CMD+M and Change Bundle Location to 127.0.0.1:8088
(error should be solved)

Start virtual Android Device:

open Android Studio
create Device with API 29 or higher(?)
start device

Connect real Android Device:

adb start-server
enable usb debugging on the device
authorize host on device
verify with `adb devices`

iOS

cd packages/mobile-ui
yarn ios
(ignore metro bundler errors)
CMD+M and Configure Bundler Location to Host: 127.0.0.1 & Port: 8088
(error should be solved)

Start Developing App

Android

cd packages/mobile-app
yarn android

iOS

cd packages/mobile-app
cd ios
pod install
cd ..
yarn ios

Testing

Unit tests

cd packages/mobile-app
yarn test

or with watch mode

cd packages/mobile-app
yarn test:watch

e2e Detox iOS

cd packages/mobile-app
yarn detox build -c ios.sim.debug
yarn detox test -c ios.sim.debug

e2e Detox Android

cd packages/mobile-app
yarn detox build -c android.emu.internal.debug
yarn start
yarn detox test -c android.emu.internal.debug

Deployment

Deployment is done with Travis CI

Contributing

Anyone and everyone is welcome to contribute. Start by checking out the list of open issues.

License

Copyright © 2017-present DEMOCRACY Deutschland e.V.. This source code is licensed under the Apache 2.0 license found in the LICENSE file.

Maintainers


Manuel Ruck

Maintainer

Ulf Gebhardt

Maintainer

Toolset

BrowserStack is supporting DEMOCRACY, allowing us to use their service. Thank you for supporting the open source community! ❤️


Made with ♥ by Team DEMOCRACY (democracy-deutschland.de), startnext contributors and contributors