omerio / goody-frontend

Hybrid frontend for Goody. Based on Mobile Angular Ui, Twitter Bootstrap and Cordova

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goody - Gift payments made easy bitHound Score

Goody app

Preparation

Installing required tools

npm install -g bower yo gulp generator-mobileangularui
sudo npm install -g phonegap

Scaffold the project

phonegap create goody
cd goody
yo mobileangularui

Be patient.. this may take a few minutes until npm finishes to install.

Build the project for the first time

gulp build

Run the application

phonegap run ios # or android, or whatever is your target

If this is the first time you'll run phonegap with the choosen target it may complains about missing dependencies.. no fear, just install them and retry.

Test/Debug in a Web Browser

gulp

Now we have built our source and have a web server listening on localhost:8000, a weinre server at localhost:8001, and a watch task rebuilding on code changes.

That said we can open http://localhost:8000/ to see the result of our hard work.

Mobile Angular UI Docs

Usage

PhoneGap CLI

The hello-world template is the default when you create a new application using the phonegap-cli.

phonegap create my-app

Create an app using this template specifically:

phonegap create my-app --template hello-world

To see a list of other available PhoneGap templates:

phonegap template list

android-minSdkVersion (Android only)

Minimum SDK version supported on the target device. Maximum version is blank by default.

This template sets the minimum to 14.

<preference name="android-minSdkVersion" value="14" />

<access ...> (All)

This template defaults to wide open access.

<access origin="*" />

It is strongly encouraged that you restrict access to external resources in your application before releasing to production.

For more information on whitelist configuration, see the Cordova Whitelist Guide and the Cordova Whitelist Plugin documentation

Content Security Policy (CSP)

The default CSP is similarly open:

<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *" />

Much like the access tag above, you are strongly encouraged to use a more restrictive CSP in production.

A good starting point declaration might be:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *" />

For more information on the Content Security Policy, see the section on CSP in the Cordova Whitelist Plugin documentation.

Another good resource for generating a good CSP declaration is CSP is Awesome

About

Hybrid frontend for Goody. Based on Mobile Angular Ui, Twitter Bootstrap and Cordova


Languages

Language:JavaScript 66.1%Language:HTML 27.5%Language:CSS 6.5%