System Manual - gokceyucel/SWE573-Spring2017-Bogazici GitHub Wiki

System Manual

Api & Web Application

Prequisites

  1. A Pc running one of the following operating systems: Linux, MacOS, Windows.
  2. git should be installed. https://git-scm.com/
  3. NodeJS should be installed. (v6.9+) https://nodejs.org/
  4. config.json should be copied in ./src directory.

How to build from source

  1. Get the source code

    git clone https://github.com/gokceyucel/SWE573-Spring2017-Bogazici.git

  2. Get into the folder

    cd SWE573-Spring2017-Bogazici

  3. Download project dependencies

    npm install

  4. Run tests

    npm run test

  5. Run application

    npm start

  6. Run application in development mode with live reload

    npm run dev

  7. Debug application

    npm run debug

  8. Open a web browser and go to http://localhost:8080 (If port 8080 is not available or listening by another service, you can always provide another port using environment variables)

    PORT=9999 npm start

  9. Build distribution

    npm run build

Api endpoints

  • /api Returns Api version number

  • /api/access-token?oauth_token={oauth_token}&oauth_verifier={oauth_verifier} Requires 'oauth_token' and 'oauth_verifier' as params. Returns access-token to be used in Twitter login page.

  • /api/request-token Generates and returns Twitter request token based redirect url for user authentication.

  • /tweets/{query}/{location} Requires tweet query and location information (41.029138102,54.1902912) as params. Returns geolocation based tweets.

Android App

Prequisites

  1. A Pc running one of the following operating systems: Linux, MacOS, Windows.
  2. git should be installed. https://git-scm.com/
  3. NodeJS should be installed. (v6.9+) https://nodejs.org/
  4. Java 8+
  5. Android Development Environment
  6. ReactNative CLI npm install -g react-native-cli in case of error try installing it directly curl -0 -L https://npmjs.org/install.sh | sudo sh 7.For more detailed ReactNative installation, refer to https://facebook.github.io/react-native/docs/getting-started.html

How to run & debug

  1. Get the source code

git clone https://github.com/gokceyucel/Project573-Android.git

  1. Go into the directory

cd Project573-Android

  1. Connect an Android device to PC or start an Emulator
  2. Start debugging

react-native run-android