- Use sql template literals instead of unsafe queries
- Handle UUID child_id requirement properly
- Fetch messages separately to avoid GROUP BY issues
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add back link (←) to /menu in header
- Send button: gray out while loading to prevent double-click
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Header: align with Growth page pattern (p-4, back button left)
- Link: / → /menu
- Rename: Medical 💊 → Medical
- Fix: TT/Td → Tetanus and adult diphtheria (Td) to avoid Turbopack SWC parser error
Note: Apply fixes one change at a time between builds to avoid Turbopack caching issues.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove display_name from query (column doesn't exist in DB)
- Use sql template literals instead of unsafe()
- Fix settings page to show member.name properly
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Settings: Merge Family Settings + Family + Family Members into one Family section
- Add familyName to FamilyProvider from session API
- Show family name, plan, members count, children count in one place
- Show members list with roles
- Remove redundant sections
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add signout button to menu (below Settings)
- Fix profile API to fetch user from database session
- Fix profile page to save name to database
- Fix settings page to use familyId from FamilyProvider
- Fix family page to use FamilyProvider
- Fix activity, ai, medical, memories pages to use FamilyProvider
- Remove all hardcoded "default" familyId and childId values
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add API error handling when fetching children
- Set loading to false on API errors to prevent infinite loading state
- Fix pnpm-workspace.yaml for build approval
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Admin login at /admin/login
- Admin dashboard at /admin
- Username: admin, Password: admin123
- Separate from family email login
Family Login: /login (email-based)
Admin Login: /admin/login (username/password)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- FamilySwitcher component for multi-family support
- /api/family/members - GET members, PATCH role, DELETE remove
- /api/family - GET/PATCH family details
- Settings: Family Members list
- Settings: Family Settings (name, pediatrician phone, tier)
- Upgrade to Pro prompt in family settings
Full multi-family auth system now complete!
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add tier system migration (free/pro)
- FamilyProvider with tier and memberCount
- Ready for freemium model with limits
Run migration:
psql -f drizzle/0005_tier_system.sql
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- FamilyProvider context for auth-based child fetching
- Replaced hardcoded childId with useFamily() hook
- Added tier and memberCount to context (for Pro tier)
- Updated layout to wrap with FamilyProvider
- Added null checks for child data
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add chat_sessions and chat_messages tables
- Create /api/chat endpoint for CRUD operations
- Update home page and /ai page to use database
- All chat history now persists across sessions and devices
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add database tables: medicines, allergies, doctor_visits, illness_logs
- Create API endpoints: /api/medicines, /api/allergies, /api/visits, /api/illnesses
- Update medical page to use database APIs instead of localStorage
- All medical data now persists across sessions and devices
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Renamed Visits to Doctor Visit
- Medicine: add edit delete with name, dose, notes, reminder time
- Allergies: add edit delete with severity (mild/moderate/severe)
- Doctor Visit: add edit delete with doctor, reason, date, notes
- Illness: add edit delete with start/end dates
- All data persists to localStorage
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Each medicine/supplement now has reminder clock button
- Click to set daily reminder time
- Visual feedback when reminder is set
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Allergies section with add button
- Doctor Visits tracking section
- Illness Log section
- More tab buttons for navigation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove duplicate Growth tab from Medical page
- Add Medicine tab with common baby supplements
- Includes Vitamin D3, Iron, Calcium, Zinc, Omega-3, Probiotics
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Vaccinations:
- Allow custom date input when marking vaccine as given
- Show actual administered date alongside scheduled due date
Growth:
- Add WHO child growth standards data (boys/girls)
- Show age-based benchmarks on Growth page
- Display percentile ranges for weight and height
- Show latest measurement compared to standards
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Pediatric guidelines data with age-based schedules
- Show child's age and benchmarks on Activity page
- AI history generation via /api/history
- Generate button to auto-populate past logs from birth
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Timeline view showing logs grouped by day
- Filter by log type (feed/sleep/diaper)
- Toggle between timeline and calendar views
- Calendar view placeholder for future implementation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>