Skip to content

feat: add hackathon quickstart example - #8

Merged
jonathanprozzi merged 6 commits into
mainfrom
feat/hackathon-quickstart-example
Jun 15, 2026
Merged

feat: add hackathon quickstart example#8
jonathanprozzi merged 6 commits into
mainfrom
feat/hackathon-quickstart-example

Conversation

@jonathanprozzi

@jonathanprozzi jonathanprozzi commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Adds a small Vite/React quickstart example under examples/hackathon-quickstart that dogfoods the package APIs together through one concrete lifecycle: creating a Spotify song atom as a music-recording classification.

The example includes five surfaces:

  • a local playground where changing sample atom fields and relationship targets updates package-derived atom data and triple previews immediately
  • paired package-call examples that show the import/call next to the data it returns for fields, atom data, schema provenance, and metadata predicate targets
  • a dedicated identity-linking page that shows candidate URL review, pre-activation payload-level sameAs, and post-activation sameAs triples
  • a generated UI page that turns Creation Profiles into entity-specific creation surfaces for music recordings, books, people, movies, and software applications
  • a guided walkthrough explaining which package owns each part of the lifecycle

The example shows:

  • classification-backed recommended atom fields
  • generated atom data via buildAtomDataObject
  • validation via validateClassificationValues
  • Creation Profile subpath imports for known browser create flows
  • schema provenance on recommended fields without importing the full schema.org registry into the browser bundle
  • promoted metadata predicates and matrix-derived expected object targets for triples
  • strict sameAs handling for identity links such as Spotify song atom -> Apple Music song atom
  • deterministic ID examples showing why payload-level sameAs and graph-level sameAs are different lifecycle choices
  • compact TypeScript snippets beside the relevant UI/output surfaces

Creation Profile DX

This PR was updated after Creation Profiles landed in @0xintuition/classifications. The template now imports a direct profile subpath for the primary create flow:

import { musicRecordingCreationProfile } from '@0xintuition/classifications/creation/music-recording';

const fields = musicRecordingCreationProfile.fields;
const relationships = musicRecordingCreationProfile.relationships;

That is the intended frontend pattern for known creation flows: one narrow import gives builders the recommended atom fields, schema provenance, predicate IDs, and expected relationship targets for the selected classification. Root helpers such as getPropertiesFor(...) remain useful for open-ended schema exploration, admin tooling, and server-side composition, but the community template no longer teaches consumers to pull the full schema.org registry into the browser just to render a known form.

sameAs Decision

The quickstart treats sameAs as strict identity, not generic related content. High-confidence identity matches can become metadata triples; lower-confidence candidates and adjacent content stay held back for review or future non-identity predicates.

The identity-linking page makes the lifecycle boundary explicit:

  • before activation, trusted external references can be serialized into atom data, which changes the deterministic atom ID
  • after activation, the original payload should not be treated as mutated; identity growth happens through graph triples/read-model work

This mirrors the package decision in the lower stack: sameAs is useful both as optional atom data and as a promoted metadata predicate, but it should be applied conservatively. The current examples use a threshold-style review flow as a local teaching surface, and we can revisit broader entity-specific rules as more product examples sharpen.

Notes

This intentionally does not write to Intuition. It is a local package/API playground: no API key, wallet, RPC, or transaction submission is required. The goal is to validate how builders classify an object, separate atom fields from metadata predicates, review identity candidates, and derive a triple plan before any app-specific submit layer exists.

Because this example currently lives inside the monorepo stack, its package dependencies use workspace:*. Once the packages are published and this becomes a standalone community template, those should switch to published npm package versions.

Verification

  • bun --filter @0xintuition/hackathon-quickstart-example typecheck
  • bun --filter @0xintuition/hackathon-quickstart-example check
  • bun --filter @0xintuition/hackathon-quickstart-example build
  • bun run build
  • bun run typecheck
  • bun run check
  • bun run test
  • bun run pack:dry-run
  • bun run smoke:tarballs
  • Dev server smoke: bun --filter @0xintuition/hackathon-quickstart-example dev --host 127.0.0.1, curl -sI http://127.0.0.1:5173/ returned 200 OK

Note: the generated-data checks should be run sequentially in local publish prep. Running schema generation checks in parallel with classification profile checks can race on generated output directories, while the sequential checks are green.

@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch 2 times, most recently from ce8c863 to 897c0f8 Compare June 9, 2026 15:39
@jonathanprozzi
jonathanprozzi force-pushed the feat/classification-metadata-predicate-matrix branch 2 times, most recently from b0ab3b1 to ded03c7 Compare June 9, 2026 18:35
@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch 4 times, most recently from d612de0 to d44b6d4 Compare June 10, 2026 14:38
@jonathanprozzi
jonathanprozzi force-pushed the feat/classification-metadata-predicate-matrix branch 2 times, most recently from 488f81f to 69e7b6e Compare June 11, 2026 14:16
@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch from d44b6d4 to 1f2115f Compare June 11, 2026 14:16
@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch from 1f2115f to 75bde5a Compare June 12, 2026 17:13
@jonathanprozzi
jonathanprozzi marked this pull request as ready for review June 12, 2026 19:17
@jonathanprozzi
jonathanprozzi force-pushed the feat/classification-metadata-predicate-matrix branch from f56b963 to 84f6c2e Compare June 12, 2026 19:45
@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch from 75bde5a to 05c85ca Compare June 12, 2026 19:49
@jonathanprozzi
jonathanprozzi changed the base branch from feat/classification-metadata-predicate-matrix to main June 12, 2026 19:49
@jonathanprozzi
jonathanprozzi marked this pull request as draft June 12, 2026 19:49
@jonathanprozzi
jonathanprozzi marked this pull request as ready for review June 15, 2026 19:40
@jonathanprozzi
jonathanprozzi force-pushed the feat/hackathon-quickstart-example branch from 05c85ca to 2e00867 Compare June 15, 2026 19:57
@jonathanprozzi
jonathanprozzi merged commit 4f71765 into main Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant