LifeOSAI — Platform Overview · hub-and-spoke view

User Management is the central gateway hub. Six client surfaces fan in on the left. Six backend destinations fan out on the right. Inside the hub: HTTPS ingress, auth middleware, the Express dispatcher, and routing target resolution.
CLIENTS Web UsersBrowser (Next.js)apps/web · port 3000SSR + static Tauri DesktopmacOS · Win · LinuxWebView + sidecarslocal-mode iOS Appapps/ios · nativetalks to cloud UMover HTTPS Internal AdminOps consoledeploy · healthcost · routines Chat UsersWhatsApp · Telegrammessage-drivennever see the app UI Phone CallerVoice bridgeSIP / WebRTC inGemini Live realtime USER MANAGEMENT GATEWAY · apps/user-management · Express on port 3001 INBOUND · ingress + auth middleware IngressCloud Run (HTTPS) · Tauri (HTTP)rate limiters · CORS Auth middlewareJWT validationsession check via apps/auth Webhook receivers/webhook/whatsapp/api/billing (Stripe) · OAuth USER MANAGEMENT CORE · Express dispatcher · the central routing hub Route Dispatcherfiles · models · billingplugins · skills · microappsapps/user-management/src/routes Agent Proxyproxies /api/agent/* requestscloud: spot-vm proxyproxy/agent-proxy.ts Target Resolutioncloud: spot VM agent containerslocal: Tauri sidecar (port 4000)provisioner/spot-vm.ts OUTBOUND · fan-out per route family Agent routes→ Agent API (4000)/api/agent/* Direct routeshandled by UM itselffiles · models · billing · … SSE pass-through/api/events/company/:id→ Agent API SSE ADJACENT SERVICES Web SSR (3000)apps/web · Next.jsserver-side fetches UM Auth Service (3002)apps/auth · identityUM calls for JWT verify Tauri Sidecarslocal-mode onlyUM + Agent API in-process SAME GATEWAY CONTRACT IN BOTH MODES In cloud mode UM runs on Cloud Run and proxies to spot-VM agent containers. In local mode UM runs as a Tauri sidecar and proxies to the local Agent API. Browser code is identical — only the target URL changes. BACKEND DESTINATIONS Auth Serviceapps/auth · 3002identity · tokensrefresh · sessions Agent API · Orchestrationapps/api · 4000heartbeat · invokerruns · routines · issues Agent API · Channelsregistry · dispatchWhatsApp (Baileys)Telegram (grammy) Direct APIsfiles · models · billingplugins · skills · OAuthhandled by UM directly External ProvidersLLM · OAuth · VoiceStripe · Firebase · GCSthird-party APIs Data TierPostgres / SQLiteFilestore / Local FSSecrets · keychain HTTPS requests → → routed to backend