Skip to content

feat: caregiver push flow + hexagonal architecture#4

Merged
thlaure merged 7 commits into
mainfrom
feat/caregiver-push-flow
Apr 12, 2026
Merged

feat: caregiver push flow + hexagonal architecture#4
thlaure merged 7 commits into
mainfrom
feat/caregiver-push-flow

Conversation

@thlaure
Copy link
Copy Markdown
Owner

@thlaure thlaure commented Apr 12, 2026

Summary

  • Restructures backend/src/ to Domain/Application/Infrastructure/UI layers (ports-and-adapters)
  • Adds full caregiver model: CaregiverLink, CaregiverInvite, CaregiverPushToken, AlertAcknowledgement, PushAttempt
  • Adds invite-code linking flow, FCM push gateway, and SendFallAlertPushMessage handler dispatching alongside SMS
  • Adds FakePushStore + GET /debug/fake-push endpoint mirroring the existing SMS debug tooling
  • Adds Behat integration suite (18 scenarios, 150 steps) covering device registration, fall alert, caregiver invite, acknowledgement, and end-to-end push dispatch
  • Adds PHPUnit unit tests for all 5 application handlers/services (30 tests)
  • Adds Flutter caregiver app scaffold with device registration, invite linking, FCM push reception, and alert screens
  • Updates protected-person Flutter app contacts screen to caregiver invite flow
  • Fixes dd( blacklist false positive on ->add( and removes non-existent Rector skip rule

Test plan

  • All Behat scenarios pass: make test-behat
  • All PHPUnit tests pass: make test
  • PHPStan level 9: make phpstan
  • End-to-end push scenario: register protected + caregiver → invite → link → FCM token → fall alert → GET /debug/fake-push returns 1 message
  • Flutter tests pass: flutter test in flutter_app/

🤖 Generated with Claude Code

Thomas Laure and others added 7 commits April 12, 2026 21:24
Expanded all skill and command definitions with concrete workflows,
local-project rules, and quality-gate references. Enriched patterns.md
with hexagonal architecture and caregiver-flow conventions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restructures src/ to Domain/Application/Infrastructure/UI layers
following ports-and-adapters. Adds the full caregiver model
(CaregiverLink, CaregiverInvite, CaregiverPushToken,
AlertAcknowledgement, PushAttempt) with invite-code linking, FCM push
gateway, and a SendFallAlertPushMessage handler that dispatches
alongside the existing SMS path. Fixes the dd( blacklist false positive
on ->add( and removes a non-existent Rector skip rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets up FriendsOfBehat/SymfonyExtension with bootstrap, services_test
config, and behat.yaml.dist pointing to the test environment. Adds
feature files covering device registration, fall alert flow, caregiver
invite, and alert acknowledgement. Adds PHPUnit unit tests for all five
application handlers/services. Fixes DebugFakeSmsControllerTest
isolation by clearing the file-backed store before each run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New Flutter app for caregivers with device registration, invite-code
linking, FCM push notification reception, and alert screens
(ActiveAlertScreen, LinkScreen, HomeScreen). Uses firebase_messaging
for data-only push handling in all app states.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the phone-number contacts form with an invite-code flow:
the protected person generates a code (POST /api/v1/invites) and the
screen displays it with a countdown. Renames AlertPhase.sendingSms to
sendingAlert, adds createInvite() to BackendApiService, and updates
localization strings and coordinator tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reflects completed caregiver model, push notification infrastructure,
Behat test suite, and Flutter invite flow. Adds
NEXT_IMPLEMENTATION_STEPS.md with the remaining work towards a fully
functional end-to-end push notification path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors the FakeSmsStore pattern for push: FakePushStore persists each
dispatched push to fake_push_inbox.jsonl, FakePushGateway writes to it
instead of logging, and DebugFakePushController exposes GET
/debug/fake-push (non-prod only). Adds an end-to-end Behat scenario
that verifies the full chain: invite → link → FCM token → fall alert →
push dispatched. Also clears both stores before each Behat scenario.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thlaure thlaure merged commit 6d9e204 into main Apr 12, 2026
6 checks 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.

1 participant