mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-10 16:02:25 +01:00
opt-in usage notes and a stats dashboard
Release builds ask in setup and Settings whether to send a short note when the app is opened and after each drive: the version, plus the Android version, phone model and cars people tick. Nothing runs in the background. Dev builds always send. The Cloudflare Worker in stats-worker/ stores the notes and serves a private dashboard with GitHub downloads alongside.
This commit is contained in:
1 parent
b6bd6497b2
commit
5a3bbe82a0
13 files changed
+812
-6
No files matched your search
@@ -0,0 +1,52 @@
|
||||
-- One row per phone per day: the first note that day counts, later ones update it.
|
||||
CREATE TABLE IF NOT EXISTS pings (
|
||||
day TEXT NOT NULL, -- YYYY-MM-DD, UTC
|
||||
uid TEXT NOT NULL, -- salted hash of the phone's random install ID
|
||||
version TEXT NOT NULL,
|
||||
code INTEGER,
|
||||
build TEXT,
|
||||
android TEXT, -- these four are from older builds; details now live in phones
|
||||
os TEXT,
|
||||
phone TEXT,
|
||||
car_today INTEGER,
|
||||
PRIMARY KEY (day, uid)
|
||||
);
|
||||
|
||||
-- Each car a phone saw that day, and how the session ended.
|
||||
CREATE TABLE IF NOT EXISTS cars (
|
||||
day TEXT NOT NULL,
|
||||
uid TEXT NOT NULL,
|
||||
name TEXT, car TEXT, year TEXT, make TEXT, model TEXT,
|
||||
protocol TEXT,
|
||||
result TEXT,
|
||||
screen TEXT, -- usable pixels, e.g. 1280x720
|
||||
dpi INTEGER,
|
||||
PRIMARY KEY (day, uid, name, car, year, protocol, result)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS pings_uid ON pings (uid);
|
||||
|
||||
-- GitHub's running download count for each release's APK, saved once a day.
|
||||
CREATE TABLE IF NOT EXISTS downloads (
|
||||
day TEXT NOT NULL,
|
||||
tag TEXT NOT NULL,
|
||||
count INTEGER NOT NULL,
|
||||
PRIMARY KEY (day, tag)
|
||||
);
|
||||
|
||||
-- Which releases are pre-releases, so the dashboard can pick out the latest full release.
|
||||
CREATE TABLE IF NOT EXISTS releases (
|
||||
tag TEXT PRIMARY KEY,
|
||||
prerelease INTEGER NOT NULL,
|
||||
published TEXT
|
||||
);
|
||||
|
||||
-- Each phone's latest details. Phones send them only when they change (and once a month), so
|
||||
-- a field a note leaves out keeps its last value.
|
||||
CREATE TABLE IF NOT EXISTS phones (
|
||||
uid TEXT PRIMARY KEY,
|
||||
android TEXT,
|
||||
os TEXT,
|
||||
phone TEXT,
|
||||
updated TEXT
|
||||
);
|
||||
Reference in new issue
Block a user