kammer/solidhaus.ttl
Christopher Mühl 3d246c00ec chore: scaffold SvelteKit project with Capacitor and Tailwind
- SvelteKit 2 (Svelte 5) with TypeScript, static adapter (SPA mode)
- Capacitor config for iOS/Android (so.toph.solidhaus)
- Tailwind CSS v4 via Vite plugin
- All dependencies: idb, nanoid, bwip-js, jspdf, Automerge, Solid
- Route stubs: dashboard, scan, items, locations, labels, settings
- Type definitions and ID generator utility
- Project specification and ontology files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:50:10 +01:00

454 lines
19 KiB
Turtle

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <https://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix solidhaus: <https://vocab.toph.so/solidhaus#> .
# =============================================================================
# SolidHaus Ontology — Household Inventory Tracking
# =============================================================================
#
# Namespace: https://vocab.toph.so/solidhaus#
# Version: 0.1.0
# Author: Christopher (toph)
# Date: 2026-02-26
#
# This ontology extends schema.org types for household inventory tracking.
# It is designed to be used with Solid Pods for personal data storage.
#
# Key design decisions:
# - Reuses schema.org wherever possible
# - Adds tracking-specific properties not covered by schema.org
# - Location hierarchy uses schema:containedInPlace
# - Sighting events extend schema:FindAction
# - Actions follow schema.org Action vocabulary
# =============================================================================
solidhaus: a owl:Ontology ;
dcterms:title "SolidHaus Household Inventory Ontology"@en ;
dcterms:description "An ontology for tracking physical items in a household, designed for use with Solid Pods and schema.org."@en ;
dcterms:creator "Christopher (toph)" ;
dcterms:created "2026-02-26"^^xsd:date ;
owl:versionInfo "0.2.0" ;
rdfs:seeAlso <https://schema.org/IndividualProduct> ;
rdfs:seeAlso <https://schema.org/Place> ;
rdfs:seeAlso <https://schema.org/FindAction> ;
rdfs:seeAlso <https://schema.org/CheckInAction> ;
rdfs:seeAlso <https://schema.org/CheckOutAction> .
# =============================================================================
# Classes
# =============================================================================
solidhaus:SightingEvent a rdfs:Class ;
rdfs:subClassOf schema:FindAction ;
rdfs:label "Sighting Event"@en ;
rdfs:comment "An observation of an item at a specific location and time. Created when an item's barcode is scanned or its location is manually confirmed."@en .
solidhaus:AuditSession a rdfs:Class ;
rdfs:subClassOf schema:Action ;
rdfs:label "Audit Session"@en ;
rdfs:comment "A systematic walk-through of a location to verify which items are present."@en .
solidhaus:InventoryContainer a rdfs:Class ;
rdfs:subClassOf schema:Place ;
rdfs:label "Inventory Container"@en ;
rdfs:comment "A sub-location within a room that can contain items, such as a shelf, drawer, box, or cabinet."@en .
# =============================================================================
# Classes — Check-In / Check-Out Model
# =============================================================================
#
# Items have a custody state: they are either "checked in" (stored at their
# designated location) or "checked out" (removed for use, lending, transport).
#
# This maps to schema:CheckInAction and schema:CheckOutAction, which exist
# in schema.org. We extend them with inventory-specific properties.
#
# The check-out reason captures *why* the item left storage:
# - in-use: actively being used (drill on workbench)
# - transit: being moved between locations
# - lent: lent to another person
# - repair: sent for repair/maintenance
# - temporary: temporarily relocated (e.g., for a project)
#
# Storage tiers capture *how accessible* the storage location is:
# - hot: immediately accessible (pegboard, desk, kitchen counter)
# - warm: in the room but requires effort (cabinet, toolbox, closed shelf)
# - cold: deep storage (attic box, basement bin, labeled container)
#
# The combination tells a rich story:
# "Drill is CHECKED OUT (in-use) from pegboard (hot) — at workbench"
# "Holiday lights are CHECKED IN at attic box #3 (cold)"
# "Borrowed book is CHECKED OUT (lent) from bookshelf (warm) — at neighbor's"
# =============================================================================
solidhaus:CheckOutEvent a rdfs:Class ;
rdfs:subClassOf schema:CheckOutAction ;
rdfs:label "Check-Out Event"@en ;
rdfs:comment "Records an item being taken from its storage location. The item transitions from 'checked in' to 'checked out'. Captures who took it, from where, why, and when."@en .
solidhaus:CheckInEvent a rdfs:Class ;
rdfs:subClassOf schema:CheckInAction ;
rdfs:label "Check-In Event"@en ;
rdfs:comment "Records an item being returned to a storage location. The item transitions from 'checked out' to 'checked in'. May update the designated storage location if the item is being reorganized."@en .
# =============================================================================
# Properties — Item Identification
# =============================================================================
solidhaus:shortId a rdf:Property ;
rdfs:label "Short ID"@en ;
rdfs:comment "A short, human-readable identifier (nanoid) used for barcodes and labels. Example: 'A3K7M2'."@en ;
rdfs:domain schema:Thing ;
rdfs:range xsd:string .
solidhaus:barcodeFormat a rdf:Property ;
rdfs:label "Barcode Format"@en ;
rdfs:comment "The format of the barcode printed for this item. Values: 'qr', 'code128', 'datamatrix'."@en ;
rdfs:domain schema:Thing ;
rdfs:range xsd:string .
solidhaus:barcodeUri a rdf:Property ;
rdfs:label "Barcode URI"@en ;
rdfs:comment "The full URI encoded in the barcode, e.g. 'https://inv.toph.so/A3K7M2'."@en ;
rdfs:domain schema:Thing ;
rdfs:range xsd:anyURI .
solidhaus:labelPrinted a rdf:Property ;
rdfs:label "Label Printed"@en ;
rdfs:comment "Whether a physical label has been printed for this item."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:boolean .
solidhaus:labelPrintedAt a rdf:Property ;
rdfs:label "Label Printed At"@en ;
rdfs:comment "When the label was last printed."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:dateTime .
# =============================================================================
# Properties — Custody State (Check-In / Check-Out)
# =============================================================================
solidhaus:custodyState a rdf:Property ;
rdfs:label "Custody State"@en ;
rdfs:comment "Whether the item is currently checked in (stored) or checked out (in use, lent, etc.)."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range solidhaus:CustodyState .
solidhaus:checkedOutSince a rdf:Property ;
rdfs:label "Checked Out Since"@en ;
rdfs:comment "Timestamp when the item was last checked out of storage."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:dateTime .
solidhaus:checkedOutReason a rdf:Property ;
rdfs:label "Checked Out Reason"@en ;
rdfs:comment "Why the item was checked out of storage."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range solidhaus:CheckOutReason .
solidhaus:checkedOutFrom a rdf:Property ;
rdfs:label "Checked Out From"@en ;
rdfs:comment "The storage location the item was checked out from (so it can be returned there)."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Place .
solidhaus:checkedOutTo a rdf:Property ;
rdfs:label "Checked Out To"@en ;
rdfs:comment "Where or to whom the item was checked out. Can be a Place (workbench) or a Person (neighbor)."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Thing .
solidhaus:checkedOutNote a rdf:Property ;
rdfs:label "Checked Out Note"@en ;
rdfs:comment "Free-text note about the check-out, e.g. 'Lent to Max for weekend project'."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:string .
# =============================================================================
# Properties — Storage Tier
# =============================================================================
solidhaus:storageTier a rdf:Property ;
rdfs:label "Storage Tier"@en ;
rdfs:comment "How accessible the storage location is. Applies to the item's designated storage or to a Place."@en ;
rdfs:domain schema:Thing ; # Can apply to Item (its home) or Place (inherent tier)
rdfs:range solidhaus:StorageTier .
solidhaus:storageContainer a rdf:Property ;
rdfs:label "Storage Container"@en ;
rdfs:comment "For cold-storage items: which specific container (box, bin, crate) the item is in. Important because you need to know which box to dig out."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Thing .
solidhaus:storageContainerLabel a rdf:Property ;
rdfs:label "Storage Container Label"@en ;
rdfs:comment "Human-readable label on the storage container, e.g. 'Box #3 — Electronics' or 'Blue IKEA bin — Holiday'."@en ;
rdfs:domain schema:Thing ;
rdfs:range xsd:string .
# =============================================================================
# Properties — Location Tracking
# =============================================================================
solidhaus:lastSeenAt a rdf:Property ;
rdfs:label "Last Seen At"@en ;
rdfs:comment "The location where this item was most recently observed (scanned or manually confirmed)."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Place .
solidhaus:lastSeenTimestamp a rdf:Property ;
rdfs:label "Last Seen Timestamp"@en ;
rdfs:comment "When this item was most recently observed."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:dateTime .
solidhaus:lastUsedAt a rdf:Property ;
rdfs:label "Last Used At"@en ;
rdfs:comment "When this item was last used (logged via UseAction)."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range xsd:dateTime .
solidhaus:lastKnownToBeAt a rdf:Property ;
rdfs:label "Last Known To Be At"@en ;
rdfs:comment "The most recent location where this item is known or believed to be, regardless of confidence level."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Place .
solidhaus:supposedToBeAt a rdf:Property ;
rdfs:label "Supposed To Be At"@en ;
rdfs:comment "The designated storage location for this item — where it 'belongs' or should be returned to."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range schema:Place .
solidhaus:locationConfidence a rdf:Property ;
rdfs:label "Location Confidence"@en ;
rdfs:comment "How confident we are about the item's current location. Values from solidhaus:ConfidenceLevel."@en ;
rdfs:domain schema:IndividualProduct ;
rdfs:range solidhaus:ConfidenceLevel .
# =============================================================================
# Properties — Location Classification
# =============================================================================
solidhaus:locationType a rdf:Property ;
rdfs:label "Location Type"@en ;
rdfs:comment "The type of location in the hierarchy. Values from solidhaus:LocationType."@en ;
rdfs:domain schema:Place ;
rdfs:range solidhaus:LocationType .
# =============================================================================
# Properties — Sighting Events
# =============================================================================
solidhaus:sightingType a rdf:Property ;
rdfs:label "Sighting Type"@en ;
rdfs:comment "How the sighting was registered."@en ;
rdfs:domain solidhaus:SightingEvent ;
rdfs:range solidhaus:SightingMethod .
solidhaus:confidence a rdf:Property ;
rdfs:label "Confidence"@en ;
rdfs:comment "The confidence level of this specific sighting observation."@en ;
rdfs:domain solidhaus:SightingEvent ;
rdfs:range solidhaus:ConfidenceLevel .
# =============================================================================
# Properties — Audit
# =============================================================================
solidhaus:auditLocation a rdf:Property ;
rdfs:label "Audit Location"@en ;
rdfs:comment "The location being audited in this session."@en ;
rdfs:domain solidhaus:AuditSession ;
rdfs:range schema:Place .
solidhaus:itemsExpected a rdf:Property ;
rdfs:label "Items Expected"@en ;
rdfs:comment "Number of items expected to be found at the audit location."@en ;
rdfs:domain solidhaus:AuditSession ;
rdfs:range xsd:integer .
solidhaus:itemsFound a rdf:Property ;
rdfs:label "Items Found"@en ;
rdfs:comment "Number of items confirmed present during the audit."@en ;
rdfs:domain solidhaus:AuditSession ;
rdfs:range xsd:integer .
# =============================================================================
# Enumerations
# =============================================================================
solidhaus:ConfidenceLevel a rdfs:Class ;
rdfs:label "Confidence Level"@en ;
rdfs:comment "Enumeration of confidence levels for item location."@en .
solidhaus:Confirmed a solidhaus:ConfidenceLevel ;
rdfs:label "Confirmed"@en ;
rdfs:comment "Item was directly scanned or visually confirmed at this location."@en .
solidhaus:Likely a solidhaus:ConfidenceLevel ;
rdfs:label "Likely"@en ;
rdfs:comment "Item was seen here recently but not confirmed recently (e.g., >30 days since last scan)."@en .
solidhaus:Assumed a solidhaus:ConfidenceLevel ;
rdfs:label "Assumed"@en ;
rdfs:comment "Item is assumed to be at its designated location but has not been verified."@en .
solidhaus:Unknown a solidhaus:ConfidenceLevel ;
rdfs:label "Unknown"@en ;
rdfs:comment "Item's current location is not known (e.g., >90 days since last scan)."@en .
solidhaus:SightingMethod a rdfs:Class ;
rdfs:label "Sighting Method"@en ;
rdfs:comment "How an item sighting was registered."@en .
solidhaus:BarcodeScan a solidhaus:SightingMethod ;
rdfs:label "Barcode Scan"@en ;
rdfs:comment "Item was identified by scanning its barcode/QR code."@en .
solidhaus:ManualInput a solidhaus:SightingMethod ;
rdfs:label "Manual Input"@en ;
rdfs:comment "Item location was manually entered by the user."@en .
solidhaus:CameraDetect a solidhaus:SightingMethod ;
rdfs:label "Camera Detect"@en ;
rdfs:comment "Item was detected via continuous camera scanning (future feature)."@en .
solidhaus:AuditVerify a solidhaus:SightingMethod ;
rdfs:label "Audit Verify"@en ;
rdfs:comment "Item was verified during an audit session."@en .
solidhaus:LocationType a rdfs:Class ;
rdfs:label "Location Type"@en ;
rdfs:comment "Classification of locations in the inventory hierarchy."@en .
solidhaus:House a solidhaus:LocationType ;
rdfs:label "House"@en .
solidhaus:Floor a solidhaus:LocationType ;
rdfs:label "Floor"@en .
solidhaus:Room a solidhaus:LocationType ;
rdfs:label "Room"@en .
solidhaus:Furniture a solidhaus:LocationType ;
rdfs:label "Furniture"@en ;
rdfs:comment "A piece of furniture that contains items (desk, wardrobe, shelf unit)."@en .
solidhaus:Shelf a solidhaus:LocationType ;
rdfs:label "Shelf"@en .
solidhaus:Drawer a solidhaus:LocationType ;
rdfs:label "Drawer"@en .
solidhaus:Box a solidhaus:LocationType ;
rdfs:label "Box"@en ;
rdfs:comment "A container/box for storage."@en .
solidhaus:Wall a solidhaus:LocationType ;
rdfs:label "Wall"@en ;
rdfs:comment "Wall-mounted storage (pegboard, hooks, etc.)."@en .
solidhaus:Outdoor a solidhaus:LocationType ;
rdfs:label "Outdoor"@en ;
rdfs:comment "Outdoor areas (garden, garage, shed)."@en .
# =============================================================================
# Enumerations — Custody State
# =============================================================================
solidhaus:CustodyState a rdfs:Class ;
rdfs:label "Custody State"@en ;
rdfs:comment "Whether an item is checked in (at its storage location) or checked out (removed for some purpose)."@en .
solidhaus:CheckedIn a solidhaus:CustodyState ;
rdfs:label "Checked In"@en ;
rdfs:comment "Item is at its designated storage location. Put away, accounted for."@en .
solidhaus:CheckedOut a solidhaus:CustodyState ;
rdfs:label "Checked Out"@en ;
rdfs:comment "Item has been removed from storage for use, lending, repair, or other purpose."@en .
# =============================================================================
# Enumerations — Check-Out Reason
# =============================================================================
solidhaus:CheckOutReason a rdfs:Class ;
rdfs:label "Check-Out Reason"@en ;
rdfs:comment "Why an item was taken from its storage location."@en .
solidhaus:InUse a solidhaus:CheckOutReason ;
rdfs:label "In Use"@en ;
rdfs:comment "Item is actively being used (drill on workbench, book being read, pan on stove)."@en .
solidhaus:InTransit a solidhaus:CheckOutReason ;
rdfs:label "In Transit"@en ;
rdfs:comment "Item is being moved between locations (e.g., carrying tools to another room)."@en .
solidhaus:Lent a solidhaus:CheckOutReason ;
rdfs:label "Lent"@en ;
rdfs:comment "Item has been lent to another person. Use checkedOutTo to record who."@en .
solidhaus:InRepair a solidhaus:CheckOutReason ;
rdfs:label "In Repair"@en ;
rdfs:comment "Item has been sent for repair or maintenance."@en .
solidhaus:Temporary a solidhaus:CheckOutReason ;
rdfs:label "Temporary Relocation"@en ;
rdfs:comment "Item has been temporarily moved for a project or event and should return to storage when done."@en .
solidhaus:Consumed a solidhaus:CheckOutReason ;
rdfs:label "Consumed / Disposed"@en ;
rdfs:comment "Item has been consumed, used up, or disposed of. Terminal state."@en .
# =============================================================================
# Enumerations — Storage Tier
# =============================================================================
#
# Storage tiers describe how easily accessible a storage location is.
# This is crucial for the UX: when you're looking for something, it matters
# whether it's on the pegboard in front of you (hot) or buried in a box
# in the attic (cold). The tier affects both where you put things and
# how you find them.
#
# Tiers can be applied to:
# 1. A Place (the pegboard is inherently "hot" storage)
# 2. An Item's designated home (this drill's home tier is "hot")
#
# =============================================================================
solidhaus:StorageTier a rdfs:Class ;
rdfs:label "Storage Tier"@en ;
rdfs:comment "How quickly and easily an item can be accessed at its storage location."@en .
solidhaus:HotStorage a solidhaus:StorageTier ;
rdfs:label "Hot / Active"@en ;
rdfs:comment "Immediately accessible, grab-and-go. Examples: pegboard, desk surface, kitchen counter, tool belt hook, frequently-used drawer. Items here are used daily or near-daily."@en .
solidhaus:WarmStorage a solidhaus:StorageTier ;
rdfs:label "Warm / Nearby"@en ;
rdfs:comment "In the room but requires some effort to access. Examples: closed cabinet, toolbox, high shelf, under-desk drawer, closet. Items here are used weekly or occasionally."@en .
solidhaus:ColdStorage a solidhaus:StorageTier ;
rdfs:label "Cold / Deep"@en ;
rdfs:comment "Deep storage requiring deliberate retrieval. Examples: attic boxes, basement bins, labeled storage containers, garage overhead racks. Items here are seasonal, archival, or rarely used. For cold storage, the storageContainer and storageContainerLabel properties become especially important — you need to know which box to dig out."@en .