This commit adds a complete onboarding improvements system including progress
tracking, streamlined UI, and role-based family invitation system.
## Backend Changes
### Database Migrations
- Add onboarding tracking fields to users table (onboarding_completed, onboarding_step, onboarding_data)
- Add role-based invite codes to families table (parent/caregiver/viewer codes with expiration)
- Add indexes for fast invite code lookups
### User Preferences Module
- Add UserPreferencesController with onboarding endpoints
- Add UserPreferencesService with progress tracking methods
- Add UpdateOnboardingProgressDto for validation
- Endpoints: GET/PUT /api/v1/preferences/onboarding, POST /api/v1/preferences/onboarding/complete
### Families Module - Role-Based Invites
- Add generateRoleInviteCode() - Generate role-specific codes with expiration
- Add getRoleInviteCodes() - Retrieve all active codes for a family
- Add joinFamilyWithRoleCode() - Join family with automatic role assignment
- Add revokeRoleInviteCode() - Revoke specific role invite codes
- Add sendEmailInvite() - Generate code and send email invitation
- Endpoints: POST/GET/DELETE /api/v1/families/:id/invite-codes, POST /api/v1/families/join-with-role, POST /api/v1/families/:id/email-invite
### Email Service
- Add sendFamilyInviteEmail() - Send role-based invitation emails
- Beautiful HTML templates with role badges (👨👩👧 parent, 🤝 caregiver, 👁️ viewer)
- Role-specific permission descriptions
- Graceful fallback if email sending fails
### Auth Service
- Fix duplicate family creation bug in joinFamily()
- Ensure users only join family once during onboarding
## Frontend Changes
### Onboarding Page
- Reduce steps from 5 to 4 (combined language + measurements)
- Replace card-based selection with dropdown selectors
- Add automatic progress saving after each step
- Add progress restoration on page mount
- Extract FamilySetupStep into reusable component
### Family Page
- Add RoleInvitesSection component with accordion UI
- Generate/view/copy/regenerate/revoke controls for each role
- Send email invites directly from UI
- Display expiration dates (e.g., "Expires in 5 days")
- Info tooltips explaining role permissions
- Only visible to users with parent role
### API Client
- Add role-based invite methods to families API
- Add onboarding progress methods to users API
- TypeScript interfaces for all new data structures
## Features
✅ Streamlined 4-step onboarding with dropdown selectors
✅ Automatic progress save/restore across sessions
✅ Role-based family invites (parent/caregiver/viewer)
✅ Beautiful email invitations with role descriptions
✅ Automatic role assignment when joining with invite codes
✅ Granular permission control per role
✅ Email fallback if sending fails
✅ All changes tested and production-ready
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed from git tracking:
- Development documentation: ADMIN_IMPLEMENTATION_STATUS.md, DATABASE_SCHEMA_SYNC.md, PROGRESS.md, PRODUCTION_DEPLOYMENT.md, PRODUCTION_INSTALLATION.md, TESTING.md, PACKAGE_UPGRADE_PLAN.md, BACKUP_STRATEGY.md
- Production scripts: deploy-production.sh, migrate-production.sh, start-production.sh, stop-production.sh
- Test files: test-azure-openai.js, test-prompt-injection.*, test-rate-limit.sh, test-voice-intent.mjs, test-audio.wav
- Example files: example-queries.gql
Updated .gitignore to exclude:
- Development documentation patterns (*_IMPLEMENTATION_STATUS.md, etc.)
- Production deployment scripts
- Test scripts and files (test-*.js, test-*.ts, test-*.mjs)
- Temp directories (**/temp/)
- Example files (example-queries.gql)
All files remain available locally but won't clutter the repository.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed from git tracking:
- docs/ folder (all planning and implementation documentation)
- CLAUDE.md (AI assistant instructions)
- start-dev.sh and stop-dev.sh (development scripts)
Updated .gitignore to exclude:
- Documentation and planning files (docs/, CLAUDE.md)
- Development scripts and logs (*.dev.log, start-dev.sh, stop-dev.sh)
- Development environment folders (.dev/, dev-data/)
- Temporary development files (*.tmp, *.temp, .scratch/)
These files remain available locally for development but won't be committed to the repository.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>