Coder Social home page Coder Social logo

discoos / sar-status-personnel Goto Github PK

View Code? Open in Web Editor NEW
2.0 9.0 0.0 9.04 MB

A system that gives an overview of which SAR-personell are available at any time

License: BSD 2-Clause "Simplified" License

TypeScript 68.35% HTML 16.96% CSS 12.16% JavaScript 2.54%
ionic ionic-cordova cordova android ios

sar-status-personnel's Introduction

sar-status-personnel

Hybrid-app in Ionic / Cordova for SAR personnel

Requirements

You need to have following assets available on PATH to build this app

After installing Ionic2, use the following command to check requirements

$ cordova requirements

This should produce an output similar to this

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-25,android-24,android-23
Gradle: installed /path/to/gradle

Requirements check results for ios:
Apple OS X: installed darwin
Xcode: installed 8.3.3
ios-deploy: installed 1.9.1
CocoaPods: installed

Android

Running in emulator

In order to test app on Android run following commands.

$ yarn
$ ionic cordova platform add
$ ionic cordova run android

Release to Google Play

Since this repo is public you need to fist get PRIVATE signing keys release-signing.properties, sar-status-personnel.jks and place them into platforms/android/. Once done you can release the app with following command.

Before every release remember to increace build number in config.xml

$ ionic cordova build android --prod --release

Upload platforms/android/build/outputs/apk into Google Play.

iOS

Running on emulator

$ ionic cordova run ios
$ ionic cordova run ios --device

Release to App Store

Follow this guide https://ionicframework.com/docs/intro/deploying/ .

$ ionic cordova platform add ios
$ ionic cordova build ios

sar-status-personnel's People

Contributors

kengu avatar robertsasak avatar sasstastick avatar skinnjakkebilly avatar stianmorsund avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sar-status-personnel's Issues

Synchronize status across multiple parallel logins

It is possible to login from multiple apps, on multiple devices and in multiple locations. This should be handled in an consistent manner, where at minimum the status is automatically synchronized across all online devices. Today, duplicate responses are added to the list of responses in SAR Admin for each new "yes" or "now" from same user from different app. Is state is synchronized, only the first app should be able to respond, all other should be updated with the response.

Replace font-face MyriadPro

MyriadPro requires an annual license of $29.99 for use on web (see https://typekit.com/fonts/myriad), which is unreasonable for this project at this time. We need to replace it with something similar. After some research, it seems like

are all good alternatives.

Store config vars in environment

According to factor III in the twelve-factor app, we should

Store config in the environment

This prevents us from storing sensitive configuration data like API-keys and passwords in the code which is publicly available. This however, requires us to rethink how we handle configuration. Today we use the same custom CONFIG-object in every environment which is imported whenever needed. This CONFIG should only contain default values to allow for local setup and running automatic tests. Only non-sensitive config data should be stored in git. The rest should be stored in each environment the application or the test runs, typically overriding the default values. Since this is a front-end application, process.env.* isn't available at runtime in the browser. We therefore need a solution which simulates process.env.* in the browser, injected with values only available in the server, or during build and test.

Inject config during build

  • Make the app environmentally aware using Angular 2 built inn support for this
  • Make each environment module read config values from global variable env.* defined in env.js
  • Make CONFIG object read config values from environment module
  • Add env.js as an external app asset inindex.html
  • Generate env.js from process.env.* using Ionic hooks
  • Build the app

References

Restructure sar-status repo to sar-status-personnel

Current structure is making it hard to find which repos belongs to the sar-status project. All repos are prefixed with sar-*, which is much to inclusive, since several other projects already use this prefix, and more are expected to come. Two solutions are possible

  1. Namespacing - change repo names to sar-status-api, sar-status-user, sar-status-admin
  2. Move all to one repo - all three are merged into one with subdirs api, user and admin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.