How supremeai-bd/supremeai-public works
SupremeAI Studio is a shared React/TypeScript AI workspace for web, desktop, and Android. The primary flow starts with a user prompt in the app, passes through intent orchestration and chat state/services, and reaches the configured API runtime; users can also work with research, voice, and developer-workspace features. Separate branches cover account management, cross-device sync, and the admin control plane. Edges are limited to README statements and relationships visible in excerpts or the source index; unsampled feature internals are represented at their existing directory paths.
Main entry points: App.tsx App Shell · apiClient.ts API Client · useChatStore.ts Chat State · useAuthStore.ts Auth State
Components 23
Workspace Client
- App Shell
src/App.tsx - Chat UI
src/components/ChatThread.tsx - Developer Workspace
src/components/workspace - Model Selector
src/components/ModelMatrix.tsx
AI Services
- Intent Orchestrator
src/services/intentOrchestrator.ts - Chat State
src/stores/useChatStore.ts - Chat Service
src/services/chatService.ts - Research
src/services/researchService.ts - Live Voice
src/hooks/useLiveVoiceSession.ts - Speech Utilities
src/utils/speechUtils.ts
API Runtime
- API Client
src/services/apiClient.ts - Pages API
functions/api - Local Web Server
server.ts - Runtime Config
src/config/env.ts - Desktop Runtime
src-tauri/src/lib.rs
Identity and Sync
- Auth State
src/stores/useAuthStore.ts - Auth Service
src/services/authService.ts - Customer State
src/stores/useCustomerStore.ts - Realtime Sync
src/sync/realtimeSync.ts
Admin Studio
- Control Plane
src/server/controlPlaneRouter.ts - MCP Health
src/server/mcpHealthCollector.ts - Admin Studio
src/components/admin
Other components
- User
Connections 26
- User → App Shell: uses
- App Shell → Intent Orchestrator: orchestrates intent
src/App.tsx - App Shell → Chat UI: renders
src/App.tsx - App Shell → Live Voice: starts voice
src/App.tsx - App Shell → Realtime Sync: initializes sync
src/App.tsx - Intent Orchestrator → Chat State: updates chat
src/stores/useChatStore.ts - Chat State → Chat Service: calls
src/stores/useChatStore.ts - Chat State → Research: calls
src/stores/useChatStore.ts - Chat State → Runtime Config: routes requests
- Chat Service → API Client: uses
- API Client → Runtime Config: reads config
src/services/apiClient.ts - API Client → Pages API: requests API
- API Client → Local Web Server: requests API
- Live Voice → Speech Utilities: resolves speech
src/hooks/useLiveVoiceSession.ts - Live Voice → Runtime Config: reads config
src/hooks/useLiveVoiceSession.ts - Auth State → Auth Service: calls
src/stores/useAuthStore.ts - Auth Service → API Client: uses
src/services/authService.ts - Auth State → Customer State: updates
src/stores/useAuthStore.ts - Auth State → Realtime Sync: uses preferences bus
src/stores/useAuthStore.ts - Local Web Server → MCP Health: queries health
server.ts - Control Plane → MCP Health: collects health
src/server/controlPlaneRouter.ts - App Shell → Admin Studio: presents admin
src/App.tsx - Admin Studio → Control Plane: calls control plane
- App Shell → Developer Workspace: presents workspace
src/App.tsx - App Shell → Model Selector: presents models
src/App.tsx - Desktop Runtime → App Shell: hosts shared frontend