Loading...
ReferenceResourcesRoom DesignsData Model
Docs TopReferenceResourcesRoom_designsData Model

Data Model

Understanding the Room Design data model is essential for developers integrating with the platform and designers working with advanced features. This page documents the technical architecture and data structures.

Overview

A Room Design is composed of multiple interconnected data structures:

Room Design
├── Metadata (name, type, visibility, permissions)
├── BOM (Bill of Materials)
├── 3D Data (mesh, textures, materials)
├── Camera System (positions, settings)
├── Media Assets (images, videos, VR tours)
├── Product Catalog References
└── Configuration Data

Core Data Structures

Room Design Entity

The primary entity containing all room information.

FieldTypeDescription
idUUIDUnique identifier
nameStringDisplay name
typeEnumDesign type: app, streaming, floorplan
visibilityEnumVisibility level: opened, hidden, limited, closed
owner_idUUIDReference to owner user
created_atTimestampCreation date and time
updated_atTimestampLast modification date
descriptionTextOptional description
tagsArray[String]Searchable tags
thumbnail_urlStringPrimary preview image
versionIntegerDesign version number

All Room Designs are versioned. Each significant change increments the version number, allowing for rollback and history tracking.

BOM (Bill of Materials)

The BOM tracks all products and items placed within the room design.

FieldTypeDescription
idUUIDBOM entry identifier
room_design_idUUIDParent room design
product_idUUIDReference to product catalog
quantityIntegerNumber of items
positionVector33D coordinates (x, y, z)
rotationVector3Rotation angles (pitch, yaw, roll)
scaleVector3Scale factors (x, y, z)
configurationJSONProduct-specific settings
priceDecimalUnit price at time of placement
currencyStringCurrency code (USD, EUR, JPY, etc.)
notesTextDesigner notes

BOM Features:

  • Automatic price calculation and totals
  • Export to CSV, Excel, or PDF
  • Integration with quoting systems
  • Product availability tracking
  • Supplier information linkage

3D Mesh Data

Geometric data representing the physical structure and objects in the room.

ComponentFormatDescription
GeometryBinary/glTFVertex positions, normals, UVs
MaterialsPBR/JSONTextures, colors, material properties
LightingJSONLight types, positions, intensities
Level DataCustomRoom structure, walls, floors, ceilings

Storage Formats:

  • Native Format: Proprietary binary for optimal loading
  • glTF Export: Standard format for interoperability
  • FBX Export: For external 3D software integration
⚠️

3D mesh data can be large (100MB+ for complex designs). The system uses compression and LOD (Level of Detail) to optimize loading and performance.

Camera System

Multiple camera views and settings for different perspectives.

FieldTypeDescription
idUUIDCamera identifier
nameStringCamera name (e.g., “Living Room View”)
positionVector3Camera position in 3D space
targetVector3Look-at target point
fovFloatField of view in degrees
typeEnumCamera type: perspective, orthographic
settingsJSONAdvanced settings (DOF, exposure, etc.)
is_defaultBooleanDefault view when loading
orderIntegerDisplay order in camera list

Camera Features:

  • Unlimited camera presets per design
  • Animated camera paths for tours
  • VR camera settings
  • Export camera settings for external rendering

Media Assets

Images, videos, and interactive media associated with the room design.

FieldTypeDescription
idUUIDAsset identifier
typeEnumimage, video, vr_tour, thumbnail
urlStringStorage URL (CDN or S3)
widthIntegerResolution width
heightIntegerResolution height
file_sizeIntegerSize in bytes
formatStringFile format (PNG, JPG, MP4, etc.)
camera_idUUIDAssociated camera (optional)
rendered_atTimestampRender completion time
render_settingsJSONSettings used for rendering

Media Types:

  1. Thumbnails: Small preview images (256x256, 512x512)
  2. Images: High-resolution renders (1920x1080 to 8K)
  3. Videos: Animated walkthroughs (MP4, WebM)
  4. VR Tours: 360° panoramic images or interactive tours

Product Catalog Reference

Links between room designs and product catalogs.

FieldTypeDescription
product_idUUIDUnique product identifier
catalog_idUUIDParent catalog
nameStringProduct name
manufacturerStringBrand or manufacturer
model_numberStringProduct SKU/model
categoryStringProduct category
priceDecimalCurrent price
availabilityEnumin_stock, out_of_stock, discontinued
3d_model_urlStringPath to 3D model file
thumbnail_urlStringProduct preview image
specificationsJSONTechnical specifications
salesforce_idStringSalesforce integration ID (optional)

