Skip to content

Open sourced mobile app to share cooking specialties with your colleagues or classmates at lunch time

Notifications You must be signed in to change notification settings

lameze/eat-this-one

 
 

Repository files navigation

Eat this one! Build Status Code Climate

Eat this one! is a mobile app to share cooking specialties with your colleagues or classmates at lunch time.

This repository includes:

  • An ExpressJS REST API backed by MongoDB
  • An AngularJS frontend compiled to Android and iOS apps using cordova
  • Grunt tasks for development, testing and deployment.

Installation

git clone git://github.com/eat-this-one/eat-this-one.git
cd eat-this-one

System dependencies

npm install -g grunt-cli
npm install -g bower
npm install -g cordova
npm install -g mocha
npm install -g ios-deploy

You only need ios-deploy package if you are interested in using the iOS emulator.

(Android) Android SDK

Follow the normal procedure to install the Android SDK; Android Studio is not required. http://developer.android.com/sdk/index.html

Also http://developer.android.com/google/gcm/gs.html for Google Cloud Messaging.

(iOS) XCode

Follow the normal procedure http://cordova.apache.org/docs/en/4.0.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide

Install dependencies

// Install node dependencies including the local grunt.
npm install

// Depending on whether you want to test using an android device or an ios device.
grunt install:android
grunt install:ios

This will install all dependencies, create the cordova project adding the specified platform and build the current codebase.

Later on you can use grunt update to update the project dependencies.

Tips

  • Note that, if you want to run the app in your mobile, you can set your IP or hostname in config/frontend.js.
  • (Android) You may need to install previous android sdk APIs as cordova is not always using the latest version
    • If it is the case, run android sdk and select the required versions

Development

grunt

The default task is an alias of grunt dev task which starts the backend server and watches for codebase changes:

  • Runs JSHint and restarts the backend server if required
  • Runs JSHint, minifies and concatenates frontend JS files
  • Runs CSSLint and compiles less to CSS and minifies it
  • Compiles Jade templates to HTML files
  • Runs tests if you modify them

Browse the web environment

http://localhost:8000

Backend server URL

http://localhost:3000

As commented above, the hostname or the IP might be better than localhost to test in mobile.

Install the app on the emulator

grunt run:android:emulator
grunt run:ios:emulator

This is basically running cordova emulate android and cordova emulate ios in dist/app directory.

Install the app on your mobile

Android
grunt run:android:device

It starts the adb server, installs the current build and outputs the device log.

In case you have problems accessing the backend from the mobile http://developer.android.com/tools/devices/emulator.html#networkaddresses

iOS

Other commands

grunt --help

Test

npm test

This runs all backend tests (mocha). There are frontend unit tests and e2e tests (protractor) they run automatically when editing test files.

Project code structure

Thanks

Third party code

About

Open sourced mobile app to share cooking specialties with your colleagues or classmates at lunch time

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.4%
  • Shell 4.1%
  • HTML 4.0%
  • CSS 1.5%