Skip to content

Commit

Permalink
Merge pull request #3 from tripleblindmarket/develop
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
harshvitra authored Mar 21, 2020
2 parents d115fe1 + a9f55f3 commit 8844ba8
Show file tree
Hide file tree
Showing 56 changed files with 5,579 additions and 6,507 deletions.
35 changes: 26 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,38 @@ prepare and submit a pull request.
* Describe a bug by including steps to reproduce and earliest version you
know is affected.
* Describe a new feature with as much detail as possible.
* Fork the repository on GitHub and clone locally (see how to [fork a repo](https://help.github.com/articles/fork-a-repo/)).
* Fork the repository on GitHub:
- Visit https://github.com/tripleblindmarket/private-kit
- Click on the "Fork" button in the upper-left corner.
* Clone the forked repository to your local machine:
```bash
cd ~ # get to your home directory or where ever you want to go
git clone https://github.com/YOURACCOUNT/
```
(see also how to [fork a repo](https://help.github.com/articles/fork-a-repo/))

## Make Changes

1. Create a branch based on the `develop` branch. Name the branch in the
format: "flast/description", where "flast" is your first initial + last
name, and "description" is as simple description of the work being done.
For example, if Steve Penrod wants to add a new icon a branch name could
"spenrod/new-icon".
1. [Optional] Create a branch based on the `develop` branch. Name the branch
something to reflect what you are doing. For example, if Steve Penrod
wants to add a new icon a branch name you could do:
```bash
git checkout develop # you want to branch from the main 'develop' branch
git pull # make sure you have the latest code when you start the branch
git checkout -b "spenrod/new-icon" develop # new branch created!
```
2. Stick to the coding style and patterns that are used already.
3. Document code! Comments are good. More comments are better. :)
4. Make commits as you desire. Ultimately they will be squashed, so make
notes to yourself.
5. Once you have committed everything and are done with your branch, rebase
your code against `develop` by:
notes to yourself. It's as simple as `git commit`!
5. Once you have committed everything and are done with this batch of work,
push your changes back to your Github:
```bash
git push
```
6. Start a PR to submit your changes back to the original project:
- Visit https://github.com/YOURACCOUNT/private-kit
- Click on the
- Checkout the `develop` branch and make sure it is up-to-date.
- Checkout your branch and rebase it against `develop`.
- Resolve any conflicts locally.
Expand Down
94 changes: 94 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Citizen Code of Conduct

## 1. Purpose

A primary goal of Private Kit is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).

This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in Private Kit to help us create safe and positive experiences for everyone.

## 2. Open [Source/Culture/Tech] Citizenship

A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.

Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.

If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.

## 3. Expected Behavior

The following behaviors are expected and requested of all community members:

* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.

## 4. Unacceptable Behavior

The following behaviors are considered harassment and are unacceptable within our community:

* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people's personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone's consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.

## 5. Weapons Policy

No weapons will be allowed at Private Kit events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter.

## 6. Consequences of Unacceptable Behavior

Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.

Anyone asked to stop unacceptable behavior is expected to comply immediately.

If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).

## 7. Reporting Guidelines

If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. [email protected].



Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.

## 8. Addressing Grievances

If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Private Kit with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.



## 9. Scope

We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.

This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.

## 10. Contact info

[email protected]

## 11. License and attribution

The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).

Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).

_Revision 2.3. Posted 6 March 2017._

_Revision 2.2. Posted 4 February 2016._

_Revision 2.1. Posted 23 June 2014._

_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# Private Kit
# Private Kit<img align="left" src="./assets/ShieldKeyHold512x512.png" data-canonical-src="./assets/ShieldKeyHold512x512.png" width="40" height="40"/> ![Android and iOS build on MacOS](https://github.com/tripleblindmarket/private-kit/workflows/Android%20and%20iOS%20build%20on%20MacOS/badge.svg)

