Convert Figma logo to code with AI

guardianproject logohaven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

6,611
726
6,611
142

Top Related Projects

8,140

Free implementation of Play Services

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

3,759

DuckDuckGo Android App

Quick Overview

Haven is an open-source Android app that turns any smartphone into a motion, sound, vibration, and light detector, acting as a personal security system. It's designed to protect personal spaces and possessions without compromising the privacy of the user, making it ideal for journalists, human rights defenders, and privacy-conscious individuals.

Pros

  • Utilizes existing smartphone sensors for comprehensive security monitoring
  • Offers end-to-end encryption for secure notifications and logs
  • Highly customizable with various detection sensitivities and alert options
  • Free and open-source, allowing for community contributions and audits

Cons

  • Requires a dedicated Android device to function as a security system
  • May have higher battery consumption due to constant sensor monitoring
  • Limited to Android platform, not available for iOS users
  • Potential for false positives depending on environmental factors and sensitivity settings

Getting Started

To get started with Haven:

  1. Download the Haven app from the Google Play Store or F-Droid.
  2. Launch the app and follow the setup wizard to configure your preferences.
  3. Place the device in the area you want to monitor.
  4. Arm the system using the app's interface or a remote SMS command.
  5. Haven will now monitor for any disturbances and send alerts according to your settings.

For developers interested in contributing to the project:

  1. Fork the repository on GitHub.
  2. Clone your fork: git clone https://github.com/your-username/haven.git
  3. Set up the development environment following the instructions in the project's README.
  4. Make your changes and submit a pull request for review.

Competitor Comparisons

8,140

Free implementation of Play Services

Pros of GmsCore

  • Provides a free and open-source alternative to Google Play Services
  • Allows users to access Google-dependent apps without proprietary Google software
  • Offers better privacy and control over device data

Cons of GmsCore

  • May not be as comprehensive or fully compatible as official Google Play Services
  • Requires more technical knowledge to set up and maintain
  • Some apps may still not function properly or may have limited features

Code Comparison

Haven:

public class AccelerometerMonitor implements SensorEventListener {
    private final static double ACCELEROMETER_THRESHOLD = 0.5;
    @Override
    public void onSensorChanged(SensorEvent event) {
        // Accelerometer monitoring logic
    }
}

GmsCore:

public class GmsLocationProvider extends LocationProviderBase {
    @Override
    public void onLocationChanged(Location location) {
        // Location handling logic
    }
}

While Haven focuses on using device sensors for security monitoring, GmsCore implements location services and other Google Play Services functionalities. Haven's code is more oriented towards detecting physical disturbances, while GmsCore's code emulates Google's services for app compatibility.

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

Pros of privacyIDEA

  • More comprehensive identity and access management solution
  • Supports a wide range of authentication methods and tokens
  • Highly scalable and suitable for enterprise environments

Cons of privacyIDEA

  • More complex setup and configuration
  • Requires more resources to run and maintain
  • Less focused on personal privacy and security

Code Comparison

Haven (Java):

public class AccelerometerMonitor implements SensorEventListener {
    @Override
    public void onSensorChanged(SensorEvent event) {
        // Process accelerometer data
    }
}

privacyIDEA (Python):

class TokenClass(object):
    def check_otp(self, otp, options=None):
        # Validate one-time password
        return self.check(otp, options)

Haven is primarily focused on personal device security using sensors, while privacyIDEA is a more comprehensive identity and access management system. The code snippets reflect their different purposes, with Haven processing sensor data and privacyIDEA handling token validation.

3,759

DuckDuckGo Android App

Pros of DuckDuckGo Android

  • Focuses on privacy-centric web browsing and search
  • Larger user base and more frequent updates
  • Comprehensive mobile app with additional privacy features

Cons of DuckDuckGo Android

  • Limited to web browsing and search functionality
  • Less customizable for specific security needs
  • Not designed for physical security or surveillance

Code Comparison

Haven:

public void startMonitoring() {
    mIsMonitoring = true;
    EventTrigger.getInstance(mContext).start();
}

DuckDuckGo Android:

fun onCreateBrowser(tabId: String, query: String?) {
    viewModelScope.launch {
        command.value = Command.NavigateToNewBrowser(tabId, query)
    }
}

Haven focuses on event triggering for security monitoring, while DuckDuckGo Android emphasizes browser creation and navigation. Haven uses Java, whereas DuckDuckGo Android is written in Kotlin, reflecting their different purposes and development approaches.

