Workflow: Batch Create Objects

This workflow is optimised for rapid capture on a mobile device when a user needs to create many new objects in a single location.

Flow Steps

  1. Initiation – The user selects a container space in the UI (dashboard search, spatial navigator, or by scanning a container tag). This sets the context for where newly created objects will be located (inside relationship).
  2. Camera Mode – The application opens the device camera.
  3. Capture Loop
    a. User takes a picture.
    b. UI shows two buttons:
    Store as new object – saves current photo(s) as a new object stub.
    Add another picture – appends another image to the current object stub.
    c. After Store as new object the camera immediately resets for the next shot.
    d. Loop repeats until user hits Done.
  4. Background Sync – While the user continues shooting, a background task:
    • Uploads images to Supabase Storage (object-images/objects/ObjectInstance/<id>/…).
    • Sends GraphQL createObject mutations (multipart) to create each ObjectInstance with a minimal dataset: primary image, inside container, default owner, status unprocessed.
  5. Completion – User exits camera mode; objects appear in dashboards instantly via GraphQL Subscriptions.

Data Model Impact

  • Each stub object has status unprocessed so it shows up in the Inbox for later editing.
  • A temporary Batch concept is implicit – no dedicated node is created; once all objects are processed the notion of a batch disappears.

GraphQL Operations

  • mutation createObject(name, photos, containerId) – invoked per object stub.
  • subscription objectUpdated – pushes completion events to other clients.

Open Items / TODO

  • AI-based auto-naming / description suggestion on device.
  • Offline buffering if the device is fully offline.
  • Bulk undo option for accidental captures.