48 Commits

Author SHA1 Message Date
Sergei
e74d1a4b26 Show user role under beneficiary name
- Added role field to Beneficiary type
- Display role (Custodian/Guardian/Caretaker) in small gray text under name
- Role comes from user_access table via API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 19:08:12 -08:00
Sergei
28323507f8 Remove redirect from subscription page
Redirects should only happen on the main beneficiary page (index.tsx).
Other pages (subscription, equipment, share) just show their content
without redirecting - user navigated there intentionally via menu.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 18:50:13 -08:00
Sergei
2e72398818 Fix dropdown menu - make full row clickable
- BeneficiaryMenu: dropdownItem now has width: 100%
- Increased minWidth to 180 and added overflow: hidden
- Users can now tap anywhere on the menu row, not just the text

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 18:41:35 -08:00
Sergei
973e9b7ebe Fix Developer Mode WebView authentication
- Add legacy dashboard API methods (eluxnetworks.net)
- Implement JWT token validation before using cached credentials
- Clear invalid tokens (non-JWT strings like "0") and force re-login
- Use correct credentials (anandk/anandk_8)
- Add 30-minute token refresh interval when WebView is active
- Fix avatar upload using expo-file-system instead of FileReader
- Handle address field as both string and object
2026-01-09 17:06:35 -08:00
Sergei
24e7f057e7 Stable version: Reusable BeneficiaryMenu, subscription fixes
- Created reusable BeneficiaryMenu component with Modal backdrop
- Menu closes on outside tap (proper Modal + Pressable implementation)
- Removed debug panel from subscription and beneficiary detail pages
- Fixed subscription creation and equipment status handling
- Backend improvements for Stripe integration
2026-01-09 13:22:56 -08:00
Sergei
79baf86faf Remove invitation code from email, keep only button link
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 13:18:08 -08:00
Sergei
01bebeedbe Fix invitations: remove expires_at (invitations are permanent)
- Remove expires_at from SELECT queries
- Remove expiresAt from API responses
- DB change: dropped expires_at column, fixed FK to beneficiaries table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 13:12:17 -08:00
Sergei
e7831327bd Fix Stripe subscription flow - use SetupIntent
- Changed from PaymentIntent to SetupIntent flow
- SetupIntent always has client_secret (unlike incomplete subscriptions)
- Two-step process: collect payment method, then create subscription
- Added debug panel for troubleshooting (DEBUG_MODE=true)
- Updated price to $49/month (price_1SnYfkP0gvUw6M9C1095uFgW)
- Added react-native-root-toast dependency

Server changes (on 91.98.205.156):
- /create-subscription-payment-sheet: returns SetupIntent instead of subscription
- /confirm-subscription-payment: creates subscription with saved payment method
- Added safeTimestampToISO() to prevent "Invalid time value" errors
2026-01-08 22:16:22 -08:00
Sergei
06802c237b Improve subscription flow, Stripe integration & auth context
- Refactor subscription page with simplified UI flow
- Update Stripe routes and config for price handling
- Improve AuthContext with better profile management
- Fix equipment status and beneficiary screens
- Update voice screen and profile pages
- Simplify purchase flow
2026-01-08 21:35:24 -08:00
Sergei
fe4ff1a932 Simplify DB schema (name/address single fields) + subscription flow
Database:
- Simplified beneficiary schema: single `name` field instead of first_name/last_name
- Single `address` field instead of 5 separate address columns
- Added migration 008_update_notification_settings.sql

Backend:
- Updated all beneficiaries routes for new schema
- Fixed admin routes for simplified fields
- Updated notification settings routes
- Improved stripe and webhook handlers

Frontend:
- Updated all forms to use single name/address fields
- Added new equipment-status and purchase screens
- Added BeneficiaryDetailController service
- Added subscription service
- Improved navigation and auth flow
- Various UI improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 10:35:15 -08:00
Sergei
20be9a94c2 WIP: Navigation controller, subscription flow, and various improvements
- Add NavigationController for centralized routing logic
- Add useNavigationFlow hook for easy usage in components
- Update subscription flow with Stripe integration
- Simplify activate.tsx
- Update beneficiaries and profile screens
- Update CLAUDE.md with navigation documentation
2026-01-04 12:53:38 -08:00
Sergei
1d93311b12 Fix API endpoints to match backend routes
- GET /me/profile → GET /auth/me
- PATCH /me/profile → PATCH /auth/profile

