Skip to main content

Type Reference

This page documents all shared data types in Planova: TypeScript interfaces from src/types/scene.ts and Rust structs from src-tauri/src/models.rs.


HomeSceneJSON​

The unified data protocol linking floor plan parsing, AI planning, 3D generation, rendering, and export. Defined in src/types/scene.ts.

interface HomeSceneJSON {
schema_version: string
project: HomeSceneProject
global: HomeSceneGlobal
rooms: Room[]
walls: Wall[]
openings: Opening[]
objects: SceneObject[]
materials: SceneMaterial[]
lights: SceneLight[]
cameras: CameraPreset[]
parse_quality?: ParseQuality
}

HomeSceneProject​

FieldTypeDescription
idstringProject UUID
namestringProject name
unit'meter'Measurement unit (always "meter")

HomeSceneGlobal​

FieldTypeDescription
stylestringInterior design style key
ceiling_heightnumberCeiling height in meters
wall_thicknessnumberWall thickness in meters
texture_overrides.floorstring?Floor texture override path
texture_overrides.wallstring?Wall texture override path
texture_overrides.ceilingstring?Ceiling texture override path

Room​

FieldTypeDescription
idstringRoom UUID
typeRoomTypeRoom classification
namestringDisplay name
polygonVec2[]Floor polygon vertices in meters
areanumber?Area in square meters
floor_materialstring?Floor material ID
wall_materialstring?Wall material ID
ceiling_materialstring?Ceiling material ID

Wall​

FieldTypeDescription
idstringWall UUID
startVec2Start point (meters)
endVec2End point (meters)
heightnumberWall height in meters
thicknessnumberWall thickness in meters
materialstring?Material ID
room_refsstring[]IDs of adjacent rooms

Opening​

FieldTypeDescription
idstringOpening UUID
typeOpeningType"door" or "window"
wall_refstringParent wall ID
positionVec2Center position on wall (meters)
widthnumberOpening width in meters
heightnumberOpening height in meters
sill_heightnumberSill height from floor (meters)
swingDoorSwing?Door swing direction (doors only)

SceneObject​

FieldTypeDescription
idstringObject UUID
type'furniture' | 'decoration'Object category
categorystringSpecific category (e.g. "sofa", "lamp")
asset_idstring?3D asset reference
room_refstring?Room ID this object belongs to
positionVec3World position (meters)
rotationVec3Euler rotation (radians)
scaleVec3Scale factor per axis
sizeVec3Bounding box dimensions (meters)
material_overridesRecord<string, string>?Per-slot material overrides

SceneMaterial​

FieldTypeDescription
idstringMaterial UUID
type'pbr'Material model (always PBR)
namestringDisplay name
base_colorstringHex color (e.g. "#f5f5f5")
roughnessnumberSurface roughness (0-1)
metalnessnumberMetallic factor (0-1)
transparentboolean?Whether material is transparent
opacitynumber?Opacity (0-1)
texture_urls.base_colorstring?Base color texture URL
texture_urls.normalstring?Normal map URL
texture_urls.roughnessstring?Roughness map URL

SceneLight​

FieldTypeDescription
idstringLight UUID
typeLightTypeLight type
namestringDisplay name
positionVec3World position (meters)
rotationVec3Euler rotation (radians)
intensitynumberLight intensity
colorstringHex color
sizeVec2?Area light dimensions (meters)

CameraPreset​

FieldTypeDescription
idstringCamera UUID
namestringPreset name
typeCameraTypeCamera projection type
positionVec3Camera position (meters)
targetVec3Look-at target (meters)
fovnumberField of view (degrees)

ParseQuality​

FieldTypeDescription
overall_scorenumberCombined quality score (0-1)
geometry_scorenumberGeometry validity score
semantic_scorenumberSemantic correctness score
scale_scorenumberScale accuracy score
image_alignment_scorenumberAlignment with source image score
needs_user_reviewbooleanWhether manual review is recommended
image_alignmentImageAlignmentReport?Detailed alignment metrics

