feat: define dashboard model schema #15

Merged
vince merged 4 commits from codex/issue-3-dashboard-model into main 2026-06-18 17:58:06 +02:00
Owner

Summary

Defines the canonical versioned dashboard model with TypeBox/Ajv validation and portable fixtures.

Closes #3.

Why

The dashboard renderer, persistence layer, and future agent tooling need a shared schema-backed contract before content or UI can be wired safely.

Changes

  • Adds DashboardDocument TypeBox schema and inferred TypeScript types.
  • Adds Ajv validation helpers, assertion/type guard helpers, and formatted validation errors.
  • Exports the dashboard JSON Schema for future tool/agent contracts.
  • Adds generic and Dimension Lab fixtures to prove portability.
  • Adds Vitest coverage for valid fixtures, invalid schema versions, actionable field errors, and JSON Schema export.

Testing

  • bun run test
  • bun run check
  • bun run build

Notes

  • TypeBox/Ajv are the canonical schema/validation layer; Zod is not introduced.
  • Persistence, agent mutation endpoints, and renderer wiring remain out of scope for this PR.
## Summary Defines the canonical versioned dashboard model with TypeBox/Ajv validation and portable fixtures. Closes #3. ## Why The dashboard renderer, persistence layer, and future agent tooling need a shared schema-backed contract before content or UI can be wired safely. ## Changes - Adds `DashboardDocument` TypeBox schema and inferred TypeScript types. - Adds Ajv validation helpers, assertion/type guard helpers, and formatted validation errors. - Exports the dashboard JSON Schema for future tool/agent contracts. - Adds generic and Dimension Lab fixtures to prove portability. - Adds Vitest coverage for valid fixtures, invalid schema versions, actionable field errors, and JSON Schema export. ## Testing - `bun run test` - `bun run check` - `bun run build` ## Notes - TypeBox/Ajv are the canonical schema/validation layer; Zod is not introduced. - Persistence, agent mutation endpoints, and renderer wiring remain out of scope for this PR.
vince added 1 commit 2026-06-18 17:37:53 +02:00
vince added 1 commit 2026-06-18 17:43:57 +02:00
vince added 1 commit 2026-06-18 17:49:20 +02:00
vince added 1 commit 2026-06-18 17:53:53 +02:00
vince merged commit 5eeec0dcb5 into main 2026-06-18 17:58:06 +02:00
Sign in to join this conversation.
No description provided.