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 DataCore Data Structures
Room Design Entity
The primary entity containing all room information.
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
name | String | Display name |
type | Enum | Design type: app, streaming, floorplan |
visibility | Enum | Visibility level: opened, hidden, limited, closed |
owner_id | UUID | Reference to owner user |
created_at | Timestamp | Creation date and time |
updated_at | Timestamp | Last modification date |
description | Text | Optional description |
tags | Array[String] | Searchable tags |
thumbnail_url | String | Primary preview image |
version | Integer | Design 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.
| Field | Type | Description |
|---|---|---|
id | UUID | BOM entry identifier |
room_design_id | UUID | Parent room design |
product_id | UUID | Reference to product catalog |
quantity | Integer | Number of items |
position | Vector3 | 3D coordinates (x, y, z) |
rotation | Vector3 | Rotation angles (pitch, yaw, roll) |
scale | Vector3 | Scale factors (x, y, z) |
configuration | JSON | Product-specific settings |
price | Decimal | Unit price at time of placement |
currency | String | Currency code (USD, EUR, JPY, etc.) |
notes | Text | Designer 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.
| Component | Format | Description |
|---|---|---|
| Geometry | Binary/glTF | Vertex positions, normals, UVs |
| Materials | PBR/JSON | Textures, colors, material properties |
| Lighting | JSON | Light types, positions, intensities |
| Level Data | Custom | Room 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.
| Field | Type | Description |
|---|---|---|
id | UUID | Camera identifier |
name | String | Camera name (e.g., “Living Room View”) |
position | Vector3 | Camera position in 3D space |
target | Vector3 | Look-at target point |
fov | Float | Field of view in degrees |
type | Enum | Camera type: perspective, orthographic |
settings | JSON | Advanced settings (DOF, exposure, etc.) |
is_default | Boolean | Default view when loading |
order | Integer | Display 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.
| Field | Type | Description |
|---|---|---|
id | UUID | Asset identifier |
type | Enum | image, video, vr_tour, thumbnail |
url | String | Storage URL (CDN or S3) |
width | Integer | Resolution width |
height | Integer | Resolution height |
file_size | Integer | Size in bytes |
format | String | File format (PNG, JPG, MP4, etc.) |
camera_id | UUID | Associated camera (optional) |
rendered_at | Timestamp | Render completion time |
render_settings | JSON | Settings used for rendering |
Media Types:
- Thumbnails: Small preview images (256x256, 512x512)
- Images: High-resolution renders (1920x1080 to 8K)
- Videos: Animated walkthroughs (MP4, WebM)
- VR Tours: 360° panoramic images or interactive tours
Product Catalog Reference
Links between room designs and product catalogs.
| Field | Type | Description |
|---|---|---|
product_id | UUID | Unique product identifier |
catalog_id | UUID | Parent catalog |
name | String | Product name |
manufacturer | String | Brand or manufacturer |
model_number | String | Product SKU/model |
category | String | Product category |
price | Decimal | Current price |
availability | Enum | in_stock, out_of_stock, discontinued |
3d_model_url | String | Path to 3D model file |
thumbnail_url | String | Product preview image |
specifications | JSON | Technical specifications |
salesforce_id | String | Salesforce 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/ClosedData 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
- User initiates creation via app or API
- System creates Room Design entity with metadata
- Default camera is created
- Empty BOM is initialized
- User adds products → BOM entries created
- Product placements → 3D data updated
- Render request → Media assets generated
- All data linked via foreign keys
Loading a Room Design
- Client requests room by ID
- System checks permissions and visibility
- Metadata loaded from database
- 3D mesh data loaded from object storage
- Product references resolved from catalog
- Media assets loaded from CDN (if available)
- Camera settings applied
- 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
- Lazy Loading: Load 3D data only when needed
- LOD System: Use different detail levels based on distance
- Texture Compression: Reduce texture sizes with modern formats
- Instancing: Reuse identical products efficiently
- Caching: Cache frequently accessed designs
Data Size Limits
| Component | Typical Size | Maximum |
|---|---|---|
| Room Metadata | < 10 KB | 100 KB |
| BOM | 1-50 KB | 1 MB |
| 3D Mesh Data | 10-100 MB | 1 GB |
| Single Texture | 1-10 MB | 50 MB |
| Rendered Image | 2-20 MB | 100 MB |
| Video | 50-500 MB | 5 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
- Review API Endpoints for programmatic access
- Learn about Permissions & Visibility to understand access control
- Return to Overview for general concepts