Skip to content

U2: Define core Convex domain model #2

@breadback00-dev

Description

@breadback00-dev

What is the work

Create the backend domain model for the carousel workflow: formats, projects, source items, slide instances, assets, and intake runs.

Planned areas:

  • convex/schema.ts
  • convex/formats.ts
  • convex/projects.ts
  • convex/sourceItems.ts
  • convex/slides.ts
  • convex/assets.ts
  • convex/intake.ts
  • convex/*.test.ts

Why does it matter

The Format Library, agent intake lane, visual studio, and SVG export path all need shared durable concepts. If this layer is vague or blob-like, later work will drift and the app will be hard to test.

What does done mean

  • Convex schema and functions can represent an Events Roundup project.
  • Intake results are separate from editor-approved source items.
  • Slide instances can be generated from approved project content later.
  • Uploaded image assets and source image URLs can both be represented.
  • Backend tests cover the happy path, edge cases, and invalid references.

Acceptance criteria

  • Create an Events Roundup project from a seeded or placeholder format.
  • Add structured source items to a project and query them in order.
  • Allow missing optional item details while marking them reviewable.
  • Reject invalid required project or format references.
  • Represent uploaded-file assets and external image URL assets distinctly.

Blockers

What can make this fail

  • Domain state is stored as undifferentiated JSON blobs that later UI/tests cannot reason about.
  • Intake output and approved editor state are conflated.
  • Asset modeling assumes only uploads or only URLs, breaking the chosen MVP image workflow.
  • Tests assert implementation internals rather than workflow behavior.

How should Codex verify it

  • Run Convex/backend tests for all new domain functions.
  • Add at least one workflow-shaped test from project creation through source item insertion.
  • Confirm the schema supports the later issue requirements without overbuilding a format builder.
  • Check that generated Convex files and secrets are handled correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions