**AI Personalization Engine (Backend):** 1. **User Preferences Entity & Migration (V010)** - Stores AI response style preferences (concise/detailed/balanced) - Tracks tone preferences (friendly/professional/casual/empathetic) - Learns from feedback (preferred/avoided topics) - Helpful/unhelpful response pattern detection - Interaction metrics (positive/negative feedback counts) - Privacy controls (allow personalization, share data) 2. **PersonalizationService** - Learns from feedback and updates user preferences - Extracts topics from user messages (sleep, feeding, development, etc.) - Updates topic weights based on feedback (+/-0.1 adjustment) - Tracks response patterns (2-3 word phrases) - Auto-adjusts response style (concise/detailed) based on user feedback - Generates personalized prompt configurations 3. **Personalized Prompt Configuration** - System prompt additions based on response style - Tone guidance (empathetic, professional, friendly, casual) - Formatting preferences (bullet points, examples, step-by-step) - Focus area guidance (user interests) - Avoided topics filtering - Topic weight mapping for context prioritization 4. **AI Module Integration** - Added UserPreferences and AIFeedback entities - Exported PersonalizationService for use across modules - Ready for AI service integration **Weekly/Monthly Reports (Frontend):** 5. **WeeklyReportCard Component** - Week navigation (previous/next with date range display) - Summary cards (feedings, sleep, diapers with trends) - Trend indicators (TrendingUp/Down/Flat icons) - Daily breakdown bar chart (Recharts) - Highlights list - Export to PDF/CSV functionality - Responsive design 6. **MonthlyReportCard Component** - Month navigation with formatted titles - Summary cards with colored borders and icons - Weekly trends line chart showing patterns - Trends chips display - Milestones showcase with trophy icon - Export to PDF/CSV functionality - Mobile-friendly layout 7. **Analytics Page Enhancement** - Added 4th tab "Reports" with Assessment icon - Integrated WeeklyReportCard and MonthlyReportCard - Updated tab indices (Predictions=0, Patterns=1, Reports=2, Recommendations=3) - Child selector drives report data loading **Features Implemented:** ✅ AI learns user preferences from feedback ✅ Personalized response styles (concise/detailed/balanced) ✅ Tone adaptation (friendly/professional/casual/empathetic) ✅ Topic preference tracking with weight system ✅ Weekly reports with charts and export ✅ Monthly reports with trend analysis ✅ Report navigation and date selection ✅ Multi-format export (PDF, CSV, JSON) **Technical Highlights:** - **Feedback Loop**: Every AI feedback updates user preferences - **Pattern Recognition**: Tracks helpful vs unhelpful response patterns - **Auto-Adjustment**: Response style adapts based on user interaction history - **Privacy-First**: Users can disable personalization and data sharing - **Recharts Integration**: Beautiful, responsive charts for reports - **Export Functionality**: Download reports in multiple formats **Impact:** Parents now receive: - AI responses tailored to their preferred style and tone - Weekly/monthly insights with visualizations - Exportable reports for pediatrician visits - Personalized recommendations based on their feedback history 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.