Skip to content

simra-project/backend

Repository files navigation

SimRa Backend

This project is part of the SimRa research project which includes the following subprojects:

In this project, we collect – with a strong focus on data protection and privacy – data on such near crashes to identify when and where bicyclists are especially at risk. We also aim to identify the main routes of bicycle traffic in Berlin. To obtain such data, we have developed a smartphone app that uses GPS information to track routes of bicyclists and the built-in acceleration sensors to pre-categorize near crashes. After their trip, users are asked to annotate and upload the collected data, pseudonymized per trip. For more information see our website.

Development

You need Java and Maven installed on you machine. (You can use the devcontainer as reference)

  1. Copy classifier.jar and preprocessing_android.jar into the lib folder.

You can get them from our CI pipeline: https://dev.azure.com/DSP-SS20/DSP-SS20/_build?definitionId=5&_a=summary

  1. Run mvn initialize to install the custom libraries.
  2. Run mvn install to build the project
  3. Copy and run the jar from the /out folder.

Usage

In order to make it harder abuse the public API we are using a token which is shared with the app. It should be added to each request, e.g. https://example.com/10/ride?clientHash=<CLIENTHASH>. The CLIENTHASH is configured in the simRa_security.config.

Deployment

After building, just execute java -jar app.jar. Make sure to provide the simRa_backend.config, simRa_security.config, simRa_regions.config in the same folder as the app.jar.

Installation

Prerequisites:

  • Ubuntu 18.04.4 LTS
  • Port 80 and 443 accessible
  1. Run sudo apt-get install default-jdk
  2. Follow this guide for SSL certificates
  3. Create service to execute java -jar app.jar

API Endpoints

/check/news?clientHash=&lastSeenNewsID=&newsLanguage= more info: simra-project/simra-ios#41

//classify-ride-cyclesense?clientHash=&os= more info: simra-project/simra-ios#36

//check-regions?clientHash=&lastSeenRegionsID= more info: simra-project/simra-ios#35

//ride?loc=&clientHash= This POST-endpoint uploads rides. The ride is in the body. example for : other

//profile?loc=&clientHash= This POST-endpoint uploads profiles for the first time. The profile is in the body. example for : other

//profile?fileHash=&filePassword=&loc=&clientHash= This PUT-endpoint overwrites an existing profile. The new profile is in the body. example for : other

About

This is the SimRa backend software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published