Architecture
Data Flow
Prox OS documentation reference.
Current Click-To-App Flow
flowchart TD
User["User clicks desktop folder, command item, shell action, or drawer entry"]
Registry["appRegistry finds ShellAppManifest"]
Store["useShellStore.openApp(appId, workspaceBounds)"]
Instance["WindowInstance created or existing app window focused"]
Layer["WindowLayer renders AppWindow"]
Runtime["AppRuntime maps appId to local component"]
App["Local Module App renders"]
Data["Static mock data or local component arrays"]
UI["Window UI updates"]
User --> Registry
Registry --> Store
Store --> Instance
Instance --> Layer
Layer --> Runtime
Runtime --> App
App --> Data
Data --> UICurrent Route Flow
flowchart TD
BrowserUrl["Browser URL /app, /app-user, /app-dev, /app-iframe, /app-os"]
Router["TanStack Router"]
Parse["parseShellRoute"]
Registry["getAppManifest"]
Mode["ViewMode: os or website"]
Open["openAppWithRecent"]
Render["WindowLayer or WebsiteAppHost"]
BrowserUrl --> Router
Router --> Parse
Parse --> Registry
Registry --> Mode
Mode --> Open
Open --> RenderFuture API Data Flow
flowchart LR
App["Local Module App"]
Query["TanStack Query"]
Client["openapi-fetch client"]
Worker["Hono API Worker"]
Schema["Zod/OpenAPI contracts"]
Data["DB / storage / external services"]
Explorer["Scalar API Explorer OS app"]
App --> Query
Query --> Client
Client --> Worker
Worker --> Schema
Worker --> Data
Schema --> ExplorerMSW / Hono / OpenAPI / Scalar
Current facts:
apps/api-workeris a Hono skeleton with/,/health,/openapi.json, and/docs.@hono/zod-openapi,zod, and@scalar/hono-api-referenceare installed in the API worker package.msw,openapi-typescript, andopenapi-fetchare installed for the OS shell package.- No MSW handlers, generated OpenAPI types, or shell API client are wired yet.
/app-dev/scalar-apiembeds the local Scalar docs from the API worker.
Planned path:
- Define Hono + Zod/OpenAPI route contracts.
- Use Scalar to expose API exploration.
- Generate client types for the shell.
- Use MSW during frontend development so UI can progress before backend data is complete.
- Put remote data reads in TanStack Query.