# Integration checklist

## Before integration
- [ ] Obtain current website source ZIP and database schema export.
- [ ] Confirm current student primary key type and ID mapping.
- [ ] Confirm parent/guardian schema and relationship cardinality.
- [ ] Confirm existing authentication, roles, permissions, and audit facilities.
- [ ] Create full source and database backup.
- [ ] Create isolated staging environment.

## Database
- [ ] Review all `ss_*` tables and key types.
- [ ] Add foreign keys only after matching actual existing key types.
- [ ] Add indexes based on real query patterns.
- [ ] Configure retention and backup policy.

## Attendance
- [ ] Provision high-entropy device tokens; store hashes only.
- [ ] Provision opaque random card credentials; store hashes only.
- [ ] Implement session/timezone/holiday rules.
- [ ] Implement concurrency-safe daily attendance updates.
- [ ] Add event outbox and enqueue WhatsApp notifications after commit.
- [ ] Test duplicate UUID, repeated scans, simultaneous scans, invalid card and revoked card.
- [ ] Test QR, keyboard-wedge barcode, Android NFC and USB PC/SC NFC separately.

## WhatsApp
- [ ] Create/verify Meta Business assets and phone number.
- [ ] Configure Cloud API credentials in secret storage.
- [ ] Create and obtain approval for required Utility templates.
- [ ] Record consent source, timestamp and revocation.
- [ ] Verify webhook signature and deduplicate webhook events.
- [ ] Normalize sent/delivered/read/failed callbacks.
- [ ] Classify retryable and permanent errors; cap retries and provide dead-letter handling.
- [ ] Verify opt-out and no-send behavior.

## Release
- [ ] Connect existing RBAC and CSRF protection.
- [ ] Run security and load tests.
- [ ] Test backup/restore.
- [ ] Complete privacy notice and retention policy.
- [ ] Pilot with a small group before school-wide rollout.
