Skip to content

Commit 10d8648

Browse files
authored
Merge pull request #21 from bryan-rt/services_uploader
Fix Dockerfile, gitignore secrets, update .env.example
2 parents a38cbec + 2bdda13 commit 10d8648

4 files changed

Lines changed: 25 additions & 35 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Idempotency is critical for the uploader — re-runs must not duplicate uploads.
351351
## Current Branch & Status
352352

353353
- **Active branch:** `services_uploader`
354-
- **Head commit:** `12fb2fe`
354+
- **Head commit:** `d0cf43e`
355355
- **Pipeline:** Full pipeline (A→F) verified end-to-end. Stages A, C produce tag observations + identity hints. Stage D (ILP stitching) resolves person tracks. Stage E detects match sessions. Stage F exports clips with privacy redaction.
356356
- **Services:** `nest_recorder` working — auto-registers cameras to Supabase on discovery. `uploader` working — resolves fighter tag IDs → profile IDs via active gym check-ins at upload time (Phase C identity bridge). `processor` scaffold only.
357357
- **Apps:** Flutter mobile app at `mobile_app/`. End-to-end tested on Pixel 7 Pro against local Supabase.
@@ -363,7 +363,7 @@ Idempotency is critical for the uploader — re-runs must not duplicate uploads.
363363
- **Android:** `usesCleartextTraffic=true` for local HTTP Supabase. `ACCESS_FINE_LOCATION` required for WiFi SSID + GPS.
364364
- **Local dev:** `supabase_config.dart` points to LAN IP (`192.168.0.66:54321`). Signed URLs rewrite `127.0.0.1` → configured host for phone access.
365365
- **Supabase:** All Phase A + Phase E + cameras migrations applied (17 migration files total). RLS on all 10 tables. Storage read policy on `match-clips` bucket. `cameras` table auto-populated by `nest_recorder`. `log_events` has a known schema mismatch — `AppLogger` sends `app_version` column that doesn't exist (non-blocking, errors are caught).
366-
- **Last updated:** 2026-03-16 (cameras table + nest_recorder auto-registration verified with 3 live cameras)
366+
- **Last updated:** 2026-03-16 (cameras table + auto-registration verified; secrets removed from git tracking; Dockerfile includes register_cameras.sh; .env.example updated for discovery model)
367367

368368
---
369369

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Nest Recorder service environment
2-
# Copy to .env to configure timezone and other settings
3-
4-
# Timezone used by recorder container
51
# Nest Recorder Service Environment (.env.example)
62
# Copy to .env and set real values. Do NOT commit .env.
73

@@ -10,45 +6,33 @@
106
TZ=America/New_York
117

128
# --- Google SDM / OAuth ---
13-
# Project context (used by scripts when building resource paths)
14-
SDM_PROJECT_ID=projects/your-google-project-id
15-
16-
# OAuth client credentials (prefer secrets files, see secrets/README.md)
9+
# OAuth client credentials (prefer secrets files — see secrets/README.md)
10+
# If set here, these override the secrets/*.txt files.
1711
SDM_CLIENT_ID=
1812
SDM_CLIENT_SECRET=
19-
20-
# Refresh token: set here OR provide a file at services/nest_recorder/secrets/refresh_token.txt
21-
# If both exist, the scripts prefer a rotated token cached under /recordings/secrets
2213
SDM_REFRESH_TOKEN=
2314

24-
# --- Camera/Device assignment ---
25-
# Map recording devices to camera IDs (up to 6 supported by scripts)
26-
# DEVICE_* can be human-readable names; CAM_ID_* are SDM resource identifiers
27-
DEVICE_1=mat-a
28-
CAM_ID_1=enter-camera-id-1
29-
DEVICE_2=mat-b
30-
CAM_ID_2=enter-camera-id-2
31-
DEVICE_3=
32-
CAM_ID_3=
33-
DEVICE_4=
34-
CAM_ID_4=
35-
DEVICE_5=
36-
CAM_ID_5=
37-
DEVICE_6=
38-
CAM_ID_6=
15+
# --- Camera discovery ---
16+
# Cameras are auto-discovered from the SDM API on each recording run.
17+
# cam_id = last 6 chars of the SDM device path (e.g. "J_EDEw").
18+
# No manual DEVICE_* / CAM_ID_* configuration is needed.
19+
# Discovery requires a valid access token (from secrets/ or env vars above).
20+
21+
# --- Supabase connection (for camera auto-registration) ---
22+
# register_cameras.sh upserts discovered cameras into the cameras table.
23+
# Get these values from: cd backend/supabase/supabase && npx supabase status
24+
GYM_ID=00000000-0000-0000-0000-000000000000
25+
SUPABASE_URL=http://192.168.0.66:54321
26+
SUPABASE_SERVICE_KEY=your-service-role-key-here
3927

4028
# --- Recording window & segmentation ---
4129
# WINDOW_MINUTES: total window to capture per invocation
4230
# PRE_ROLL_SECONDS: lead-in seconds before window start
4331
# SEG_SECONDS: segment length for rolling file outputs
44-
# EXTEND_SLEEP: additional idle time between iterations (dev workflows)
4532
WINDOW_MINUTES=30
4633
PRE_ROLL_SECONDS=10
4734
SEG_SECONDS=300
48-
EXTEND_SLEEP=0
4935

50-
# --- Optional cache directory (defaults to /recordings/secrets) ---
51-
# SDM_CACHE_DIR=/recordings/secrets
52-
53-
# SDM secrets are mounted at /secrets; path is fixed inside container
36+
# --- Optional overrides ---
5437
# SDM_SECRETS_DIR=/secrets
38+
# SDM_CACHE_DIR=/recordings/secrets

services/nest_recorder/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
secrets/*.txt
2+
secrets/*.json
3+
secrets/google_3api
4+
!secrets/.keep
5+
!secrets/README.md

services/nest_recorder/recorder/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ENV LANG=C.UTF-8
1010

1111
# Workdir & scripts
1212
WORKDIR /app
13-
COPY entrypoint.sh get_access_token.sh record_window.sh list_cameras.sh diag_v*.sh /app/
13+
COPY entrypoint.sh get_access_token.sh record_window.sh \
14+
list_cameras.sh register_cameras.sh diag_v*.sh /app/
1415
RUN chmod +x /app/*.sh
1516

1617
# Data mount point

0 commit comments

Comments
 (0)