feat(hunt): track walking distance via GPS, show live locations on map
Docker Image CI / test (push) Failing after 41s
Docker Image CI / deploy (push) Skipped
Tests / unit (push) Failing after 36s
Tests / integration (push) Successful in 1m34s

Add foreground-only GPS distance tracking for hunts
This commit is contained in:
2026-09-27 20:55:58 +02:00
parent a0fc836c05
commit 61cc516f47
43 changed files with 2313 additions and 24 deletions
+58
View File
@@ -0,0 +1,58 @@
/**
* Shared DTO shapes for the organizer live map. Both endpoints return plain
* JSON (no SuperJSON) with `Date` fields serialized as ISO strings and Prisma
* `Decimal` coordinates coerced to numbers.
*/
export type MapUser = {
id: number;
name: string;
email: string;
};
export type MapTeam = {
id: number;
name: string;
owner: MapUser;
members: MapUser[];
};
export type MapPosition = {
userId: number;
lat: number;
lon: number;
accuracy: number | null;
recordedAt: string;
};
export type MapAnswer = {
id: number;
lat: number;
lon: number;
createdAt: string;
memberId: number;
teamId: number;
pictureUrl: string | null;
quest: {
id: number;
title_de: string;
title_en: string;
};
};
export type HuntMapData = {
teams: MapTeam[];
positions: MapPosition[];
answers: MapAnswer[];
};
export type TrailPoint = {
lat: number;
lon: number;
accuracy: number | null;
recordedAt: string;
};
export type UserTrail = {
points: TrailPoint[];
};