These endpoints now correctly match the backend implementation
in backend/src/routes/auth.js
2026-01-04 12:53:12 -08:00
Sergei
f4ff281bcc Improve invitation UI and fix access removal
- Move role selector (Caretaker/Guardian) above email input in Access screen
- Remove "(view only)" suffix from Caretaker role in email templates
- Remove "expires in 7 days" text from invitation emails
- Remove expires_at field from invitation creation (invitations never expire)
- Fix deletion of accepted invitations (now also removes user_access record)
- Add favicon to accept-invite.html page
2026-01-04 10:28:36 -08:00
Sergei
d9fcdf1751 Improve invitation acceptance flow
- Add GET /api/invitations/info/:code endpoint to fetch role before accepting
- Show role and permissions on accept page BEFORE clicking Accept
- Simplify success page: remove permissions list, add link to wellnuo.com
- Minimalist design: light header background, logo only
2026-01-04 09:04:43 -08:00
Sergei
d0c4930d38 Update API, invitations, beneficiaries and UI components
- Enhanced invitations system with role management
- Updated beneficiaries routes and screens
- Improved activate, purchase and profile flows
- Added Maestro E2E tests
- Added web invite acceptance page
- Database migration for roles update
2026-01-03 13:02:10 -08:00
Sergei
f6a2d5e687 Replace Alert with Toast for invite code copy, rename Share to Access 2026-01-01 13:41:34 -08:00
Sergei
ad35dac850 Update beneficiaries layout and screens 2026-01-01 13:21:25 -08:00
Sergei
7186f29f35 Update activate, purchase and dashboard screens 2025-12-30 21:34:25 -08:00
Sergei
b869e9e3ab Update subscription, equipment screens and auth flow 2025-12-30 21:14:24 -08:00
Sergei
2545aec485 Add equipment status workflow to beneficiary cards
- BeneficiaryCard now shows equipment status badges (ordered/shipped/delivered)
- Added AwaitingEquipmentScreen with progress tracker
- "I received my kit" button to mark as delivered
- "Activate" button when equipment is delivered
- Fixed address field height in add-loved-one form

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 15:48:19 -08:00
Sergei
7cb07c09ce Major UI/UX updates: Voice, Subscription, Beneficiaries, Profile
- Voice tab: simplified interface, voice picker improvements
- Subscription: Stripe integration, purchase flow updates
- Beneficiaries: dashboard, sharing, improved management
- Profile: drawer, edit, help, privacy sections
- Theme: expanded constants, new colors
- New components: MockDashboard, ProfileDrawer, Toast
- Backend: Stripe routes additions
- Auth: activate, add-loved-one, purchase screens
2025-12-29 15:36:44 -08:00
Sergei
f73fbf4eca Fix auth flow, types stability, and stuck loading state. Streamline login process. 2025-12-27 16:05:45 -08:00
Sergei
b740762609 Update main project + add WellNuoLite
- WellNuoLite: облегчённая версия для модерации Apple
- Обновлены chat и voice tabs
- Добавлены TTS модели и сервисы
- Обновлены зависимости
2025-12-26 19:19:00 -08:00
Sergei
c80fd4ab4b Add Stripe checkout, OTP auth improvements, navigation updates
- Add purchase screen with real Stripe Checkout integration
- Add kit activation screen with dev mode notice
- Remove mock OTP mode - only serter2069@gmail.com bypasses OTP
- Fix OTP retry - show error without redirecting to email screen
- Update tab navigation: Dashboard, Chat, Profile (hide Voice)
- Update Brevo sender email to daterabbit.com domain

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-24 13:44:10 -08:00
Sergei
9475890d5a Fix voice picker modal - add minHeight for proper scrolling
- Changed voiceList style from flex: 1 to minHeight: 300
- Added backgroundColor and borderRadius for better visibility
- Now all 35+ voices are visible and scrollable in the DEV modal

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-24 10:31:11 -08:00
Sergei
0b0b46ab3e Refactor auth to Email + OTP flow with dev bypass
- Convert login from username/password to email input
- Add OTP verification screen with auto-login for dev email
- Add dev email bypass (serter2069@gmail.com) using legacy anandk credentials
- Add saveEmail/getStoredEmail methods to API service
- Add email field to User type
- Clean up logout to also clear stored email

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-24 10:09:10 -08:00
Sergei
1a829a120f Fix voice picker scroll - add maxHeight and nestedScrollEnabled
ScrollView now properly scrolls through all 35+ voices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-23 18:13:58 -08:00
Sergei
40646622b8 Add DEV voice picker with 35+ languages for TTS testing
Voice assistant enhancements:
- DEV-only voice picker modal for testing TTS voices
- Support for 35+ languages: English variants, European, Asian, Middle Eastern
- Each voice can be tested with localized sample text
- Speech recognition enabled for voice input
- Continuous conversation mode with auto-listening

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-23 18:11:17 -08:00
Sergei
ec63a2c1e2 Add admin panel, optimized API, OTP auth, migrations
Admin Panel (Next.js):
- Dashboard with stats
- Users list with relationships (watches/watched_by)
- User detail pages
- Deployments list and detail pages
- Devices, Orders, Subscriptions pages
- OTP-based admin authentication

Backend Optimizations:
- Fixed N+1 query problem in admin APIs
- Added pagination support
- Added .range() and count support to Supabase wrapper
- Optimized batch queries with lookup maps

Database:
- Added migrations for schema evolution
- New tables: push_tokens, notification_settings
- Updated access model

iOS Build Scripts:
- build-ios.sh, clear-apple-cache.sh
- EAS configuration updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 11:05:39 -08:00
Sergei
ddfe5c7bd6 Add OTP-based email authentication flow
- Replace username/password login with email OTP flow
- Add verify-otp screen with 6-digit code input
- Add complete-profile screen for new users
- Update AuthContext with refreshAuth() method
- Add new API methods: requestOTP, verifyOTP, getMe, updateProfile
- Backend: wellnuo.smartlaunchhub.com

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 16:53:17 -08:00
Sergei
19d24e7b00 Rename patient to beneficiary throughout the app
- Replace all 'patient' terminology with 'beneficiary'
- Add Voice AI screen (voice.tsx) with voice_ask API integration
- Optimize getAllBeneficiaries() to use single deployments_list API call
- Rename PatientDashboardData to BeneficiaryDashboardData
- Update UI components: BeneficiaryCard, beneficiary picker modal
- Update all error messages and comments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 12:57:48 -08:00
Sergei
12cdab8fad Remove wellnuoSheme from tracking (contains sensitive credentials)
- Add wellnuoSheme/ to .gitignore
- Folder remains locally but excluded from git

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 12:34:18 -08:00
Sergei
3a20d5cc08 Add security middleware to backend
Security features:
- Helmet: Security headers (XSS, clickjacking protection)
- CORS: Whitelist only allowed domains
- Rate Limiting: 100 req/15min general, 5 req/15min for auth
- Stripe webhook signature verification (already had)
- Admin API key protection (already had)

Allowed origins:
- wellnuo.smartlaunchhub.com
- wellnuo.com
- localhost (dev)
- Expo dev URLs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:50:27 -08:00
Sergei
e1b32560ff Add Node.js backend with Stripe integration and admin panel
Backend features:
- Express.js API server
- Supabase database integration
- Stripe Checkout for payments ($249 kit + $9.99/mo premium)
- Stripe webhooks for payment events
- Admin panel with order management
- Auth middleware with JWT
- Email service via Brevo

