{ "_meta": { "name": "ENV and existing API", "updatedAt": "2025-12-12T21:35:27.543Z" }, "elements": [ { "id": "env_header", "type": "card", "title": "WellNuo API Documentation", "borderColor": "purple", "tags": [ "overview" ], "description": "Backend API for WellNuo Elderly Monitoring System\n\nBase URL: https://eluxnetworks.net/function/well-api/api\nMethod: POST\nContent-Type: application/x-www-form-urlencoded", "x": 140, "y": 77.5 }, { "id": "web_dashboard", "type": "card", "title": "Web Dashboard", "borderColor": "blue", "tags": [ "frontend", "verified" ], "description": "React Web Application\n\nURL: https://react.eluxnetworks.net/dashboard\nStack: React + TailwindCSS\nAuth: JWT tokens stored in localStorage (auth2)\n\nNote: For embedding in mobile app via WebView", "x": 140, "y": 192.5 }, { "id": "api_auth", "type": "card", "title": "Authentication API ✓", "borderColor": "green", "tags": [ "backend", "verified" ], "description": "function=credentials\n\nRequest:\n- user_name: string (e.g. \"anandk\")\n- ps: string (password, e.g. \"anandk_8\")\n- clientId: string (device ID, e.g. \"001\")\n- nonce: string (random, e.g. \"111\")\n\nResponse:\n{\n \"access_token\": \"eyJhbG...\",\n \"privileges\": \"21,38,29,41,42\",\n \"user_id\": 43,\n \"max_role\": 2,\n \"status\": \"200 OK\"\n}", "x": 513.6377563476562, "y": 98.70745849609375 }, { "id": "api_voice_ask", "type": "card", "title": "AI Chat API ✓", "borderColor": "green", "tags": [ "backend", "verified" ], "description": "function=voice_ask\n\nRequest:\n- clientId: string (e.g. \"MA_001\")\n- user_name: string\n- token: string (JWT from auth)\n- question: string (e.g. \"how is dad doing\")\n- deployment_id: number (e.g. 21)\n\nResponse:\n{\n \"ok\": true,\n \"response\": { \"body\": \"AI response text\" }\n}", "x": 520, "y": 250 }, { "id": "api_location_map", "type": "card", "title": "Location Map API", "borderColor": "yellow", "tags": [ "backend", "pending" ], "description": "name=get_full_location_map\n\nGET request with query params\nReturns: Full location/room mapping\n\nStatus: Needs testing with valid session", "x": 900, "y": 77.5 }, { "id": "api_sensor_data", "type": "card", "title": "Sensor Data API", "borderColor": "yellow", "tags": [ "backend", "pending" ], "description": "name=get_sensor_bucketed_data_by_room_sensor\n\nGET request\nReturns: Bucketed sensor data by room\n\nUsed for: Activity graphs, charts\nStatus: Needs testing", "x": 900, "y": 192.5 }, { "id": "test_credentials", "type": "card", "title": "Test Account ✓", "borderColor": "green", "tags": [ "credentials", "verified" ], "description": "Test User Credentials:\n\nUsername: anandk\nPassword: anandk_8\nClientId: 001 (or any unique string)\nNonce: 111 (or any random string)\n\nUser ID: 43\nPrivileges: 21,38,29,41,42\nMax Role: 2\n\nFor development testing only!", "x": 667.1103515625, "y": -92.53355407714844 }, { "id": "jwt_token", "type": "card", "title": "JWT Token Structure", "borderColor": "teal", "tags": [ "backend" ], "description": "Token Format: JWT (HS256)\n\nPayload:\n{\n \"username\": \"anandk\",\n \"exp\": 1765661023 (Unix timestamp)\n}\n\nExpiration: ~7 days\nStorage: localStorage.auth2 (web)\n\nUsage: Include in all API requests as 'token' param", "x": 520, "y": 422.5 }, { "id": "dashboard_features", "type": "card", "title": "Dashboard Features", "borderColor": "blue", "tags": [ "frontend" ], "description": "Observed in Web Dashboard:\n\n1. Users List (patients)\n2. Activity Status (Active/Inactive)\n3. Sensor List per user\n4. Alert History\n5. Activity Graphs (daily/weekly)\n6. Room-based monitoring", "x": 140, "y": 480 }, { "id": "api_endpoints_needed", "type": "card", "title": "API Endpoints (To Discover)", "borderColor": "orange", "tags": [ "backend", "pending" ], "description": "Endpoints to test/document:\n\n- get_users / list_users\n- get_sensors / list_sensors\n- get_alerts / list_alerts\n- get_activity_data\n- get_reports (daily/weekly/monthly)\n- update_user_settings\n- update_notification_prefs\n\nNote: Need to capture from web app network traffic", "x": 900, "y": 365 }, { "id": "server_info", "type": "card", "title": "Server Infrastructure", "borderColor": "gray", "tags": [ "external" ], "description": "API Server:\n- Domain: eluxnetworks.net\n- IP: 99.105.56.85 (via react subdomain)\n- SSL: Let's Encrypt\n\nReact Frontend:\n- Domain: react.eluxnetworks.net\n- Static hosting\n\nNote: Main domain DNS may be unstable", "x": 1280, "y": 77.5 }, { "id": "expo_config", "type": "card", "title": "Mobile App Config", "borderColor": "green", "tags": [ "frontend", "verified" ], "description": "Tech Stack:\n- Expo SDK 54\n- React Native 0.81.5\n- Expo Router 6.x\n\nFeatures:\n- WebView for dashboard embedding\n- Push notifications (FCM/APNs)\n- Biometric auth (future)", "x": 1436.259521484375, "y": 208.33245849609375 }, { "id": "gitea_repo", "type": "card", "title": "Git Repository ✓", "borderColor": "green", "tags": [ "external", "verified" ], "description": "Gitea Server:\nURL: https://gitea.wellnua.com\nRepo: sergei_t/WellNuo\nBranch: development\n\nCredentials:\n- Username: sergei_t\n- Password: Orelkosyak5!\n\nContains: Mobile app + Scheme files", "x": 1219.4237060546875, "y": 317.50262451171875 }, { "id": "deployment_ids", "type": "card", "title": "Deployment IDs", "borderColor": "teal", "tags": [ "backend" ], "description": "Known deployment_id values:\n\n- 21: AI Assistant deployment\n\nUsed in: voice_ask function\nPurpose: Routes to specific AI model/config\n\nPrivileges contain: 21,38,29,41,42\n(21 appears to match deployment)", "x": 900, "y": 480 }, { "id": "integration_notes", "type": "card", "title": "Mobile Integration Notes", "borderColor": "pink", "tags": [ "frontend" ], "description": "WebView Integration:\n\n1. Load https://react.eluxnetworks.net/login\n2. Inject credentials via JS\n3. Store token in app storage\n4. Use token for native API calls\n5. Handle push notifications natively\n\nAlternative: Pure native with direct API calls", "x": 1280, "y": 480 }, { "id": "web_portal", "type": "card", "title": "Web Portal (Legacy)", "borderColor": "gray", "tags": [ "external" ], "description": "Original Web Portal:\nURL: https://eluxnetworks.net/function/well-api\n\nNote: Main portal before React app\nUsed for: Direct browser access\n\nDocs: https://wellnua.com/Helps/WebApp1/", "x": 1660, "y": 77.5 }, { "id": "android_apk", "type": "card", "title": "Android APK (Reference)", "borderColor": "gray", "tags": [ "external" ], "description": "Existing Android App:\n\nDownload: https://wellnua.com/FW/WellNuoAppV4.apk\n\nNote: Reference implementation\nCan install on Mac via .apk\n\nUseful for: Testing, API discovery", "x": 1660, "y": 192.5 }, { "id": "user_model", "type": "card", "title": "User Model (Credentials)", "borderColor": "teal", "tags": [ "backend" ], "description": "User Profile Fields:\n\n- First name, Last name\n- Email address\n- Username, Password\n- Listening language\n- Talking language\n\nNote: Both users and caretakers can update these", "x": 1660, "y": 307.5 }, { "id": "deployment_model", "type": "card", "title": "Deployment Model (Beneficiary)", "borderColor": "teal", "tags": [ "backend" ], "description": "Beneficiary (Elderly Person) Fields:\n\n- First name, Last name\n- Email, Username, Password\n- Address\n- Number of people\n- Number of pets\n- Year of birth\n- Gender, Race\n- Photo\n- Devices configuration\n\nDeployment ID: Issued by email to paying customers", "x": 1660, "y": 480 }, { "id": "app_settings", "type": "card", "title": "App Settings Structure", "borderColor": "blue", "tags": [ "frontend" ], "description": "Settings Sections:\n\n1. Credentials - User profile\n2. Other - Main Deployment ID, Simulated Alarm, Deployment selection\n3. Deployment - Beneficiary info, Devices\n\nExpand/collapse via arrow icons", "x": 140, "y": 595 } ], "connections": [ { "from": "env_header", "to": "api_auth" }, { "from": "env_header", "to": "web_dashboard" }, { "from": "api_auth", "to": "api_voice_ask" }, { "from": "api_auth", "to": "jwt_token" }, { "from": "api_auth", "to": "api_location_map" }, { "from": "api_location_map", "to": "api_sensor_data" }, { "from": "test_credentials", "to": "api_auth" }, { "from": "web_dashboard", "to": "dashboard_features" }, { "from": "api_sensor_data", "to": "api_endpoints_needed" }, { "from": "api_voice_ask", "to": "deployment_ids" }, { "from": "api_endpoints_needed", "to": "server_info" }, { "from": "server_info", "to": "expo_config" }, { "from": "expo_config", "to": "gitea_repo" }, { "from": "expo_config", "to": "integration_notes" }, { "from": "server_info", "to": "web_portal" }, { "from": "web_portal", "to": "android_apk" }, { "from": "android_apk", "to": "user_model" }, { "from": "user_model", "to": "deployment_model" }, { "from": "dashboard_features", "to": "app_settings" }, { "from": "deployment_ids", "to": "deployment_model" } ], "tagsDictionary": [ { "id": "tag-frontend", "name": "frontend", "color": "green" }, { "id": "tag-backend", "name": "backend", "color": "blue" }, { "id": "tag-external", "name": "external", "color": "orange" }, { "id": "tag-verified", "name": "verified", "color": "lime" }, { "id": "tag-pending", "name": "pending", "color": "yellow" }, { "id": "tag-credentials", "name": "credentials", "color": "red" }, { "id": "tag-overview", "name": "overview", "color": "purple" } ] }