You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ No test runner or linter is configured.
20
20
21
21
## Architecture Overview
22
22
23
-
OPK Timer is a **Svelte 5 + Vite PWA** for running synchronized NSF 25m shooting competition timers across multiple devices via a WebSocket relay server.
23
+
NSF Timer is a **Svelte 5 + Vite PWA** for running synchronized NSF 25m shooting competition timers across multiple devices via a WebSocket relay server.
24
24
25
25
### Host/Client model
26
26
@@ -31,7 +31,7 @@ The app uses a strict host/client topology:
31
31
- Room codes avoid ambiguous characters (no O, 0, I, 1, L).
32
32
- The relay server (`server/index.js`) is stateless except for an in-memory room registry and a cached last `STATE_SYNC` per room for fast reconnection.
33
33
34
-
Global singletons `window.__opkHost` (SocketHost), `window.__opkClient` (SocketClient), and `window.__opkScheduler` (TimerScheduler) hold the active connection/scheduler. These are set in `App.svelte` during session creation or restore.
34
+
Global singletons `window.__nsfHost` (SocketHost), `window.__nsfClient` (SocketClient), and `window.__nsfScheduler` (TimerScheduler) hold the active connection/scheduler. These are set in `App.svelte` during session creation or restore.
35
35
36
36
### State flow
37
37
@@ -70,11 +70,11 @@ Programs (defined in `registry.js`) have `stages[]` → `exercises[]`. Each exer
70
70
-**`rapid`**: hidden phase (`targetHiddenTime`) then visible phase (`timePerSeries`)
71
71
-**`duell`**: repeated hidden/visible cycles (`targetHiddenTime`/`targetVisibleTime`) with `shotsPerShowing` shots each cycle
72
72
73
-
Custom programs are stored in localStorage under key `opk-timer-custom-programs`.
73
+
Custom programs are stored in localStorage under key `nsf-timer-custom-programs`.
74
74
75
75
### Session persistence
76
76
77
-
On page load, `App.svelte` calls `restoreSession()` which reads `localStorage` for room and timer state and attempts to reconnect or reclaim the host's room code. All localStorage keys are prefixed with `opk-timer-`.
77
+
On page load, `App.svelte` calls `restoreSession()` which reads `localStorage` for room and timer state and attempts to reconnect or reclaim the host's room code. All localStorage keys are prefixed with `nsf-timer-`.
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# OPK Timer
1
+
# NSF Timer
2
2
3
3
Synchronized timer for NSF 25m shooting competitions. Built as a Progressive Web App — install it on any phone, tablet, or computer and run competitions across multiple devices via a WebSocket relay server.
4
4
@@ -26,7 +26,7 @@ Synchronized timer for NSF 25m shooting competitions. Built as a Progressive Web
26
26
The Docker image bundles the Svelte frontend and WebSocket relay server into a single container. Nginx serves the static files and proxies `/ws` to the Node.js relay server internally.
27
27
28
28
```bash
29
-
docker run -d -p 80:80 ghcr.io/gilbn/opk-timer:latest
29
+
docker run -d -p 80:80 ghcr.io/gilbn/nsf-timer:latest
30
30
```
31
31
32
32
Access the app at `http://<server-ip>/`.
@@ -36,7 +36,7 @@ For internet-facing deployments, restrict WebSocket origins:
36
36
```bash
37
37
docker run -d -p 80:80 \
38
38
-e WS_ALLOWED_ORIGINS=https://timer.example.com \
39
-
ghcr.io/gilbn/opk-timer:latest
39
+
ghcr.io/gilbn/nsf-timer:latest
40
40
```
41
41
42
42
For HTTPS, place the container behind a reverse proxy (e.g. Caddy, Traefik, nginx Proxy Manager) that handles TLS termination. The app automatically upgrades to `wss://` when served over HTTPS.
@@ -45,8 +45,8 @@ For HTTPS, place the container behind a reverse proxy (e.g. Caddy, Traefik, ngin
0 commit comments