Skip to content

Add placevr capture model with template validation, tests, and demo main#2

Open
EthanForAi wants to merge 1 commit into
mainfrom
codex/design-architecture-for-placevr-app
Open

Add placevr capture model with template validation, tests, and demo main#2
EthanForAi wants to merge 1 commit into
mainfrom
codex/design-architecture-for-placevr-app

Conversation

@EthanForAi

Copy link
Copy Markdown
Owner

Motivation

  • Implement a fixed 8-shot capture model for the MVP to standardize guided captures and upload readiness.
  • Provide a minimal Node/Shot data model and validation to enforce UX constraints and predictable uploads.
  • Add a small demo in main.go to build a sample node, populate shots, validate, and emit JSON for integration testing.

Description

  • Add new placevr package with capture.go defining MaxShotsPerNode, CaptureTemplate, GuideSlot, Shot, and Node types and validation logic including DefaultTemplateV1, CaptureTemplate.Validate, Node.Validate, Node.AddShot, and Node.IsReadyForUpload.
  • Add unit tests in placevr/capture_test.go covering the default template validation and preventing adding more than MaxShotsPerNode shots.
  • Update main.go to create a demo Node, populate it with shots up to MaxShotsPerNode, validate it, marshal it to JSON, and print upload readiness.
  • Add go.mod with module placevr and go 1.22.

Testing

  • Ran unit tests with go test ./..., and the tests completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant