Giter Site home page Giter Site logo

lbraun / geofreebie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leinfeldt/lbs-engine

4.0 2.0 1.0 126.52 MB

🌍A location-based freecycling app

Home Page: https://lbraun.github.io/geofreebie/

License: Apache License 2.0

JavaScript 82.98% HTML 0.01% CSS 17.01%
location-based-services cordova react js onsenui freecycling

geofreebie's Introduction

Geofreebie

Welcome!

Geofreebie is a freecycling and skill-sharing app. It improves on existing freecycling platforms in Münster, Germany with its map interface and location-based recommendations. It makes freecycling more accessible and spontaneuous.

Map screenshot

The app's map view: see where people are offering freebies in your city.

This app was initially developed as part of Christian Kray, Markus Konkol, and Mehrnaz Ataei's Location Based Services course at the Institut for Geoinformatics. The purpose was to explore privacy issues in location-based mobile apps and to produce something useful at the same time.

The Geofreebie app is meant to enhance existing freecycle networks by creating location-based listings and recommendations.

  • Anna is giving away cookies 500 meters from you!

  • Your search for couches within 5 kilometers returned 20 results.

  • There are 5 items being given away within 1 kilometer of your position.

These are just a few examples of notifications our app can deliver.

List screenshot

The app's list view: discover the freebies nearest to you, click to see them on the map.

The plan

Technologies used

  1. node.js
  2. Apache Cordova
  3. React
  4. Onsen UI
  5. react-leaflet/Leaflet
  6. Cordova-promise-fs
  7. leaflet-offline

Backend

The backend for the app is housed in a separate repository and can be found here: https://github.com/lbraun/geofreebie-backend.

Installation

How to install the app and run it on your device.

Dependencies

Install these dependencies to run the project:

You will also need:

  • Java JDK
  • Android SDK (download Android Studio and it's included)
  • Gradle (brew install gradle on Mac OS)

And you need to set up the following environment variables:

  • JAVA_HOME (google how to find the location of your google installation)
  • ANDROID_HOME (can be found from Android Studio settings. Search settings for "SDK")

Installation

  • Clone this repository
  • Add the cordova platform you want to use cordova platform add <platformname>
  • Run npm run build

Running the app

  • From the console, run cordova run <platformname>

Modifications of the existing app

Modify the app's defaults

  • Go the the file src/data_components/config.json (contains all available settings)
  • Set the settings in the app component in a way you want your default settings (true/false values)
  • Adjust the map settings:
    • center: Center of the map as default (when GPS is off). Use latitude/longitude value pairs
    • zoomable: Set the default map able to zoom (use true/false)
    • draggable: Set the default map able to be dragged (use true/false)
    • zoom: Value between 0 and 18 (0 = mininmal zoom, 18 = maximum zoom)

Modify the displayed data

  • Go to the file src/data_components/layers.json (containing sample data as an example)
  • Edit the file with your layers
    • Each layer must be a json Object wrapped in {}
    • Each layer can be one of eigther marker or route
    • The name of the layer is also the name used for displaying it on the map
    • Each layer can contain multiple items in an array [{item}, {item2}]
    • Each item must have a unique name
    • Provide the coordinates of your layers in pairs of latitude/longitude
    • Routes are used as single layer, so to add multiple route objects, add multiple layers
    • Add a pop-up to a marker by adding the element popup to an item of a marker. This will be displayed. It can be be styled with html elements (example: <b>Hello world!</b><br>I am a popup.)

Adding pictures for streetview

Add the picture to the folder www/img.

Extending the app

To add further plugins or extensions, create a new file in src/business_components with your logic and export your functions. Then in the component, that shall be extended (map, streetview), require the new file and just use your new functions like module.method(). To have the new modules as a part of the app, you need to run the build again npm run build.

Add more Logs

The Logger delivered with the app provides two exported functions: logEntry(data) and stopLoggingAndWriteFile. The logs have the structure: Date/Time, Latitude, Longitude, Mode, Action. To add more logs create an array and call logger.logEntry(myData) with it. The logfile can be found on the devices' root directory and is called lbs-engine-logger.csv.

Further development

The streetview component is a dummy mode at the moment. An interaction to change the displayed image and respond to location events needs to be implemented.

Bugs

Due to an error in OnsenUI's last version, the tabs are a little hacked right now. Can be fixed with an update of OnsenUI.

geofreebie's People

Contributors

alaacs avatar danji90 avatar lbraun avatar leinfeldt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

danji90

geofreebie's Issues

Add ability to add photos

  • Add photo field to database
  • User can upload pic of food, object, self, space where event is held
  • Offer can't be published without a pic
  • Limit or automatically downscale pic size
    --> Ask Brox about buying database space

Design database

Needs to hold information about things that are being given away

Add ability to approve new users

  • Add new boolean field to database "approved"
  • Default is false
  • I will approve people manually through mlab
  • Set up some alert when new people sign up? Maybe I can do this through Auth0

Critical because otherwise anyone can sign up.

Add page for editing profile

Include fields for:

  • Name
  • Profile picture
  • Contact information?
  • Interests and occupation
  • Languages spoken?

Then remove these things from the settings page

Create app mockups

Define and mock up the different use cases (see info on learnweb about use cases)

Write up documentation

From Kray's email:

Hi everyone,

the documentation does not need to be extensive but it should cover the areas mentioned in the kick-off

  • installation (should enable someone to install it)
  • overview architecture (should give a clear idea how the app/system is structured/put together, e.g. if someone wants to extend it or replicate it)
  • features of your product (should provide information about what the product can do and how well these functions work, e.g. are the bugs?)
  • initial evaluation of your product (as outlined on the slide)
    The slides also give some indication of different 'quality levels' for each of these parts. Don't forget that you also need to provide a video demo and that the live demo of your product also counts towards your grade.

Add geofencing around Münster

  • Set available to false when out of geofence
  • Alert user when they are out of geofence
  • Stop syncing coordinates when not available
  • Add zoom-out limit (not much wider than münster)
  • How should this affect functionality?
    • Limit zoom of map
    • Do not sync offer if coordinates are out of fence
  • How to choose shape: simple bounding box or a more complex polygon?
    • More complex would be more interesting, but doesn't fit a rectangular screen as well
    • Start rectangular, go poly if time allows
  • How to communicate fence to users?
    • Floating message when out of bounds (still allow user to see map)
    • Draw limits on the map? Like a mask?

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.