Both projects prioritize user privacy but in different contexts. Haven is tailored for personal security and surveillance, while DuckDuckGo Android aims to provide a privacy-focused web browsing experience. The code snippets highlight these distinctions, with Haven's code centered on monitoring and DuckDuckGo's on web browsing functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Build Status

About Haven

Haven is for people who need a way to protect their personal areas and possessions without compromising their privacy. It is an Android application that leverages on-device sensors to provide monitoring and protection of physical areas. Haven turns any Android phone into a motion, sound, vibration and light detector, watching for unexpected guests and unwanted intruders. We designed Haven for investigative journalists, human rights defenders and people at risk of forced disappearance to create a new kind of herd immunity. By combining the array of sensors found in any smartphone, with the world's most secure communications technologies, like Signal and Tor, Haven prevents the worst kind of people from silencing citizens without getting caught in the act.

View our full Haven App Overview presentation for more about the origins and goals of the project.

Announcement and Public Beta

We are announcing Haven today, as an open-source project, along with a public beta release of the app. We are looking for contributors who understand that physical security is as important as digital, and who have an understanding and compassion for the kind of threats faced by the users and communities we want to support. We also think it is cool, cutting-edge and making use of encrypted messaging and onion routing in whole new ways. We believe Haven points the way to a more sophisticated approach to securing communication within networks of things and home automation system.

Learn more about the story of this project at the links below:

Project Team

Haven was developed through a collaboration between Freedom of the Press Foundation and Guardian Project. Prototype funding was generously provided by FPF, and donations to support continuing work can be contributed through their site: https://freedom.press/donate-support-haven-open-source-project/

Freedom of the Press Foundation Guardian Project

Safety through Sensors

Haven only records when triggered by sound and motion and stores everything locally on the device. You can position the device's camera to capture visible motion or place your phone somewhere discreet to listen for noises. Receive secure notifications of intrusion events instantly or access logs remotely later.

The following sensors are monitored for a measurable change, and then recorded to an event log on the device:

  • Accelerometer: phone's motion and vibration
  • Camera: motion in the phone's visible surroundings from front or back camera
  • Microphone: noises in the environment
  • Light: change in light from ambient light sensor
  • Power: detect device being unplugged or power loss

Building

The application can be built using Android Studio and Gradle. It relies on a number of third-party dependencies, all of which are free, open-source, and listed at the end of this document.

Install

You can currently get the Haven BETA release in one of three ways:

or add this repository manually in F-Droid's Settings->Repositories: https://guardianproject.github.io/haven-nightly/fdroid/repo/

You can, of course, build the app yourself, from source.

If you are an Android developer, you can learn more about how you can make use of F-Droid in your development workflow, for nightly builds, testing, reproducibility and more here: F-Droid Documentation

Why no iPhone Support?

While we hope to support a version of Haven that runs directly on iOS devices in the future, iPhone users can still benefit from Haven today. You can purchase an inexpensive Android phone for less than $100 and use it as your "Haven Device"; leaving it behind whilst you keep your iPhone on you. If you run Signal on your iPhone you can configure Haven on Android to send encrypted notifications, with photos and audio, directly to you. If you enable the "Tor Onion Service" feature in Haven (requires installation of "Orbot" app as well) you can remotely access all Haven log data from your iPhone using the Onion Browser app.

So, no, iPhone users we didn't forget about you and we hope you will pick up an inexpensive Android burner today!

Usage

Haven is meant to provide a smooth onboarding experience that walks users through configuring the sensors on their device to best detect intrusions into their environment. The current implementation has some of this implemented, but we are looking to improve this user experience dramatically.

Main view

The application's main view allows the user to select which sensors to use along with their corresponding levels of sensitivity. A security code is required to disable monitoring, which must be provided by the user. A phone number can be set, to which a message will be sent if any of the sensors are triggered.

Notifications

When one of the sensors is triggered (reaches the configured sensitivity threshold), notifications are sent through the following channels (if enabled):

  • SMS: a message is sent to the number specified when monitoring started
  • Signal: if configured, can send end-to-end encryption notifications via Signal

Note that it is not necessary to install the Signal app on the device that runs Haven. Doing so may invalidate the app's previous Signal registration and safety numbers. Haven uses normal APIs to communicate via Signal.

Notifications are sent through a service running in the background that is defined in class MonitorService.

Remote Access

All event logs and captured media can be remotely accessed through a Tor Onion Service. Haven must be configured as an Onion Service and requires the device to also have Orbot: Tor for Android installed and running.

ATTRIBUTIONS

This project contains source code or library dependencies from the following projects: