GithubHelp home page GithubHelp logo

datagovsg / beeline-frontend Goto Github PK

View Code? Open in Web Editor NEW
51.0 11.0 14.0 44.12 MB

Source Code for Beeline's mobile app

Home Page: https://app.beeline.sg/

License: MIT License

JavaScript 85.94% HTML 4.27% CSS 9.78%

beeline-frontend's Introduction

Getting started

Beeline is built using the Ionic Framework, so install ionic CLI tools:

npm install -g ionic

Install dependencies

npm install

Android development

Install Android Studio

Run npm run deploy-android to build an unsigned apk. Then run the following two commands to sign and zipalign the apk respectively.

jarsigner -verbose \
          -sigalg SHA1withRSA \
          -digestalg SHA1 \
          -keystore {{YOUR_KEYSTORE}}.keystore \
          platforms/android/build/outputs/apk/android-release-unsigned.apk \
          {{YOUR_KEYSTORE_ALIAS}}

# https://developer.android.com/studio/command-line/zipalign.html
zipalign -v 4 \
    platforms/android/build/outputs/apk/android-release-unsigned.apk \
    platforms/android/build/outputs/apk/{{YOUR_APK_NAME}}.apk

NOTE: zipalign is part of the Android SDK. You will be able to find the binary at {{ANDROID_SDK_DIRECTORY}}/build-tools/{{VERSION_NUMBER}}/zipalign

iOS development

NOTE: Cordova 7.x is not supported until nordnet/cordova-hot-code-push-local-dev-addon#20 merged. This is why in package.json we set the cordova version to ^6.5.0.

Install Xcode for iOS development

Run npm run deploy-ios

Open platforms/ios/Beeline.xcodeproj in Xcode

Select target platform to run (e.g. iPhone 6) and run it

Building

npm run build for a single development build

npm run build -- --production for a production build

npm run dev to set up a build watch and local test server

npm run dev-android to set up a build watch, hot code push server, and test on emulator/device

npm run deploy to deploy the app to staging/production environments

Pushing

$ cd build
$ git add .
$ git commit -m 'Deployment on 14 Jul 2016'
$ git push

Folder Structure

  • beeline: Main program code source code to be compiled by webpack
  • hooks: Cordova hooks
  • platforms: Cordova platform specific files
  • plugins: Cordova plugins
  • resources: Ionic resources for generating icons and splash screens
  • scripts: Build scripts and miscellaneous tools
  • scss: Main stylesheets to be compiled by webpack
  • static: Base assets and folder structure used for the build
  • www: Output folder that is wiped and recopied from static for each build

Contributing

We welcome contributions to code open sourced by the Government Technology Agency of Singapore. All contributors will be asked to sign a Contributor License Agreement (CLA) in order to ensure that everybody is free to use their contributions.

beeline-frontend's People

Contributors

artylope avatar chengwm avatar fynyky avatar huangkaiw3n avatar joelchoo avatar lonerifle avatar miazima avatar shen-xujing avatar shenxujing avatar tuanzhang7 avatar xkjyeah avatar yongjun21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beeline-frontend's Issues

Implement automated failure of crowd start route

When pressing crowdstart expiry button, send the below email to the bidders.


[BEELINE] Your crowd start route is not activated :(

Dear Beeline Supporter,

We are sorry to inform you that the crowd start route, [Route Label], from [Route Origin] to [Route Destination] did not receive enough interest for activation. Do note that payment will not be processed for this route.

Thank you very much for your support.

Regards,
Beeline Team

map size on the phone (single-map)

map shown on the phone (non-desktop style) , takes 100% height, and route related form / info is placed on top the map, when try to center or pan stops on map, the map is not properly aligned.
Need to have flexbox to align map, take up the rest of the space after calculation

Safari web view asks for the location

@chuasweechin attach screenshot please

I suspect problem is because

  1. Hot-code push causes page to be reloaded
  2. The geolocation plug-in is not loaded yet
  3. KickstarterService requests location, so navigator.geolocation defaults to the built-in Safari implementation, not the plug in

Bug with navigation stack

Steps to replicate by Swee Chin

  1. Routes List Page
  2. Open OCC Lite (already tracking)
  3. Press View Map (this is probably the problem as it jumps to tickets tab messing up nav stack)
  4. Scroll down and open the OCC route
  5. Back
  6. Go to routes tab
  7. Go to trips tab
  8. Open OCC again
  9. Press back
    ...Nav stack confused.

Issue likely with "View Map" button which jumps user directly to tickets tab page messing up nav stack.

SocketIO module not found

Got this issue when trying to run it via xcode. Seems like the bridging header can't be generated?

miss info in single map branch

  1. 'trip is not available' in ticket detail view
  2. 'pings are not available' in lite route detail / tracker
  3. announcements from lite route

Expire route-specific credits

For:

  1. Grab corporate use case, e.g. such credits cannot be used for next month
  2. after 1 month of active crowdstart route runs, expire unused route-specific credits, ready for giving bulk purchase discount (to be fair to users who bided)

improve kickstart.js

when crowdstart route expires and no bid has made for the route, need to add tag 'failed' into the route

Skin the app for Grab

Here's a suggestion:

  1. Create a copy of index.html called grab.html.
    a) update the titles, favicon etc.
    b) include a customization script: <script src="grab.js"></script>
    c) reference a separate style sheet (?)
  2. In the customization script, we use angular's module system to set up a service with Grab customizations:

grab.js

angular.module('beeline')
.service('SkinningService', function () {
    this.routeTags = ['grab']
})
.run(function ($rootScope) {
    $rootScope.distributor = 'Grab'
})
  1. Controllers that need the skinning will reference the skinning service:

SomeController.js

export default function (SkinningService, $scope) {
    $scope.SkinningService = SkinningService

    $http.get('/routes/ ... SkinningService.routeTags)
}
  1. Templates can reference the service directly:
<h1>Welcome to {{SkinningService.distributor}}</h1>
  1. Write a skinning service for the regular Beeline app too.

IMO this is a lot cleaner and maintainable than writing if-statements everywhere.

Re-host the app to allow for deep-linking

The app currently relies on paths prefixed by anchor tags (#). This is not friendly to crawlers like Google and Facebook since all they see is the page before the anchor.

We hence need to host the app on a web server and configure Angular to use proper paths. If a crawler encounters the server, we will then return an appropriate payload.

More information can be found at http://www.michaelbromley.co.uk/blog/171/enable-rich-social-sharing-in-your-angularjs-app

Create a section to show open source licenses of dependencies

As users of libraries published under open-source licensing, we are obliged to prominently display the libraries that we are using and their corresponding license terms when we redistribute binaries. This has to be made available from within the app.

back button

follow steps as:
view a normal route - choose stop - advance booking - select dates - press X button on right corner - back to route list, there is unexpected back button on the route list on the left side

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.