Commit Graph

14 Commits

Author SHA1 Message Date
steinhelge 018f84efd8 Auto-create athlete in startlist for unrecognized bib numbers
Build & Deploy / build-and-deploy (push) Successful in 45s
When a bib number is detected (via OCR or manual entry during review)
but not found in the start list, it is now automatically added with
the placeholder name "Ukjent #<nr>" instead of being left without a
profile_id (which would exclude it from results).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:51:03 +01:00
steinhelge 99565daafb Add migration for race_id column on existing passages table
Build & Deploy / build-and-deploy (push) Successful in 38s
CREATE TABLE IF NOT EXISTS does not add new columns to existing tables.
Use ALTER TABLE to migrate databases that predate this change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:48:26 +01:00
steinhelge 5393e85a74 Add race and station management
Build & Deploy / build-and-deploy (push) Successful in 2m18s
- races table: name, date, description, is_active
- stations table: ordered checkpoints with GPS per race
- New /api/races and /api/races/{id}/stations endpoints
- Upload now requires race + station selection; uses station GPS
  so images without GPS EXIF are accepted
- passages filtered by active race throughout
- RacePage: create races, manage stations (add/edit/delete checkpoints)
- Navbar shows active race name
- Start and finish stations created automatically per race

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:44:45 +01:00
steinhelge 3dcf979e6f Increase nginx client_max_body_size to 100m for image uploads
Build & Deploy / build-and-deploy (push) Successful in 27s
Default 1MB limit caused 413 errors for raw images (14MB+).
Also add proxy_read_timeout for large uploads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:36:56 +01:00
steinhelge 82e1124f9f Add web upload: drag-and-drop images to depot via browser
Build & Deploy / build-and-deploy (push) Successful in 37s
- POST /api/upload saves files to /depot/ for ingest processing
- Batches of 10 files per request
- Drag-and-drop zone + file picker, per-file status feedback
- New 'Last opp'-tab in navbar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:33:27 +01:00
steinhelge f756ec5412 Push images via internal Gitea port 3000, bypass Cloudflare/Traefik
Build & Deploy / build-and-deploy (push) Successful in 26s
Pushes go to 192.168.86.31:3000 (HTTP, insecure-registry).
Deploy pulls from same internal address.
Requires on alu:
  insecure-registries: ["192.168.86.31:3000"] in /etc/docker/daemon.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 22:34:03 +01:00
steinhelge 21565a2815 test: trigger CI etter registry-token-fix
Build & Deploy / build-and-deploy (push) Failing after 6m10s
2026-03-20 20:25:11 +01:00
steinhelge 9b5ab3bd3e Remove ineffective /etc/hosts step from workflow
Build & Deploy / build-and-deploy (push) Has been cancelled
Host-level /etc/hosts must be set on alu directly.
Docker copies host's /etc/hosts to spawned containers,
so buildx will use the internal route automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 20:24:22 +01:00
steinhelge 47cf983154 Route registry push via internal network to bypass Cloudflare
Build & Deploy / build-and-deploy (push) Failing after 2m42s
act_runner and Gitea run on the same host (alu/192.168.86.31),
so we override DNS in the runner to push directly over LAN.
This avoids Cloudflare's upload size limit (413 on 7.79GB image).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 16:03:56 +01:00
steinhelge 9c10124611 Keep all burst images, use last timestamp as passage time
Build & Deploy / build-and-deploy (push) Failing after 2m41s
- passage_images table stores every image in a burst sequence
- Passage timestamp = last image (chronologically) in the burst
- Review UI: image slider to browse all burst images, slider ends
  at the official passage time (rightmost = last image)
- API: GET /api/passages/{id}/images

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 15:27:39 +01:00
steinhelge 24645dfd11 Add deduplication: keep image closest to camera within 2s window
Build & Deploy / build-and-deploy (push) Has been cancelled
Within a burst sequence from the same station, the image where the athlete
is physically closest to the camera gives the most accurate passage timestamp.
Proximity is measured by bib bounding box area (larger = closer).

When a duplicate is detected:
- New image closer: update timestamp + image path, delete old image
- Existing image closer: discard new image

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 15:22:57 +01:00
steinhelge b191b08579 test: trigger CI etter registry-token-fix
Build & Deploy / build-and-deploy (push) Has been cancelled
2026-03-20 15:12:37 +01:00
steinhelge 0a5d4d7222 Add Gitea Actions workflow and server docker-compose
Build & Deploy / build-and-deploy (push) Failing after 1m45s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 15:04:18 +01:00
steinhelge 330ba7a93d Initial commit: MVP tidtakingssystem
- Backend: FastAPI, EXIF-parser, EasyOCR, SQLite
- Frontend: React admin (startliste, passeringer, gjennomgang, resultater)
- Docker: docker-compose med depot/processed/data-volumer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 15:01:33 +01:00