Giter Club home page Giter Club logo

leaderboard's Introduction

MapSwipe

The badges refer to the dev branch

Syntax & Linting Android build iOS build

Welcome to the MapSwipe app. This is the app that is distributed through mapswipe.org as well as through the Google Play and Apple stores. It was initially developed by Doctors without Borders as part of the Missing Maps project.

Main Overview

In a nutshell, here is how MapSwipe works:

  1. Humanitarian organisations set the parameters for projects through a web-based admin interface.
  2. Our backend workers process those projects and place them on Firebase. It imports them into groups that are safe for the user to cache locally on their phone (ideally 200 tiles). This image shows an example of how that grouping algorithm works.
  3. The app fetches the projects from the /projects reference in Firebase through the JavaScript SDK (don't use http requests to Firebase) and displays them to the user.
  4. The user searches those tiles and classifies them. The results are then synced back to Firebase.
  5. When a user chooses to map an area, he or she is distributed groups of the project. On completion, the user then gets badges for the distance they've mapped.

:)

Project Diagram

The following is an outline of how data typically flows and makes it into the mobile application. Most of the action happens in one of the three areas, namely the backend scripts, Firebase database, and clients.

Main overview

This application encompasses only the mobile Android & iOS clients. The role of the clients are to retrieve project information (metadata and tile information) so that volunteers can swipe through and tag them. Then, this tagging information is synchronized back to Firebase. The backend scripts (in a separate repository) are responsible for populating and processing the project information in Firebase.

Developing, Building, and Contributing to MapSwipe

If you'd like to modify and improve MapSwipe, read through the following to get familiar with the project. Please also read CONTRIBUTING.

Technology Used

  1. The app is written entirely in React Native
  2. Firebase provides the backend database. It is protected with security rules so that users and contributors to this open source project can not cause damage.
  3. The workers on the backend are running on Google Cloud and handle pre-processing and post-processing the data.

State of the project

The app was rebuilt at the end of 2018 on a recent version of react-native, and expanded to support multiple types of tasks, as well as a variety of languages.

leaderboard's People

Contributors

dependabot[bot] avatar ericboucher avatar hagellach37 avatar mamadouologuem avatar

Watchers

 avatar  avatar  avatar  avatar

leaderboard's Issues

🐎 Implement a server side pagination

For now, we are pulling all the users data from the database before making a client-side pagination.
That makes the search, sort, and pagination easier and faster but definitely increases the initial loading time.
It can be useful to add a server-side pagination.

Cost mitigation idea

With the current mapathon ongoing, we've seen the firebase bill go through the roof, even with @Hagellach37 's fix 2-3 days ago on this code (which limits loading to the mappers who've opened the app in the last 24h, instead of all users ever).

There is still a lot of download happening, apparently because users keep refreshing the leaderboard a lot more than we expected.
An option to mitigate this cost in downloads could be to run a function server-side (within firebase) that prepares and caches values to show. For instance, we could imagine running a function every 5 minutes, which would simply run the current query, and copy the result onto some cloud storage (or VPN), and modify the frontend to load that file from bulk storage instead of firebase (and we put some caching logic there so that browsers don't reload more often than once/5 minutes for instance).

This would give us both lower transfer costs (we would effectively only have 1 load/5 minutes), and possibly faster loading for the leaderboard.

Username no longer appearing in leaderboard

Recently my account -alias sf_olemaire- has stopped showing up in the leadership board. Also my profile only displays nb of tasks swiped it does not show in km2 swipes anymore. It could be related if leadership board shows km2 and my km2 counter Is not updated properly. Indeed the issue happened after the application update.

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.