Prox OS Internal Docs
PlatformDatabase

OS Shell Backend Model

This is a documentation-only backend model sketch. It does not create database

Status

This is a documentation-only backend model sketch. It does not create database tables, migrations, API routes, auth, marketplace, billing, or agent runtime.

Minimal Model

The first OS backend should focus on identity, spaces, installed surfaces, desktop restore, and one real business loop.

Suggested model order:

User
Organization
Membership
Space
Desktop
Surface
InstalledSurface
Folder
WindowSession
WindowInstance
UserPreference

Surface Sketch

type Surface = {
  id: string
  surfaceType: 'app' | 'hub' | 'collection' | 'folder' | 'space' | 'module' | 'external' | 'system'
  ownerType: 'user' | 'organization' | 'system'
  ownerId: string
  slug: string
  title: string
  description?: string
  runtimeRoute?: string
  creatorPath?: string
  storePath?: string
  icon?: string
  tags: string[]
  status: 'concept' | 'incubating' | 'alpha' | 'stable'
}

Desktop And Window Session Sketch

type Desktop = {
  id: string
  spaceId: string
  ownerId: string
  slug: string
  title: string
  isDefault: boolean
  dockPins: string[]
  folderIds: string[]
}

type WindowSession = {
  id: string
  userId: string
  desktopId: string
  restorePolicy: 'auto' | 'manual' | 'ask'
  windows: WindowInstance[]
  updatedAt: string
}

type WindowInstance = {
  id: string
  surfaceId: string
  runtimeRoute: string
  internalPath?: string
  title?: string
  x: number
  y: number
  width: number
  height: number
  zIndex: number
  state: 'normal' | 'minimized' | 'maximized'
}

Storage Boundaries

  • Desktop layout stores organization.
  • WindowSession stores UI memory.
  • App data stores business records.
  • App data must not be embedded into WindowSession records.
  • Runtime routes are launch metadata, not resource identity.
  1. Auth, login, and session baseline.
  2. User, Organization, and Membership.
  3. Space, Desktop, Surface, and InstalledSurface.
  4. WindowSession persistence.
  5. First real business loop: visitor, waitlist, activation code, and feedback.
  6. Moments and personal data import as the second vertical.
  7. Payment and entitlement only after legal, tax, and payment readiness.
  8. Marketplace, hub subscription, and revenue split later.
  9. Agent runtime later.

Do not build the hub marketplace backend before OS shell persistence and the first real business loop.

On this page