Configuration Data

Product-specific configurations and customizations.

{
  "configuration": {
    "fabric": {
      "material_id": "uuid-123",
      "color": "#4A90E2",
      "pattern": "solid"
    },
    "dimensions": {
      "width": 200,
      "height": 85,
      "depth": 90,
      "unit": "cm"
    },
    "options": {
      "legs": "wooden",
      "cushions": 3,
      "pillows": true
    }
  }
}

Configurable Products:

  • Furniture with fabric/color options
  • Adjustable dimensions
  • Modular components
  • Customizable features

Relationships

Entity Relationship Diagram

┌─────────────────┐
│   User          │
└────────┬────────┘
         │ owns

┌─────────────────┐         ┌──────────────┐
│  Room Design    │────────▶│   Camera     │
└────────┬────────┘  1:N    └──────────────┘

         │ contains
         │ (1:N)

┌─────────────────┐         ┌──────────────┐
│      BOM        │────────▶│   Product    │
└────────┬────────┘  N:1    └──────────────┘

         │ generates
         │ (1:N)

┌─────────────────┐
│   Media Asset   │
└─────────────────┘

Permission Relations

User ──[permission_level]──▶ Room Design
     Owner/Admin/Collaborator/Viewer

Room Design ──[visibility]──▶ Access Level
            Opened/Hidden/Limited/Closed

Data Storage

Database

Primary data is stored in a relational database (PostgreSQL):

  • Room metadata and relationships
  • BOM entries and product references
  • User permissions and sharing
  • Media asset metadata

Object Storage

Large binary files are stored in object storage (S3-compatible):

  • 3D mesh data and models
  • Texture files and materials
  • Rendered images and videos
  • VR tour data

CDN

Frequently accessed media is cached via CDN:

  • Thumbnails and preview images
  • Product catalog images
  • Public streaming content
  • Optimized 3D models for web viewing

Data Flow

Creating a Room Design

  1. User initiates creation via app or API
  2. System creates Room Design entity with metadata
  3. Default camera is created
  4. Empty BOM is initialized
  5. User adds products → BOM entries created
  6. Product placements → 3D data updated
  7. Render request → Media assets generated
  8. All data linked via foreign keys

Loading a Room Design

  1. Client requests room by ID
  2. System checks permissions and visibility
  3. Metadata loaded from database
  4. 3D mesh data loaded from object storage
  5. Product references resolved from catalog
  6. Media assets loaded from CDN (if available)
  7. Camera settings applied
  8. Room rendered in client application

API Data Exchange

Request Format

{
  "room_design": {
    "name": "Modern Living Room",
    "type": "app",
    "visibility": "limited",
    "description": "Contemporary design with minimalist aesthetic"
  }
}

Response Format

{
  "id": "uuid-room-123",
  "name": "Modern Living Room",
  "type": "app",
  "visibility": "limited",
  "owner_id": "uuid-user-456",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T14:45:00Z",
  "version": 3,
  "bom_count": 24,
  "cameras": 5,
  "media_assets": 12,
  "total_value": 15420.50,
  "currency": "USD"
}

See API Endpoints for complete API documentation.

Performance Considerations

Optimization Strategies

  1. Lazy Loading: Load 3D data only when needed
  2. LOD System: Use different detail levels based on distance
  3. Texture Compression: Reduce texture sizes with modern formats
  4. Instancing: Reuse identical products efficiently
  5. Caching: Cache frequently accessed designs

Data Size Limits

ComponentTypical SizeMaximum
Room Metadata< 10 KB100 KB
BOM1-50 KB1 MB
3D Mesh Data10-100 MB1 GB
Single Texture1-10 MB50 MB
Rendered Image2-20 MB100 MB
Video50-500 MB5 GB
⚠️

Designs exceeding size limits may experience performance issues. Consider optimizing 3D models and textures for better performance.

Data Integrity

Validation

  • All foreign keys validated on creation
  • Product availability checked before placement
  • File formats verified before upload
  • Permissions validated on every operation

Backup and Recovery

  • Daily automated backups of database
  • Version history maintained for 90 days
  • Object storage uses replication
  • Deleted designs retained for 30 days

Next Steps