ImageAlignmentReport​

FieldTypeDescription
wall_iounumberWall mask Intersection over Union
wall_precisionnumberWall detection precision
wall_recallnumberWall detection recall
overallnumberCombined alignment score

DiagnosisReport​

FieldTypeDescription
missing_wall_regionsArray<{ bbox: number[], description: string }>Regions where walls were expected but not detected
extra_wall_regionsArray<{ bbox: number[], description: string }>Regions with detected walls that should not exist
scale_suspiciousbooleanWhether the scale estimate is suspect
scale_reasonstring?Explanation for suspicious scale
room_coveragenumberFraction of image area covered by rooms

Enums​

RoomType​

type RoomType =
| 'living_room'
| 'bedroom'
| 'kitchen'
| 'bathroom'
| 'dining_room'
| 'balcony'
| 'corridor'
| 'study'

OpeningType​

type OpeningType = 'door' | 'window'

DoorSwing​

type DoorSwing =
| 'left_inward'
| 'left_outward'
| 'right_inward'
| 'right_outward'

LightType​

type LightType = 'area' | 'point' | 'spot' | 'directional'

CameraType​

type CameraType = 'perspective' | 'orthographic'

Primitive Aliases​

type Vec2 = [number, number]
type Vec3 = [number, number, number]

Rust Model Structs​

Defined in src-tauri/src/models.rs. All structs derive Debug, Clone, Serialize, Deserialize.

Project​

FieldTypeRust Type
idUUIDString
nameNameString
descriptionDescriptionString
styleStyle keyString
statusStatusString
created_atISO 8601String
updated_atISO 8601String

UploadedFile​

FieldTypeRust Type
idUUIDString
project_idFKString
original_filenameFilenameString
file_typeMIME typeString
file_sizeBytesi64
storage_pathAbsolute pathString
preview_pathAbsolute pathString
parse_statusStatusString
created_atISO 8601String

GenerationTask​

FieldTypeRust Type
idUUIDString
project_idFKString
task_typeTypeString
statusStatusString
progress0-100i64
input_dataJSONOption<serde_json::Value>
output_dataJSONOption<serde_json::Value>
error_messageError textString
created_atISO 8601String
updated_atISO 8601String

API Response Types​

These are the types returned by Tauri IPC commands. They mirror the database models but exclude internal fields like storage_path.

ProjectResponse​

Same fields as Project: id, name, description, style, status, created_at, updated_at.

FileResponse​

FieldTypeDescription
idstringFile UUID
project_idstringParent project UUID
original_filenamestringOriginal filename
file_typestringMIME type
file_sizenumberSize in bytes
preview_urlstringBase64-encoded preview data URL
parse_statusstring"", "parsing", "completed", or "failed"
created_atstringISO 8601 timestamp

TaskResponse​

Same fields as GenerationTask: id, project_id, task_type, status, progress, input_data, output_data, error_message, created_at, updated_at.

SceneResponse​

FieldTypeDescription
idstringScene UUID
project_idstringParent project UUID
file_idstringSource file UUID
namestringScene name
schema_versionstringSchema version (e.g. "0.1.0")
scene_jsonHomeSceneJSON?Parsed scene JSON (null if parse failed)
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Type Mapping: TypeScript to Rust​

TypeScriptRustNotes
stringStringAlways heap-allocated
numberi64 / f64i64 for counts and progress, f64 for coordinates
booleanbool
T | nullOption<T>Serialized as null or omitted
T[]Vec<T>JSON arrays
objectserde_json::ValueArbitrary JSON (scene_json, input/output data)
Record<string, string>HashMap<String, String>Key-value maps
Vec2 = [number, number][f64; 2]Fixed-size array
Vec3 = [number, number, number][f64; 3]Fixed-size array