fuzzyworld

north-star / files / src / public_settings.ts

public_settings.ts

2.0 KB ยท history ยท blame

1/**
2 * Public runtime settings that tune app behavior.
3 *
4 * These values are safe to ship to clients and intentionally exclude secrets.
5 * Keep this file as the single source of truth for behavioral constants.
6 */
7export const PUBLIC_SETTINGS = {
8 app: {
9 /** How often the render loop runs. */
10 renderIntervalMs: 100
11 },
12 location: {
13 /** Stationary heartbeat write cadence. */
14 stationarySyncIntervalMs: 2 * 60 * 1000,
15 /** Max write cadence while movement is detected. */
16 movingSyncIntervalMs: 10 * 1000,
17 /** Minimum movement distance (meters) treated as meaningful movement. */
18 changeThresholdMeters: 1
19 },
20 presence: {
21 /** Time window where a friend is treated as online/solid. */
22 onlineGraceMs: 5 * 60 * 1000,
23 /** Default time window where offline friends still show as "recent". */
24 defaultRecentlyOfflineMs: 60 * 60 * 1000
25 },
26 cleanup: {
27 /** Friend records older than this are eligible for cleanup. */
28 staleFriendTtlMs: 30 * 24 * 60 * 60 * 1000
29 },
30 compass: {
31 /** Delay before showing "no compass data" status. */
32 probeTimeoutMs: 2500
33 },
34 features: {
35 /** Whether to render the synthetic Guardian Angel marker. */
36 guardianAngelEnabled: false
37 },
38 room: {
39 /** Length of generated room IDs. */
40 idLength: 8
41 },
42 links: {
43 /** Hosted app base URL used in invite QR cards for local runs. */
44 gitlabPagesBaseUrl: 'https://apps.fuzzyworld.net/north-star/'
45 },
46 ui: {
47 emojis: {
48 darkMode: {
49 off: '๐ŸŒ™',
50 on: 'โ˜€๏ธ'
51 },
52 wakeLock: {
53 off: '๐Ÿ’ค',
54 on: '๐Ÿ”†'
55 },
56 presence: {
57 online: '๐ŸŸข',
58 recentlyOffline: '๐ŸŸก',
59 staleOffline: 'โšช'
60 },
61 dragHandle: 'โ˜ฐ'
62 }
63 }
64} as const;
65
66export type PublicSettings = typeof PUBLIC_SETTINGS;