Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

🔥 Firebase backend for My Shared Air distributed contact tracing.

License

Notifications You must be signed in to change notification settings

distributed-contact-tracing/flaming-service

Repository files navigation

🔥 flaming-server Build Status

Firebase backend for My Shared Air

Install and emulate locally

Needs Node 10 to work.

(cd function && yarn && yarn build)
firebase emulators:start

Collections

contactEvents

Collection for contact events from people who've got infected.

Document Structure

{
  token: string,      // Id from Bluetooth handshake
}

Permissions

Get Create Update Delete
Anyone Anyone with an document in dataAuthorizations, i.e. confirmed infection Nobody Nobody

dataAuthorizations

Authorizations of users that are allowed to share their data in the network. Issues by licensed healthcare practitioners.

Document Structure

{
  _id: string                 // App ID of infected user
  bankIdCompletionData: {
    cert: {
      notAfter: string,       // End of BankID validity, Unix ms
      notBefore: string,      // Start of BankID validity, Unix ms
    },
    device: {
      ipAddress: string       // IP address of the user agent
    },
    ocspResponse: string,     // Base64-encoded signned OCSP response
    signature: string,        // Base64-encoded XML signature
    user: {
      givenName: string,
      name: string,
      personalNumber: string,
      surname: string,
    },
  },
  type: 'hcp'                 // Healthcare practicer
}

Permissions

Get Create Update Delete
Nobody Nobody Nobody Nobody

hcps

Licensed healthcare practitioners.

Document Structure

{
  _id: string,
  personalNumberHash: string  // SHA-3-512 encoded
}

Permissions

Get Create Update Delete
Nobody Nobody Nobody Nobody

deviceRegistrationTokens

Device registration tokens.

Document Structure

{
  _id: string,    // User ID
  token: string
}

Permissions

Get Create Update Delete
Nobody Anyone, if _id = auth.uid Nobody Nobody

About

🔥 Firebase backend for My Shared Air distributed contact tracing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published