-
Notifications
You must be signed in to change notification settings - Fork 55
Technical documentation
This is the main documentation for eRouška project.
Firebase User ID, unique for each phone number, generated by Firebase Authentication after sign-in, 28 chars or more.
Broadcasted user ID, unique for each registration, generated by Firebase function after registration, 10 bytes
Transmitted user ID, actually transmitted over Bluetooth, each BUID gets about 100 TUIDs after registration, client picks a different one every hour or so, privacy measure to prevent tracking individual device/user, 10 bytes
Firestore is not readable or writable to user, only Functions.
- Key: FUID
Attributes:
- phoneNumber (international format)
- createdAt (timestamp of creation)
- registrationCount (number of BUIDs)
- Key: BUID
Attributes
- fuid
- platform (android/ ios)
- platformVersion (system version, e.g. 10.0.4)
- manufacturer (phone manufacturer, e.g. Samsung)
- model (phone model, e.g. Galaxy S7)
- locale (phone language, e.g. cs_CZ)
- createdAt (timestamp of creation)
- pushRegistrationToken (push token from Firebase Cloud Messaging)
- Key: TUID
Attributes
- fuid
- buid
- createdAt (timestamp of creation)
User can only upload data about his FUID, can't read other data.
- Key: FUID/BUID
- Filename: $timestamp.csv
Metadata
- version (version of CSV model, current 4)
CSV columns
- tuid
- timestampStart (millis)
- timestampEnd (millis)
- avgRssi (average signal strength)
- medRssi (median signal strength)
Main API for the app and other parts of the system, scales automatically, region: europe-west3
Input and output are dictionaries. Functions doesn't return anything, unless specified here (but can throw error).
Creates a new registration after authentication.
Input
- platform: string (android/ ios)
- platformVersion: string (system version, e.g. 10.0.4)
- manufacturer: string (phone manufacturer, e.g. Samsung)
- model: string (phone model, e.g. Galaxy S7)
- locale: string (phone language, e.g. cs_CZ)
- pushRegistrationToken: string (push token from Firebase Cloud Messaging)
Output
- buid: string (created BUID)
- tuids: string[] (list of TUIDs)
Deletes all CSVs for one BUID.
Input
- buid: string
Deletes all data related to BUID.
Input
- buid: string
Deletes all data related to FUID, including phone number in Firebase Authentication.
Changes push token for BUID.
Input
- buid: string
- pushRegistrationToken: string
Checks if FUID and BUID still exists
Input:
- buid: string Output:
- boolean (active/inactive)
Contains constants which we can changed later without updating the app.