<img src="./assets/ShieldKeyHold512x512.png" data-canonical-src="./assets/ShieldKeyHold512x512.png" width="200" height="200" />
Help us stop COVID-19.

A personal location vault that nobody else can access. Log your location privately every five minutes. No information will leave the phone.
We’re building the next generation of secure location logging to preserve privacy and #flattenthecurve

**Downloads:** [Google Play](https://play.google.com/store/apps/details?id=edu.mit.privatekit) | Apple App Store - coming soon!
Location logs provide time-stamped records of where users have been, allowing them to share information with health officials accurately and quickly. This helps support contact tracing efforts to slow the spread of the virus.

**Home page:** http://privatekit.mit.edu
What’s truly special about Private Kit, though, is its privacy protection. Data never leaves users’ devices without their password entry and explicit consent. The location log generated by Private Kit cannot be accessed from outside the user’s device, meaning data transfer occurs only if the user chooses to share it with the researcher.

----

<img align="right" src="./assets/PreviewUI.png" data-canonical-src="./assets/PreviewUI.png"/>

## Behavior
Private Kit is a ‘privacy-first’ app that allows you to log your GPS trails on your own phone. The information is stored locally and never shared with anyone (not even with us or MIT) until you explicitly decide to manually export the data. The location log generated by Private Kit cannot be accessed from outside the user’s device. Location information can be imported and exported by the user and used in other projects and applications.

1. Get consent to locally track location and send an encoded version online.
2. Locally cache loction info once every 5 minutes: ``` Time | GPS Lat | GPS Lon ```
Private Kit’s trail generator logs your device’s location once every five minutes and stores 28 days of data in under 100KB of space – less space than a single picture. But what is truly exciting about Private Kit is its privacy protection.

**Home page:** http://privatekit.mit.edu

**WhitePaper:** [Apps Gone Rogue: Maintaining Personal Privacy in an Epidemic](https://drive.google.com/file/d/1nwOR4drE3YdkCkyy_HBd6giQPPhLEkRc/view?usp=sharing)

**Downloads:** [Google Play](https://play.google.com/store/apps/details?id=edu.mit.privatekit) | [Apple Store](https://apps.apple.com/us/app/private-kit-prototype/id1501903733)

# Development

Expand Down Expand Up @@ -42,6 +50,10 @@ or
npx react-native run-ios --simulator="iPhone 8 Plus"
```

----------------------------------------------------------------------------------
NOTE: In some cases, the abovementioned procedure leads to the error 'Failed to load bundle - Could not connect to development server'. In these cases, kill all other react-native processes and try it again.
----------------------------------------------------------------------------------

## Contributing

Read the [contribution guidelines](./.github/CONTRIBUTING.md).
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ android {
applicationId "edu.mit.privatekit"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7
versionName "0.5.2"
versionCode 8
versionName "0.5.3"
}
splits {
abi {
Expand Down
17 changes: 17 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<application
android:name=".MainApplication"
Expand All @@ -22,6 +24,21 @@
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="private_kit_notification_channel"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="Handle all local notifications"/>
<!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@android:color/white"/>

<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@Override
public void onTerminate() {
super.onTerminate();

// ADD LOCAL NOTIFICATION
}

@Override
public void onCreate() {
super.onCreate();
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFF</color>
</resources>
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
minSdkVersion = 16
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "11+"
firebaseVersion = "11+"
}
repositories {
google()
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ include ':react-native-zip-archive'
project(':react-native-zip-archive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zip-archive/android')
include ':react-native-webview'
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
include ':react-native-push-notification'
project(':react-native-push-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-push-notification/android')
include ':@mauron85_react-native-background-geolocation'
project(':@mauron85_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/lib')
include ':@mauron85_react-native-background-geolocation-common'
Expand Down
6 changes: 6 additions & 0 deletions app/locales/de/exportscreen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"export_para_1":"You can share your location trail with anyone using the Share button below. Once you press the button it will ask you with whom and how you want to share it.",
"export_para_2":"Location is shared as a simple list of times and coordinates, no other identifying information.",
"share":"SHARE",
"data_hint":"Log has data of"
}
5 changes: 5 additions & 0 deletions app/locales/de/import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"import_title":"Import Locations",
"import_step_1":"1. Login to your Google Account and Download your Location History",
"import_step_2":"2. After downloaded, open this screen again. The data will import automatically."
}
11 changes: 11 additions & 0 deletions app/locales/de/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import intro from './intro.json';
import locationTracking from './locationTracking.json';
import importFile from './import.json'
import exportFile from './exportscreen.json'

export default {
...intro,
...locationTracking,
...importFile,
...exportFile
};
14 changes: 14 additions & 0 deletions app/locales/de/intro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"private_kit":"Private Kit",
"intro1_para1":"Designed with data security and privacy protection at its heart, MIT Private Kit is the next generation of secure location logging.",
"next":"NEXT",
"back":"BACK",
"start":"START",
"intro2_title1":"Less than 100KB",
"intro2_para1":"Private Kit’s trail generator logs your device’s location data in under 100KB of space – less space than a single picture.",
"intro2_title2":"You are in charge",
"intro2_para2":"Data Never Leaves Your Device Without Your Consent",
"intro3_title1":"The Future",
"intro3_para1":"The Next Step in Solving Today and Tomorrow’s Problems Enabling individuals to log their location trail offers new opportunities for researchers studying pandemic tracking, refugee migration, and community traffic analysis.",
"intro3_para2":"Learn More http://privatekit.mit.edu/"
}
12 changes: 12 additions & 0 deletions app/locales/de/locationTracking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"start_logging":"START LOGGING",
"stop_logging":"STOP LOGGING",
"logging_message":"It is currently logging your location privately every five minutes. Your location information will NOT leave your phone.",
"not_logging_message":"NOTE: After clicking this button you may be prompted to grant Private Kit access to your location.",
"import":"Import",
"export":"Export",
"news":"news",
"latest_news":"Latest News",
"url_info":"For more information visit the Private Kit hompage:",
"private_kit_url":"privatekit.mit.edu"
}
6 changes: 6 additions & 0 deletions app/locales/en/exportscreen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"export_para_1":"You can share your location trail with anyone using the Share button below. Once you press the button it will ask you with whom and how you want to share it.",
"export_para_2":"Location is shared as a simple list of times and coordinates, no other identifying information.",
"share":"SHARE",
"data_hint":"Log has data of"
}
5 changes: 5 additions & 0 deletions app/locales/en/import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"import_title":"Import Locations",
"import_step_1":"1. Login to your Google Account and Download your Location History",
"import_step_2":"2. After downloaded, open this screen again. The data will import automatically."
}
11 changes: 11 additions & 0 deletions app/locales/en/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import intro from './intro.json';
import locationTracking from './locationTracking.json';
import importFile from './import.json'
import exportFile from './exportscreen.json'

export default {
...intro,
...locationTracking,
...importFile,
...exportFile
};
14 changes: 14 additions & 0 deletions app/locales/en/intro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"private_kit":"Private Kit",
"intro1_para1":"Designed with data security and privacy protection at its heart, MIT Private Kit is the next generation of secure location logging.",
"next":"NEXT",
"back":"BACK",
"start":"START",
"intro2_title1":"Less than 100KB",
"intro2_para1":"Private Kit’s trail generator logs your device’s location data in under 100KB of space – less space than a single picture.",
"intro2_title2":"You are in charge",
"intro2_para2":"Data Never Leaves Your Device Without Your Consent",
"intro3_title1":"The Future",
"intro3_para1":"The Next Step in Solving Today and Tomorrow’s Problems Enabling individuals to log their location trail offers new opportunities for researchers studying pandemic tracking, refugee migration, and community traffic analysis.",
"intro3_para2":"Learn More http://privatekit.mit.edu/"
}
Loading

0 comments on commit 8844ba8

Please sign in to comment.