Commit graph

72 commits

Author SHA1 Message Date
fbbc479032 Fix date handling in admin APIs 2026-05-10 23:12:56 +05:30
fe364c6e11 Fix admin API to use family_members table 2026-05-10 23:11:18 +05:30
43ee05d661 Fix TypeScript errors in revenue and support API 2026-05-10 22:47:38 +05:30
cda25b04ca Add comprehensive admin panel with analytics, families, users, children, revenue, support, settings 2026-05-10 22:43:20 +05:30
d5b07078ae Add Admin System
- 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>
2026-05-10 22:17:21 +05:30
09dee5d987 Sprint 3: Admin Panel + Family Switching Complete
- 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>
2026-05-10 22:11:52 +05:30
f03484f262 Sprint 2: Invitation System Complete
- /api/invites - GET/POST invites
- /api/invites/accept - POST accept invite
- /invite/[token] - Accept invite page
- Settings page now has invite UI
- Checks member limit for free tier
- Shows upgrade prompt when limit reached

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 21:54:41 +05:30
c3255e82da Migrate Chat Sessions to database
- 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>
2026-05-10 21:13:21 +05:30
3e66b259f2 Migrate medical data from localStorage to database
- 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>
2026-05-10 21:07:26 +05:30
967e00c4fa Add smart onboarding to Activity page
- 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>
2026-05-10 16:12:23 +05:30
83314e91a8 Update Family, Profile with working APIs - fetch & save baby details 2026-05-10 15:52:59 +05:30
6a6a0e91da Fix: check R2 config at runtime not build time 2026-05-10 15:30:15 +05:30
c58f64552d Use env vars for R2 (remove hardcoded creds) 2026-05-10 15:18:49 +05:30
cc239ec574 Fix public URL format 2026-05-10 15:10:09 +05:30
e5b57ee7bc Fix endpoint: remove /tia path 2026-05-10 15:08:40 +05:30
cf5ea7b820 Working upload, list has issues 2026-05-10 15:02:47 +05:30
1dd8563450 Debug: list buckets first 2026-05-10 15:01:53 +05:30
d2c7cee1e8 Final fix for upload API 2026-05-10 14:48:22 +05:30
1fc52a0609 Clean upload API with proper types 2026-05-10 14:46:49 +05:30
4bac63e065 Fix endpoint: add /tia suffix 2026-05-10 14:45:29 +05:30
59ae046726 Simplify: just list bucket contents for debug 2026-05-10 14:44:30 +05:30
d4f617e159 Use account-level endpoint 2026-05-10 14:43:35 +05:30
7b4f47667b Use hardcoded R2 credentials (for testing only) 2026-05-10 14:42:50 +05:30
73c3ddb53e Debug: list all bucket objects 2026-05-10 14:42:03 +05:30
bdd2d3967b Clean up upload API 2026-05-10 14:41:18 +05:30
3e63930e21 Fix list: search all memories with prefix 2026-05-10 14:40:33 +05:30
1c352dade1 Fix endpoint format 2026-05-10 14:38:20 +05:30
c8950589b3 More debug logging 2026-05-10 14:37:34 +05:30
c13b77e5e8 Debug: add logging to list 2026-05-10 14:36:42 +05:30
9f77e6cfaf Use correct R2 public URL 2026-05-10 14:35:32 +05:30
4acd016b70 Use R2 public development URL 2026-05-10 14:35:11 +05:30
864ecc2587 Fix R2 endpoint with bucket path 2026-05-10 14:30:29 +05:30
5de4294919 Use bucket path format 2026-05-10 14:26:08 +05:30
2bf37de50b Fix R2 subdomain URL for tia bucket 2026-05-10 14:25:34 +05:30
cbc058acbe Fix R2 bucket path URL 2026-05-10 14:24:31 +05:30
07381bdf90 Simplify R2 client 2026-05-10 14:24:17 +05:30
7d98c2c46c Fix R2 URL format 2026-05-10 14:24:07 +05:30
e37b9528f9 Fix R2 URL path with bucket name 2026-05-10 14:22:32 +05:30
b39f344426 Fix upload: route through server to avoid CORS 2026-05-10 14:13:17 +05:30
e3c33bb0dc Debug upload: add error handling 2026-05-10 14:07:14 +05:30
191f176a26 Fix R2 URL path 2026-05-10 14:00:23 +05:30
3334277ec9 Sprint 4: Media Pipeline with Cloudflare R2
- Add R2 credentials (.env.local)
- Create /api/upload with presigned URLs
- Memories gallery UI with grid view and upload
- Images stored in tia bucket
2026-05-10 13:59:22 +05:30
5f341d694a Fix model to minimax-2.7 2026-05-10 12:10:07 +05:30
50a5f2a972 Fix LiteLLM URL to llm.manohargupta.com 2026-05-10 12:09:21 +05:30
d318fed3ca Debug AI response 2026-05-10 12:09:12 +05:30
c466c8bad5 Use LiteLLM gateway URL 2026-05-10 12:08:48 +05:30
c6ae0593f6 Add Ollama fallback + better error handling 2026-05-10 12:06:47 +05:30
d070dd8d21 Fix MiniMax API with correct model name 2026-05-10 12:06:00 +05:30
bbb3953147 Use MiniMax API directly 2026-05-10 12:04:39 +05:30
89ca48b420 Try multiple model names for AI API 2026-05-10 12:01:11 +05:30