Skip to content

feat(examples): add app-showcase kitchen-sink reference workspace - #1405

Merged
hotlong merged 1 commit into
mainfrom
claude/metadata-example-platform-c6JIy
May 31, 2026
Merged

feat(examples): add app-showcase kitchen-sink reference workspace#1405
hotlong merged 1 commit into
mainfrom
claude/metadata-example-platform-c6JIy

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Adds @objectstack/example-showcase — a kitchen-sink reference workspace designed to show off the whole platform at once, built for three audiences: demonstration, debugging, and coverage-driven verification.

It deliberately splits into two tracks to resolve the demo-vs-verify tension:

  • a realistic backbone (Account → Project → Task, Team, Category) with seeded data so every view renders something real;
  • synthetic gallery/specimen objects whose only job is to exhaust protocol variants;

…tied together by a coverage manifest (src/coverage.ts) that the test suite checks against the protocol's own Zod enums.

What it covers

Data layer

  • All 49 field types (src/objects/field-zoo.object.ts)
  • Every relationship kind: lookup, master_detail, self-referencing tree (Category.parent), and many-to-many via the showcase_project_membership junction
  • Formulas, validations, and a status state machine

View layer

  • All 8 list-view types on a single object (grid, kanban, gallery, calendar, timeline, gantt, map, chart)
  • All 5 form-view types (simple, tabbed, wizard, split, drawer)
  • All 38 chart types in one dashboard
  • All 4 report types (tabular, summary, matrix, joined)
  • The action type × location matrix and a component-gallery page

Capability chains

  • Security: roles + permission set with object CRUD + FLS + RLS + sharing rules + policy
  • Automation: record-triggered flow → screen-flow wizard → multi-step approvalwebhook → scheduled jobemail
  • AI: agent + tool + skill
  • i18n (en + zh-CN), light/dark themes, datasource, and an external portal

Verification ("confirm")

test/coverage.test.ts introspects the spec's own enums (FieldType, ChartType, ReportType, ActionType, ACTION_LOCATIONS) and asserts every member appears at least once across the registered metadata. Because the expected sets come from the spec — not a hand-maintained list — the test fails automatically when the platform gains a new variant that the showcase hasn't demonstrated, keeping it a living conformance fixture rather than a static snapshot. defineStack also runs full schema + cross-reference validation on import.

pnpm verify   # tsc --noEmit + vitest → green (8/8 tests pass)

Notes for reviewers

  • The example uses the current named-type import convention (@objectstack/spec/ui, /data, etc.) and define*/*.create builders. (Aside: the existing examples/app-crm still uses the older root-namespace style — UI.Report, Automation.ApprovalProcess — which no longer typechecks against the current spec, and email templates there are missing the now-required isSystem. Happy to follow up on app-crm in a separate PR if useful.)
  • examples/README.md updated with a Showcase entry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CsmomJsLjCknpDjc1XjUcY


Generated by Claude Code

Adds `@objectstack/example-showcase`, a comprehensive reference example
built for demonstration, debugging, and coverage-driven verification.

It pairs a realistic project-delivery domain (Account → Project → Task,
Team, Category) with synthetic "gallery" objects that exhaust protocol
variants, tied together by a coverage manifest:

- Data: all 49 field types (field-zoo), plus lookup / master-detail /
  self-referencing tree / many-to-many junction relationships, formulas,
  validations, and a status state machine.
- Views: all 8 list-view types on one object (grid, kanban, gallery,
  calendar, timeline, gantt, map, chart) and all 5 form types; a chart
  gallery covering all 38 chart types; all 4 report types; the action
  type × location matrix; a component-gallery page.
- Capability chains: security (RBAC + FLS + RLS + sharing + policy),
  automation (flow → approval → webhook → job → email), and AI
  (agent + tool + skill); plus i18n, themes, datasources, and a portal.
- Verification: src/coverage.ts + test/coverage.test.ts introspect the
  protocol's own Zod enums (FieldType, ChartType, ReportType, ActionType,
  ACTION_LOCATIONS) and fail when any variant is left uncovered, so the
  example stays a living conformance fixture. `pnpm verify` (typecheck +
  tests) is green; defineStack runs full schema + cross-reference
  validation on import.

https://claude.ai/code/session_01CsmomJsLjCknpDjc1XjUcY
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment May 31, 2026 5:43am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tests tooling size/xl labels May 31, 2026
@hotlong
hotlong marked this pull request as ready for review May 31, 2026 06:16
@hotlong
hotlong merged commit 1888f81 into main May 31, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants