Skip to content

feat: Story 023 — Data Synchronization (Offline Check-in)#55

Merged
iagocavalcante merged 13 commits intomainfrom
feat/story-023-data-synchronization
Apr 21, 2026
Merged

feat: Story 023 — Data Synchronization (Offline Check-in)#55
iagocavalcante merged 13 commits intomainfrom
feat/story-023-data-synchronization

Conversation

@iagocavalcante
Copy link
Copy Markdown
Contributor

Summary

  • Add device_assignments table linking devices to events, and device_id FK on check_ins for tracking offline origins
  • Add Pretex.Sync context with manifest download (full + incremental) and offline check-in upload with earliest-timestamp-wins conflict resolution
  • Add DeviceAuth plug and JSON API endpoints: GET /api/sync/manifest, POST /api/sync/checkins
  • Add device-to-event assignment UI in admin device management page

Test plan

  • Run mix ecto.migrate to apply new migration
  • Run mix test — verify all new tests pass (device assignments, sync context, device auth plug, sync controller)
  • Provision a device, assign it to an event, and verify GET /api/sync/manifest returns attendee data
  • Upload offline check-ins via POST /api/sync/checkins and verify conflict resolution (earliest timestamp wins)
  • Test incremental sync with ?since= parameter returns only changes
  • Verify admin UI shows event assignment tags with add/remove functionality

Closes #23

🤖 Generated with Claude Code

iagocavalcante and others added 13 commits April 2, 2026 19:10
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ope on upload

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@iagocavalcante iagocavalcante merged commit 5163b37 into main Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Story 023: Data Synchronization (Offline Check-in)

1 participant