API endpoints:
- /api/stripe/* - Payment processing
- /api/webhook/stripe - Stripe webhooks
- /api/admin/* - Admin operations
- /function/well-api/api - Legacy API proxy

Database migrations:
- orders, subscriptions, push_tokens tables

Schemes updated:
- Removed updatedAt from all schemes
- Updated credentials section with live values
- Added Stripe configuration details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:49:24 -08:00
Sergei
63c1941b00 Add Supabase migration and update schemes
- Migrated PostgreSQL data to Supabase (531 rows total)
- Added Supabase Database card to ENV scheme
- Added migration SQL files and CSV exports
- Tables: deployments(45), devices(455), person_details(8), deployment_details(23)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-18 13:14:42 -08:00
Sergei
0dd69c2fed Add Android package identifier
Added com.wellnuo.app package name for Android builds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 10:56:52 -08:00
Sergei
78e65f2dfd Fix Bundle ID and ASC App ID for App Store Connect
Updated to match existing App Store Connect app:
- Bundle ID: com.wellnuo.app (was com.kosyakorel1.wellnuo)
- ASC App ID: 6756504446 (was 6755984871)
- Added SKU: EX1765577542748

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 17:29:40 -08:00
Sergei
8590202d53 Sync latest changes
- Updated login screen
- Updated chat screen
- Updated AuthContext
- Updated API service
- Updated packages
- Updated discussion docs and scheme

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 17:14:45 -08:00
Sergei
1e2c2b9856 Full sync with auth screens and discussion docs
Added:
- forgot-password.tsx, register.tsx auth screens
- Discussion_Points.md and Discussion_Points.txt

Updated:
- login, chat, index, beneficiary detail screens
- profile/help and profile/support
- API service
- Scheme files (Discussion, AppStore)

All assets/images are tracked and safe.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 17:04:46 -08:00
Sergei
abcc380984 Sync all changes - profile restructure and scheme updates
- Restructured profile screens location
- Updated beneficiary detail page
- Updated API service
- Updated all scheme files (MainScheme, ENV API, Discussion, AppStore, SysAnal)
- Added PageHeader component

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 16:48:07 -08:00
Sergei
48384f07c5 Full project sync - app updates and profile screens
Changes:
- Updated app.json, eas.json configurations
- Modified login, chat, profile, dashboard screens
- Added profile subpages (about, edit, help, language,
  notifications, privacy, subscription, support, terms)
- Updated BeneficiaryContext
- Updated API service and types
- Updated discussion questions scheme
- Added .history to gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 16:26:13 -08:00
Sergei
68b89d2565 v1.0.0 - First stable release
Stable version with:
- WellNuo mobile app (React Native + Expo)
- Beneficiaries management
- Dashboard integration
- API documentation in wellnuoSheme/
- App icons and assets
- EAS build configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 14:03:03 -08:00
Sergei
915664d4cc Add scheme files, beneficiaries module, dashboard improvements
Changes:
- Add wellnuoSheme/ folder with project documentation
- Rename patients -> beneficiaries (proper WellNuo terminology)
- Add BeneficiaryContext for state management
- Update API service with WellNuo endpoints
- Add dashboard screen for beneficiary overview
- Update navigation and layout

Scheme files include:
- API documentation with credentials
- Project description
- System analysis
- UX flow
- Legal documents (privacy, terms, support)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 13:38:38 -08:00
Sergei
a804a82512 Implement Auth, Patients List, and Dashboard
Features:
- Login screen with API integration (credentials endpoint)
- SecureStore for token management
- Patients list with health data display
- Patient dashboard with stats and quick actions
- AI Chat screen (voice_ask API integration)
- Profile screen with logout
- Full error handling and loading states
- WellNuo brand colors and UI components

API Integration:
- Base URL: eluxnetworks.net/function/well-api/api
- Auth: function=credentials
- Chat: function=voice_ask

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:58:15 -08:00
Sergei
6af55cbd8d Add WellNuo Voice Assistant - React Native Expo clean project
 Complete project reset and setup:
- Removed all previous code and commits
- Created fresh Expo React Native application
- Added default project structure and dependencies
- Ready for voice assistant development

🎯 Application successfully running in iOS simulator
📁 Ready to push to Gitea development branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 11:45:52 -08:00
Sergei
cd8de4a7d4 Initial commit: Clean WellNuo Voice Assistant React Native Expo project
- Fresh Expo React Native application setup
- Default template with standard dependencies
- Ready for voice assistant development
- Connected to Gitea development branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 11:36:23 -08:00
Sergei
4a5331b2e4 [TEST] Initial setup - NOT PRODUCTION CODE
⚠️ This is test/experimental code for API integration testing.
Do not use in production.

Includes:
- WellNuo API integration (dashboard, patient context)
- Playwright tests for API verification
- WebView component for dashboard embedding
- API documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 13:25:14 -08:00
Sergei
2aef0bcf93 Initial commit
Generated by create-expo-app 3.5.3.
2025-12-01 18:22:23 -08:00