ShareApp / share

Repository for Share❣
MIT License
3 stars 0 forks source link

Share❣

Introduction

Share❣ is a usability-optimized smartphone web-app to remember your social sharing:

Just snap a photo, choose the person from your contacts and Share❣ will remember.

Technically speaking, it is web application created using Angular JS and Parse.com cloud.

How it's built

It's completely JavaScript application. It uses Parse.com as a backend service, where data are stored and several server functions are implemented like images scaling or notifications creating, To learn more about Parse.com see JavaScript guid https://www.parse.com/docs/js_guide.

Front-end Libraries and frameworks used

Main technology used in frontend is Angular JS.

Technologies used for build process

Directory Structure

parse.com and angular.js

How is this put together???

Getting started

Install github client

Install npm node package manager

Install bower

Install SASS & compass

Follow install instructions on SASS Installation page

Application keys

Parse.com

Share requires parse.com back-end for development at https://www.parse.com/apps/ (free registration required)

Facebook

Share requires facebook application, either create your own at https://developers.facebook.com/ or ask share development team to use our test application.

For local testing set-up the application on the domain share.test (and add share.test to your /etc/hosts), note if you want to use a different domain then share.test need to change Gruntfile.js

New application settings for local testing as:

Download code and set-up development environment

  1. git clone git+ssh://git@github.com/ShareApp/share.git

  2. cd share

  3. npm install

  4. node_modules/grunt-google-cdn/node_modules/bower/bin/bower install

  5. Read https://parse.com/docs/cloud_code_guide#cloud_code and install Parse Command Line Tool
  6. Set up new Parse App - requires parse.com account (free)
    parse new cloudCode
  7. Create parse_app_name.txt file in root directory and put there Parse App name (used by makefile)
  8. Copy settings/settings_example.js to settings/settings.js and input application keys for facebook, parse (see above)
  9. Ensure cloudCode/cloud/settings.js and shareApp/app/settings.js are links to settings/settings.js - this is set-up automatically on Linux/OSX on git pull as the links are in the repository, not sure how works on windows.
  10. Add 127.0.0.1 share.test to your /etc/hosts file. This is because Facebook API needs domain to work. (for OSX need to flush the cache to make changes register - google "/etc/hosts OSX" for more info)
  11. Upload cloudCode into your parse.com app using parse deploy command as follows:
    cd cloudCode
    parse deploy `cat ../parse_app_name.txt`

Development

After completing Getting Started section above you are ready to start coding...

Running app on local development server

Debug mode

Generating documentation

  1. To generate inline documentation call node_modules/grunt-cli/bin/grunt ngdocs and go to 'docs' directory

Adding languages, managing translations

For managing translation editing C3PO is used, or displaying the translations on the front-end angular-translate is used.

See Share translations wiki page for more details

Deployment

manifest.ejs updating for offline mode - if images have been added

Share! uses compass sprites for combining images into one file and offline caching for offline mode. For this to work the following must be done when the application is being deployed:

Everytime a new file is added or a file is changed in shareApp/app/img directory

the manifest.ejs file must be updated to add the file and increment version number.

manifest.ejs updating for offline mode - if HTML, CSS, has been changed

Don't forget to:

Make deploy

After doing Getting started section you can easily deploy your app to Parse by calling

make deploy

in root directory.