Giter Club home page Giter Club logo

falling-fruit-mobile's Introduction

Status

Falling Fruit Legacy

This is a Rails 3 web application and API for Falling Fruit, built for use with a PostgreSQL + PostGIS database.

Who is responsible?

Falling Fruit co-founders Caleb Phillips and Ethan Welty. More info at fallingfruit.org/about.

How can I help?

If you want to help with development, feel free to fork the project. If you have something to submit upstream, send a pull request from your fork. Cool? Cool!

Status

The website is live at fallingfruit.org. However, maintaining both a website and a mobile app that do not share any code proved too time consuming, so we are slowly phasing out this project in favor of a mobile-friendly web app (falling-fruit-web). However, all versions of the mobile app still rely on the Rails API.

Development

Install PostgreSQL, Ruby, and dependencies

PostgreSQL (15) & PostGIS (3.3), for example with Homebrew:

brew install postgresql@15 postgis

ImageMagick:

brew install imagemagick

Ruby (2.3.4), for example with rbenv:

rbenv install 2.3.4
rbenv shell 2.3.4

Bundler (1.17.3) with RubyGems:

gem install bundler -v 1.17.3

Project gems with Bundler:

bundle install

Initialize the configuration files:

cp config/database.yml.dist config/database.yml
cp config/s3.yml.dist config/s3.yml
cp config/initializers/credentials.rb.dist config/initializers/credentials.rb
cp config/initializers/secret_token.rb.dist config/initializers/secret_token.rb
cp .phraseapp.yml.dist .phraseapp.yml

Add a desired development database name and your database username, password, and port to config/database.yml. Add Amazon S3 and Google API credentials to config/s3.yml and config/initializers/credentials.rb. If working with translations, add Phrase credentials to .phraseapp.yml.

Start the app

Create and structure the database, then seed it with db/seeds.rb:

rake db:create
rake db:migrate
rake db:seed

Install and start the Falling Fruit API.

Finally, start the web server and navigate to localhost:3000:

thin start

Translation

For translators

Website translations are managed on the Phrase project Falling Fruit (web). To contribute, email us ([email protected]) and we'll add you as a translator.

For developers

Install the Phrase CLI:

brew install phrase-cli
cp .phraseapp.yml.dist .phraseapp.yml

Add your Phrase access token to .phraseapp.yml.

Add a new translation

In the Falling Fruit (web) project, select the default locale (English/en), and add a new translation key. If the same word or phrase appears often, add it as glossary.<key name>.

Then, update your translation files (in config/locales/*.yml):

phrase pull

Use the translation key in your template.

<!-- Instead of adding text to the markup: -->
<span>Map</span>

<!-- Evoke the translation key value with translate() -->
<span><%= translate("glossary.map") %></span>

falling-fruit-mobile's People

Contributors

bion avatar dbalatero avatar ezwelty avatar rylanb avatar somerandomsequence avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bion cdukedev

falling-fruit-mobile's Issues

Add support for problem reports

Users can only report problems from the website. However, problems (e.g. location does not exist) are typically encountered in the field.

Slow input in address search

Although not experienced on Android (Nexus 5x), one user reports this behavior on an iPhone 6s+:

It's just a bit temperamental in that I had to hold my finger on the point for a longer than usual time to get the curser where I wanted to edit the text.

(reported by Lady J)

types.json API issues

"name" is now jus the (en) common name, not the full name "Common name [Scientific name]" (as needed by the type selectors). Such a field can be added client-side to the data once downloaded.

@ezwelty said:

@dbalatero types.json already returns common name fields and scientific_name. This is a reminder to generate a locale-specific full name โ€“ <Localized common name, or English common name if not available> <[Scientific name] (if available)> โ€“ in the mobile app.

Sort types by taxonomic rank

Types are currently sorted by descending English common name. For example:

  • Apple [Malus]
  • Apple berry [Billardiera scandens]
  • Apple mint [Mentha suavolens]

They should instead be sorted by descending scientific name, then by ascending taxonomic rank (from broader to more specific).

Translate type names

Localization does not yet support type names, which appear in the location description, list view, and type filter. These should update when the locale is changed.

Maps vs List

Both should now be switched to using the same API call and data so that locations.json isn't called twice. Should include the type filter as a parameter (as currently done by map) and lat,lng (as currently done by list).

Define the "Unverified" tag

It is defined on the website: "If you doubt the existence, location, or identity of this source." However, no such information is provided on the mobile app.

Add "show on map" links to location and locations list

This will only work well once Map and List display the same locations. Then the map does not need to be panned when switching between Map and List views (which would reload both views), and instead simply highlight the marker by color and z-index or a mini-infowindow.

Confirm photo has been added to form

After a photo has been taken via the Add location or Add review forms, there is no confirmation that the photo is attached to the form. There should be confirmation text, or better yet, a thumbnail of the photo embedded into the form.

Cooperation on other app

Hi Falling Fruit Team,

I am writing an app and hope to get all plant maps on board.
Features:

  • Publishing to multiple APIs (Mundraub, na-ovoce)
  • Mapping Categories
  • Offline mode with downloaded markers and Fruit Radar notifications

https://github.com/niccokunzmann/mundraub-android

I would like to incorporate Falling Fruit markers. Also publishing if the API is documented (should take me a day or two then).

I could not find your API documentation. Do you have an API documentation?

I can read your source code. A documentation like na-ovoce was really great.

How would you like to cooperate?

Provide link to directions in external mapping app

Requested in a Google Play review. Alternatively, we could open the location in those apps (from which the user can then request directions), or simply display Latitude, Longitude and perhaps the reverse geocoded address for use in other apps.

New location missing from map/list until reloaded

If you add a new location, then click the back button to return to the map, no marker appears where the location now exists. One solution is to force reload (locationsService.fetchData with cache: false) but performance would take a hit. A marker can be manually added to window.do_marker(), but no equivalent exists for the list. Since these views share the same data, I wonder if it wouldn't be better to somehow inject the location into a locations array and then update the views from that?

Filter by multiple types

Only filtering by a single type is currently supported. Given the number of types, this might require the added ability to save and load custom filter settings, and perhaps support for Falling Fruit-provided presets (e.g. "basic forager mode").

Save photo to local storage

Currently the photo is sent to Falling Fruit servers but never saved locally. I think the expected behavior is that the original photo (before resize / compression) be saved to the phone's local storage.

On Android: Adding saveToPhotoAlbum: true doesn't seem to do anything. Apparently only works if destinationType: Camera.DestinationType.FILE_URI but then this breaks upload (which expects the data as base64). Might require tinkering to pull from local storage and encode ourselves?

Loading dialogue too obtrusive

Some users complain about the little messages that keep dropping in from the top. Although it's important for users to distinguish between an absence of data and loading data, we should think of a way to make these less obtrusive.

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.