Skip to content

Official Registry

Generated by bun run docs:catalog:build. Edit the docs generator or overlay data instead of editing this file directly.

This page documents the shipped ucr-official catalog from fixtures/registries/ucr-official/registry.json. It complements ucr list and ucr show with concrete guidance on what each utility, preset, and block is for.

Use <ucr-root> below as shorthand for the adapter-managed shared UCR root. In the checked-in examples that is ucr for Bun HTTP and Node HTTP, and src/ucr for the Next app.

Blocks always require an explicit --instance, even when their generated files land at fixed logical paths.

Use this section as the default browsing path in ucr list: foundations first, adapter-specific API flows second, and admin UI last for Next projects.

Project Foundations

  • env-config: Start here for project foundations when shared code should read environment variables through a typed local wrapper.
  • logger: Start here for project foundations when app-local code needs a tiny structured logger wrapper without pulling in a framework-specific logging layer.
  • health-route: Start here for Bun project foundations when you want a lightweight health endpoint without any entity-specific inputs.
  • node-health-route: Start here for Node project foundations when you want a lightweight health endpoint without any entity-specific inputs.
  • bun-server: Start here for Bun project foundations when you want to stitch route modules into a Bun.serve entrypoint.
  • node-server: Start here for Node project foundations when you want to stitch route modules into a built-in node:http entrypoint.
  • request-context: Use this more advanced Bun foundation when handlers should share request-scoped metadata or helper accessors.

Entity/API Flows

  • entity-contract: Start a granular entity/API workflow here. It defines the model, create/update inputs, and field metadata that the rest of the resource blocks build on.
  • service-layer: Use it in the granular entity/API flow after entity-contract when you want repository contracts and service methods for one resource.
  • memory-repository: Use it in the granular entity/API flow when you want a zero-dependency in-memory runtime while keeping service and repository boundaries intact.
  • input-validation: Use it in the granular entity/API flow when create and update payloads should be validated against the same field metadata as the entity contract.
  • api-client: Use it when shared or UI code should call one entity collection and item endpoint through a small fetch-based client.
  • json-collection-route: Use it in the granular Bun entity/API flow to expose collection handlers for one resource.
  • json-item-route: Use it in the granular Bun entity/API flow to expose item-by-id handlers for one resource.
  • next-collection-route: Use it in the granular Next entity/API flow when you want the collection API route for one resource.
  • node-collection-route: Use it in the granular Node entity/API flow to expose collection handlers for one resource.
  • next-item-route: Use it in the granular Next entity/API flow when you want the item-by-id API route for one resource.
  • node-item-route: Use it in the granular Node entity/API flow to expose item-by-id handlers for one resource.
  • bun-crud-resource: Use it as the fastest Bun HTTP starter for one CRUD resource after the shared TypeScript building blocks are already installed.
  • node-crud-resource: Use it as the fastest Node HTTP starter for one CRUD resource after the shared TypeScript building blocks are already installed.
  • next-crud-resource: Use it as the fastest Next App Router starter for one CRUD resource after the shared and UI building blocks are already installed.

Admin UI

  • data-table: Use it in Next App Router admin flows to render a minimal table for one resource.
  • entity-form: Use it in Next App Router admin flows to render a minimal create/edit form for one resource.
  • admin-page: Use it as the fastest granular admin UI entry point in Next App Router to assemble a working resource page from the table, form, API client, and preset blocks.
  • entity-detail-page: Use it in Next App Router admin flows when you want a client-side detail page that loads one record and reuses entity-form for edits.

Building Blocks

  • ts-runtime: Install this advanced shared runtime first when you want to compose utilities, presets, or higher-level blocks from the official registry.
  • result-utility: Use this advanced shared primitive as the recommended Result entry point when service or transport code should represent success and failure explicitly.
  • async-utility: Use this advanced shared primitive when handwritten code needs small async helpers for retries, sequencing, parallel work, or request timeouts.
  • object-utility: Use this advanced shared primitive when feature code frequently picks, omits, or merges partial object values.
  • collection-utility: Use this advanced shared primitive when feature code groups, indexes, or sorts arrays of records in a predictable way.
  • validation-utility: Use this advanced shared primitive when blocks or handwritten code need record assertions and normalized field-error objects.
  • variant-utility: Use this advanced Next UI primitive when you want declarative visual variants instead of inline conditionals.
  • slot-utility: Use this advanced Next UI primitive when you share named layout regions or reusable slot props across multiple components.
  • state-utility: Use this advanced Next UI primitive when you model async loading, form state, or reducer-style events with small typed helpers.
  • service-preset: Use this advanced shared preset when you want one stable import for the Result, async, and validation primitives that service code builds on.
  • endpoint-preset: Use this advanced shared preset when repository or transport code wants the service preset plus object and collection helpers from one stable import.
  • form-preset: Use this advanced Next UI preset when multiple forms should share validation, object update, and state helpers from one stable import.
  • admin-page-preset: Use this advanced Next UI preset when admin-facing screens should share variant, slot, state, and collection helpers from one stable import.
  • result-errors: Use this specialized alternative only when you want a concrete Result domain file without installing the recommended result-utility building block.

Summary

The published ucr-official manifest currently contains 39 installable items.

By kind

KindCount
utility9
preset4
block26

By category

KindCategoryCount
utilitytypescript6
utilitytypescript-ui3
presettypescript2
presettypescript-ui2
blockbun-http6
blockentity5
blockfoundation3
blocknext7
blocknode-http5

By target

TargetCount
shared16
next-app-router12
bun-http6
node-http5

Utilities

async-utility

Composable async helpers for retries, sequencing, and timeouts.

When to use it: Use this advanced shared primitive when handwritten code needs small async helpers for retries, sequencing, parallel work, or request timeouts.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/utilities/async-utility
  • Exported helpers: retry, parallel, sequence, withTimeout
  • Requires: runtime:ts
  • Provides: utility:async-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityasync-utility.tstemplates/async-utility/utility/async-utility.ts.tpl

Usage recipe

bash
ucr add async-utility --target .

Checked-in examples

  • bun-service (bun-http, instance async-utility): ucr/utilities/async-utility.ts
  • next-app (next-app-router, instance async-utility): src/ucr/utilities/async-utility.ts
  • node-service (node-http, instance async-utility): ucr/utilities/async-utility.ts

collection-utility

Collection helpers for grouping, indexing, and sorting records.

When to use it: Use this advanced shared primitive when feature code groups, indexes, or sorts arrays of records in a predictable way.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/utilities/collection-utility
  • Exported helpers: groupBy, indexBy, sortBy
  • Requires: runtime:ts
  • Provides: utility:collection-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilitycollection-utility.tstemplates/collection-utility/utility/collection-utility.ts.tpl

Usage recipe

bash
ucr add collection-utility --target .

Checked-in examples

  • bun-service (bun-http, instance collection-utility): ucr/utilities/collection-utility.ts
  • next-app (next-app-router, instance collection-utility): src/ucr/utilities/collection-utility.ts
  • node-service (node-http, instance collection-utility): ucr/utilities/collection-utility.ts

object-utility

Object helpers for picking, omitting, and merging defined values.

When to use it: Use this advanced shared primitive when feature code frequently picks, omits, or merges partial object values.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/utilities/object-utility
  • Exported helpers: pick, omit, mergeDefined
  • Requires: runtime:ts
  • Provides: utility:object-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityobject-utility.tstemplates/object-utility/utility/object-utility.ts.tpl

Usage recipe

bash
ucr add object-utility --target .

Checked-in examples

  • bun-service (bun-http, instance object-utility): ucr/utilities/object-utility.ts
  • next-app (next-app-router, instance object-utility): src/ucr/utilities/object-utility.ts
  • node-service (node-http, instance object-utility): ucr/utilities/object-utility.ts

result-utility

Small result helpers for predictable service and transport flows.

When to use it: Use this advanced shared primitive as the recommended Result entry point when service or transport code should represent success and failure explicitly.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/utilities/result-utility
  • Exported helpers: ok, err, mapResult, mapError, matchResult
  • Requires: runtime:ts
  • Provides: utility:result-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityresult-utility.tstemplates/result-utility/utility/result-utility.ts.tpl

Usage recipe

bash
ucr add result-utility --target .

Checked-in examples

  • bun-service (bun-http, instance result-utility): ucr/utilities/result-utility.ts
  • next-app (next-app-router, instance result-utility): src/ucr/utilities/result-utility.ts
  • node-service (node-http, instance result-utility): ucr/utilities/result-utility.ts

ts-runtime

Typed composition runtime for utility-first TypeScript blocks.

When to use it: Install this advanced shared runtime first when you want to compose utilities, presets, or higher-level blocks from the official registry.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/runtime
  • Exported helpers: defineUtility, definePreset, compose
  • Requires: -
  • Provides: runtime:ts

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityindex.tstemplates/ts-runtime/utility/index.ts.tpl

Usage recipe

bash
ucr add ts-runtime --target .

Checked-in examples

  • bun-service (bun-http, instance ts-runtime): ucr/runtime/index.ts
  • next-app (next-app-router, instance ts-runtime): src/ucr/runtime/index.ts
  • node-service (node-http, instance ts-runtime): ucr/runtime/index.ts

validation-utility

Validation helpers for record checking and field-error shaping.

When to use it: Use this advanced shared primitive when blocks or handwritten code need record assertions and normalized field-error objects.

  • Kind: utility
  • Category: typescript
  • Targets: shared
  • Tags: advanced, shared
  • Import path: <ucr-root>/utilities/validation-utility
  • Exported helpers: assertRecord, assertShape, toFieldErrors
  • Requires: runtime:ts
  • Provides: utility:validation-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityvalidation-utility.tstemplates/validation-utility/utility/validation-utility.ts.tpl

Usage recipe

bash
ucr add validation-utility --target .

Checked-in examples

  • bun-service (bun-http, instance validation-utility): ucr/utilities/validation-utility.ts
  • next-app (next-app-router, instance validation-utility): src/ucr/utilities/validation-utility.ts
  • node-service (node-http, instance validation-utility): ucr/utilities/validation-utility.ts

slot-utility

Slot helpers for predictable UI regions and shared view props.

When to use it: Use this advanced Next UI primitive when you share named layout regions or reusable slot props across multiple components.

  • Kind: utility
  • Category: typescript-ui
  • Targets: next-app-router
  • Tags: advanced, ui, next
  • Import path: <ucr-root>/utilities/slot-utility
  • Exported helpers: createSlots, mergeSlots, resolveSlots
  • Requires: runtime:ts
  • Provides: utility:slot-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityslot-utility.tstemplates/slot-utility/utility/slot-utility.ts.tpl

Usage recipe

bash
ucr add slot-utility --target .

Checked-in examples

  • next-app (next-app-router, instance slot-utility): src/ucr/utilities/slot-utility.ts

state-utility

State helpers for async, form, and event-driven UI flows.

When to use it: Use this advanced Next UI primitive when you model async loading, form state, or reducer-style events with small typed helpers.

  • Kind: utility
  • Category: typescript-ui
  • Targets: next-app-router
  • Tags: advanced, ui, next
  • Import path: <ucr-root>/utilities/state-utility
  • Exported helpers: createAsyncState, createFormState, reduceEvent
  • Requires: runtime:ts
  • Provides: utility:state-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilitystate-utility.tstemplates/state-utility/utility/state-utility.ts.tpl

Usage recipe

bash
ucr add state-utility --target .

Checked-in examples

  • next-app (next-app-router, instance state-utility): src/ucr/utilities/state-utility.ts

variant-utility

Variant helpers for UI state and appearance selection.

When to use it: Use this advanced Next UI primitive when you want declarative visual variants instead of inline conditionals.

  • Kind: utility
  • Category: typescript-ui
  • Targets: next-app-router
  • Tags: advanced, ui, next
  • Import path: <ucr-root>/utilities/variant-utility
  • Exported helpers: createVariants, pickVariant, compoundVariants
  • Requires: runtime:ts
  • Provides: utility:variant-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
utilityvariant-utility.tstemplates/variant-utility/utility/variant-utility.ts.tpl

Usage recipe

bash
ucr add variant-utility --target .

Checked-in examples

  • next-app (next-app-router, instance variant-utility): src/ucr/utilities/variant-utility.ts

Presets

endpoint-preset

Transport preset for endpoint-safe shared helpers.

When to use it: Use this advanced shared preset when repository or transport code wants the service preset plus object and collection helpers from one stable import.

  • Kind: preset
  • Category: typescript
  • Targets: shared
  • Tags: advanced, api, shared
  • Import path: <ucr-root>/presets/endpoint-preset
  • Requires: runtime:ts, preset:service-preset, utility:object-utility, utility:collection-utility
  • Provides: preset:endpoint-preset
  • Composes: service-preset, object-utility, collection-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
presetendpoint-preset.tstemplates/endpoint-preset/preset/endpoint-preset.ts.tpl

Usage recipe

bash
ucr add endpoint-preset --target .

Checked-in examples

  • bun-service (bun-http, instance endpoint-preset): ucr/presets/endpoint-preset.ts
  • next-app (next-app-router, instance endpoint-preset): src/ucr/presets/endpoint-preset.ts
  • node-service (node-http, instance endpoint-preset): ucr/presets/endpoint-preset.ts

service-preset

Shared service preset for result, async, and validation helpers.

When to use it: Use this advanced shared preset when you want one stable import for the Result, async, and validation primitives that service code builds on.

  • Kind: preset
  • Category: typescript
  • Targets: shared
  • Tags: advanced, api, shared
  • Import path: <ucr-root>/presets/service-preset
  • Requires: runtime:ts, utility:result-utility, utility:async-utility, utility:validation-utility
  • Provides: preset:service-preset
  • Composes: result-utility, async-utility, validation-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
presetservice-preset.tstemplates/service-preset/preset/service-preset.ts.tpl

Usage recipe

bash
ucr add service-preset --target .

Checked-in examples

  • bun-service (bun-http, instance service-preset): ucr/presets/service-preset.ts
  • next-app (next-app-router, instance service-preset): src/ucr/presets/service-preset.ts
  • node-service (node-http, instance service-preset): ucr/presets/service-preset.ts

admin-page-preset

UI preset for admin layouts, slots, state, and collection rendering.

When to use it: Use this advanced Next UI preset when admin-facing screens should share variant, slot, state, and collection helpers from one stable import.

  • Kind: preset
  • Category: typescript-ui
  • Targets: next-app-router
  • Tags: advanced, ui, next
  • Import path: <ucr-root>/presets/admin-page-preset
  • Requires: runtime:ts, utility:variant-utility, utility:slot-utility, utility:state-utility, utility:collection-utility
  • Provides: preset:admin-page-preset
  • Composes: variant-utility, slot-utility, state-utility, collection-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
presetadmin-page-preset.tstemplates/admin-page-preset/preset/admin-page-preset.ts.tpl

Usage recipe

bash
ucr add admin-page-preset --target .

Checked-in examples

  • next-app (next-app-router, instance admin-page-preset): src/ucr/presets/admin-page-preset.ts

form-preset

UI form preset for validation, object updates, and state changes.

When to use it: Use this advanced Next UI preset when multiple forms should share validation, object update, and state helpers from one stable import.

  • Kind: preset
  • Category: typescript-ui
  • Targets: next-app-router
  • Tags: advanced, ui, next
  • Import path: <ucr-root>/presets/form-preset
  • Requires: runtime:ts, utility:validation-utility, utility:object-utility, utility:state-utility
  • Provides: preset:form-preset
  • Composes: validation-utility, object-utility, state-utility

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
presetform-preset.tstemplates/form-preset/preset/form-preset.ts.tpl

Usage recipe

bash
ucr add form-preset --target .

Checked-in examples

  • next-app (next-app-router, instance form-preset): src/ucr/presets/form-preset.ts

Blocks

bun-crud-resource

Starter CRUD resource for Bun HTTP services.

When to use it: Use it as the fastest Bun HTTP starter for one CRUD resource after the shared TypeScript building blocks are already installed.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: starter, crud, api, bun
  • Requires: preset:service-preset, preset:endpoint-preset, utility:validation-utility
  • Provides: entity-contract:, repository-contract:, service-layer:, memory-repository:, service-runtime:, validation:, json-collection-route:, json-item-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.
fieldsjsonyesField metadata used to render entity code.

Outputs

SurfaceLogical targetTemplate
contractmodel.tstemplates/entity-contract/contract/model.ts.tpl
domainrepository.tstemplates/service-layer/domain/repository.ts.tpl
domainservice.tstemplates/service-layer/domain/service.ts.tpl
domainmemory-repository.tstemplates/memory-repository/domain/memory-repository.ts.tpl
domainruntime.tstemplates/memory-repository/domain/runtime.ts.tpl
contractvalidation.tstemplates/input-validation/contract/validation.ts.tpl
transport/index.tstemplates/json-collection-route/transport/index.ts.tpl
transport/[id].tstemplates/json-item-route/transport/item.ts.tpl

Usage recipe

bash
ucr add bun-crud-resource --target . --instance posts --input entity=Post --input plural=posts --input-file fields=./post.fields.json

Supply the same entity naming values across the related resource code so the generated contract, service, validation, and Bun routes stay aligned.

This starter block is an alternative entry point. Do not mix it with the equivalent granular installs for the same --instance.

Checked-in examples

No checked-in example install yet. The checked-in apps stay focused on the granular composition chain, but this starter block is still part of the published official registry.

bun-server

Static route registry plus Bun.serve bootstrap.

When to use it: Start here for Bun project foundations when you want to stitch route modules into a Bun.serve entrypoint.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: foundation, starter, bun
  • Requires: -
  • Provides: bun-server
  • Entrypoints: index.ts

Inputs

NameTypeRequiredDescription
routeModulesjsonyesRoute import metadata for the server entrypoint.

Outputs

SurfaceLogical targetTemplate
entrypointindex.tstemplates/bun-server/entrypoint/index.ts.tpl

Usage recipe

bash
ucr add bun-server --target . --instance server --input-file routeModules=./route-modules.json

Provide routeModules as a JSON array of { importName, importPath } entries that match the route files you want the entrypoint to register.

Checked-in examples

  • bun-service (bun-http, instance server): server/index.ts

health-route

Static health route for Bun HTTP services.

When to use it: Start here for Bun project foundations when you want a lightweight health endpoint without any entity-specific inputs.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: foundation, starter, bun
  • Requires: -
  • Provides: health-route

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
transporthealth.tstemplates/health-route/transport/health.ts.tpl

Usage recipe

bash
ucr add health-route --target . --instance health

Checked-in examples

  • bun-service (bun-http, instance health): server/routes/health.ts

json-collection-route

Bun HTTP collection route for one entity.

When to use it: Use it in the granular Bun entity/API flow to expose collection handlers for one resource.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: crud, api, bun
  • Requires: service-runtime:, validation:
  • Provides: json-collection-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/index.tstemplates/json-collection-route/transport/index.ts.tpl

Usage recipe

bash
ucr add json-collection-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • bun-service (bun-http, instance posts): server/routes/posts/index.ts

json-item-route

Bun HTTP item route for one entity.

When to use it: Use it in the granular Bun entity/API flow to expose item-by-id handlers for one resource.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: crud, api, bun
  • Requires: service-runtime:, validation:
  • Provides: json-item-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/[id].tstemplates/json-item-route/transport/item.ts.tpl

Usage recipe

bash
ucr add json-item-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • bun-service (bun-http, instance posts): server/routes/posts/[id].ts

request-context

Small request context helpers for Bun HTTP handlers.

When to use it: Use this more advanced Bun foundation when handlers should share request-scoped metadata or helper accessors.

  • Kind: block
  • Category: bun-http
  • Targets: bun-http
  • Tags: foundation, advanced, bun
  • Requires: -
  • Provides: request-context

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
configrequest-context.tstemplates/request-context/config/request-context.ts.tpl

Usage recipe

bash
ucr add request-context --target . --instance request

Checked-in examples

No checked-in example install yet. The Bun example keeps its handlers minimal, but this block is intended for request-scoped helpers in larger services.

api-client

Small fetch client for one entity collection and item routes.

When to use it: Use it when shared or UI code should call one entity collection and item endpoint through a small fetch-based client.

  • Kind: block
  • Category: entity
  • Targets: shared
  • Tags: crud, api, shared
  • Requires: entity-contract:, utility:async-utility
  • Provides: api-client:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
domainapi-client.tstemplates/api-client/domain/api-client.ts.tpl

Usage recipe

bash
ucr add api-client --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/ucr/posts/domain/api-client.ts

entity-contract

Typed entity model, create/update inputs, and field metadata.

When to use it: Start a granular entity/API workflow here. It defines the model, create/update inputs, and field metadata that the rest of the resource blocks build on.

  • Kind: block
  • Category: entity
  • Targets: shared
  • Tags: advanced, crud, api, shared
  • Requires: -
  • Provides: entity-contract:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.
fieldsjsonyesField metadata used to render entity code.

Outputs

SurfaceLogical targetTemplate
contractmodel.tstemplates/entity-contract/contract/model.ts.tpl

Usage recipe

bash
ucr add entity-contract --target . --instance posts --input entity=Post --input plural=posts --input-file fields=./post.fields.json

Supply the same entity naming values across the related entity blocks so the generated contracts, validators, services, and routes stay aligned.

Checked-in examples

  • bun-service (bun-http, instance posts): ucr/posts/contract/model.ts
  • next-app (next-app-router, instance posts): src/ucr/posts/contract/model.ts
  • node-service (node-http, instance posts): ucr/posts/contract/model.ts

input-validation

Unknown input validation for create and update entity payloads.

When to use it: Use it in the granular entity/API flow when create and update payloads should be validated against the same field metadata as the entity contract.

  • Kind: block
  • Category: entity
  • Targets: shared
  • Tags: advanced, crud, api, shared
  • Requires: entity-contract:, utility:validation-utility
  • Provides: validation:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
fieldsjsonyesField metadata used to render validation logic.

Outputs

SurfaceLogical targetTemplate
contractvalidation.tstemplates/input-validation/contract/validation.ts.tpl

Usage recipe

bash
ucr add input-validation --target . --instance posts --input entity=Post --input-file fields=./post.fields.json

Point fields at the same JSON file you used for entity-contract so the generated validators stay in sync with the generated model.

Checked-in examples

  • bun-service (bun-http, instance posts): ucr/posts/contract/validation.ts
  • next-app (next-app-router, instance posts): src/ucr/posts/contract/validation.ts
  • node-service (node-http, instance posts): ucr/posts/contract/validation.ts

memory-repository

In-memory repository plus singleton service runtime for one entity.

When to use it: Use it in the granular entity/API flow when you want a zero-dependency in-memory runtime while keeping service and repository boundaries intact.

  • Kind: block
  • Category: entity
  • Targets: shared
  • Tags: starter, crud, api, shared
  • Requires: entity-contract:, repository-contract:, service-layer:, preset:endpoint-preset
  • Provides: memory-repository:, service-runtime:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
domainmemory-repository.tstemplates/memory-repository/domain/memory-repository.ts.tpl
domainruntime.tstemplates/memory-repository/domain/runtime.ts.tpl

Usage recipe

bash
ucr add memory-repository --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • bun-service (bun-http, instance posts): ucr/posts/domain/memory-repository.ts, ucr/posts/domain/runtime.ts
  • next-app (next-app-router, instance posts): src/ucr/posts/domain/memory-repository.ts, src/ucr/posts/domain/runtime.ts
  • node-service (node-http, instance posts): ucr/posts/domain/memory-repository.ts, ucr/posts/domain/runtime.ts

service-layer

Repository contract plus service methods for one entity.

When to use it: Use it in the granular entity/API flow after entity-contract when you want repository contracts and service methods for one resource.

  • Kind: block
  • Category: entity
  • Targets: shared
  • Tags: advanced, crud, api, shared
  • Requires: entity-contract:, preset:service-preset
  • Provides: repository-contract:, service-layer:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural method stem, for example posts.

Outputs

SurfaceLogical targetTemplate
domainrepository.tstemplates/service-layer/domain/repository.ts.tpl
domainservice.tstemplates/service-layer/domain/service.ts.tpl

Usage recipe

bash
ucr add service-layer --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • bun-service (bun-http, instance posts): ucr/posts/domain/repository.ts, ucr/posts/domain/service.ts
  • next-app (next-app-router, instance posts): src/ucr/posts/domain/repository.ts, src/ucr/posts/domain/service.ts
  • node-service (node-http, instance posts): ucr/posts/domain/repository.ts, ucr/posts/domain/service.ts

env-config

Typed environment helpers for managed projects.

When to use it: Start here for project foundations when shared code should read environment variables through a typed local wrapper.

  • Kind: block
  • Category: foundation
  • Targets: shared
  • Tags: foundation, starter, shared
  • Requires: -
  • Provides: env-config

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
configenv.tstemplates/env-config/config/env.ts.tpl

Usage recipe

bash
ucr add env-config --target . --instance env

Checked-in examples

No checked-in example install yet. The example apps stay focused on entity and route flows, but this item is still part of the published official registry.

logger

Simple structured logger wrapper for app-local code.

When to use it: Start here for project foundations when app-local code needs a tiny structured logger wrapper without pulling in a framework-specific logging layer.

  • Kind: block
  • Category: foundation
  • Targets: shared
  • Tags: foundation, starter, shared
  • Requires: -
  • Provides: logger

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
configlogger.tstemplates/logger/config/logger.ts.tpl

Usage recipe

bash
ucr add logger --target . --instance logger

Checked-in examples

No checked-in example install yet. The example apps stay focused on entity and route flows, but this item is still part of the published official registry.

result-errors

Small Result helpers for predictable service and transport flows.

When to use it: Use this specialized alternative only when you want a concrete Result domain file without installing the recommended result-utility building block.

  • Kind: block
  • Category: foundation
  • Targets: shared
  • Tags: specialized, shared
  • Requires: -
  • Provides: result-errors

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
domainresult.tstemplates/result-errors/domain/result.ts.tpl

Usage recipe

bash
ucr add result-errors --target . --instance result

Checked-in examples

No checked-in example install yet. The example apps stay focused on entity and route flows, but this item is still part of the published official registry.

admin-page

Client-side admin page composed from table, form, and API client blocks.

When to use it: Use it as the fastest granular admin UI entry point in Next App Router to assemble a working resource page from the table, form, API client, and preset blocks.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: starter, crud, ui, next
  • Requires: entity-contract:, api-client:, data-table:, entity-form:, preset:admin-page-preset
  • Provides: admin-page:
  • Entrypoints: /page.tsx

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
ui/page.tsxtemplates/admin-page/ui/page.tsx.tpl

Usage recipe

bash
ucr add admin-page --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/posts/page.tsx

data-table

Minimal entity table component for admin pages.

When to use it: Use it in Next App Router admin flows to render a minimal table for one resource.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: crud, ui, next
  • Requires: entity-contract:, preset:admin-page-preset
  • Provides: data-table:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
ui/data-table.tsxtemplates/data-table/ui/data-table.tsx.tpl

Usage recipe

bash
ucr add data-table --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/posts/data-table.tsx

entity-detail-page

Client-side detail page for viewing and editing one entity.

When to use it: Use it in Next App Router admin flows when you want a client-side detail page that loads one record and reuses entity-form for edits.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: crud, ui, next
  • Requires: api-client:, next-item-route:, entity-form:
  • Provides: entity-detail-page:
  • Entrypoints: /[id]/page.tsx

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
ui/[id]/page.tsxtemplates/entity-detail-page/ui/page.tsx.tpl

Usage recipe

bash
ucr add entity-detail-page --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/posts/[id]/page.tsx

entity-form

Minimal create/edit form component for one entity.

When to use it: Use it in Next App Router admin flows to render a minimal create/edit form for one resource.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: crud, ui, next
  • Requires: entity-contract:, preset:form-preset
  • Provides: entity-form:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
ui/entity-form.tsxtemplates/entity-form/ui/entity-form.tsx.tpl

Usage recipe

bash
ucr add entity-form --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/posts/entity-form.tsx

next-collection-route

Next App Router collection handler for one entity.

When to use it: Use it in the granular Next entity/API flow when you want the collection API route for one resource.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: crud, api, next
  • Requires: service-runtime:, validation:
  • Provides: next-collection-route:
  • Entrypoints: /route.ts

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/route.tstemplates/next-collection-route/transport/route.ts.tpl

Usage recipe

bash
ucr add next-collection-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/api/posts/route.ts

next-crud-resource

Starter CRUD resource for Next App Router projects.

When to use it: Use it as the fastest Next App Router starter for one CRUD resource after the shared and UI building blocks are already installed.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: starter, crud, api, next
  • Requires: preset:service-preset, preset:endpoint-preset, utility:validation-utility, utility:async-utility, preset:form-preset, preset:admin-page-preset
  • Provides: entity-contract:, repository-contract:, service-layer:, memory-repository:, service-runtime:, validation:, api-client:, next-collection-route:, next-item-route:, data-table:, entity-form:, admin-page:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.
fieldsjsonyesField metadata used to render entity code.

Outputs

SurfaceLogical targetTemplate
contractmodel.tstemplates/entity-contract/contract/model.ts.tpl
domainrepository.tstemplates/service-layer/domain/repository.ts.tpl
domainservice.tstemplates/service-layer/domain/service.ts.tpl
domainmemory-repository.tstemplates/memory-repository/domain/memory-repository.ts.tpl
domainruntime.tstemplates/memory-repository/domain/runtime.ts.tpl
contractvalidation.tstemplates/input-validation/contract/validation.ts.tpl
domainapi-client.tstemplates/api-client/domain/api-client.ts.tpl
transport/route.tstemplates/next-collection-route/transport/route.ts.tpl
transport/[id]/route.tstemplates/next-item-route/transport/route.ts.tpl
ui/data-table.tsxtemplates/data-table/ui/data-table.tsx.tpl
ui/entity-form.tsxtemplates/entity-form/ui/entity-form.tsx.tpl
ui/page.tsxtemplates/admin-page/ui/page.tsx.tpl

Usage recipe

bash
ucr add next-crud-resource --target . --instance posts --input entity=Post --input plural=posts --input-file fields=./post.fields.json

Supply the same entity naming values across the related resource code so the generated contract, API client, routes, and UI stay aligned.

This starter block is an alternative entry point. Do not mix it with the equivalent granular installs for the same --instance.

Checked-in examples

No checked-in example install yet. The checked-in apps stay focused on the granular composition chain, but this starter block is still part of the published official registry.

next-item-route

Next App Router item handler for one entity.

When to use it: Use it in the granular Next entity/API flow when you want the item-by-id API route for one resource.

  • Kind: block
  • Category: next
  • Targets: next-app-router
  • Tags: crud, api, next
  • Requires: service-runtime:, validation:
  • Provides: next-item-route:
  • Entrypoints: /[id]/route.ts

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/[id]/route.tstemplates/next-item-route/transport/route.ts.tpl

Usage recipe

bash
ucr add next-item-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • next-app (next-app-router, instance posts): src/app/api/posts/[id]/route.ts

node-collection-route

Node HTTP collection route for one entity.

When to use it: Use it in the granular Node entity/API flow to expose collection handlers for one resource.

  • Kind: block
  • Category: node-http
  • Targets: node-http
  • Tags: crud, api, node
  • Requires: service-runtime:, validation:
  • Provides: node-collection-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/index.tstemplates/node-collection-route/transport/index.ts.tpl

Usage recipe

bash
ucr add node-collection-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • node-service (node-http, instance posts): server/routes/posts/index.ts

node-crud-resource

Starter CRUD resource for Node HTTP services.

When to use it: Use it as the fastest Node HTTP starter for one CRUD resource after the shared TypeScript building blocks are already installed.

  • Kind: block
  • Category: node-http
  • Targets: node-http
  • Tags: starter, crud, api, node
  • Requires: preset:service-preset, preset:endpoint-preset, utility:validation-utility
  • Provides: entity-contract:, repository-contract:, service-layer:, memory-repository:, service-runtime:, validation:, node-collection-route:, node-item-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.
fieldsjsonyesField metadata used to render entity code.

Outputs

SurfaceLogical targetTemplate
contractmodel.tstemplates/entity-contract/contract/model.ts.tpl
domainrepository.tstemplates/service-layer/domain/repository.ts.tpl
domainservice.tstemplates/service-layer/domain/service.ts.tpl
domainmemory-repository.tstemplates/memory-repository/domain/memory-repository.ts.tpl
domainruntime.tstemplates/memory-repository/domain/runtime.ts.tpl
contractvalidation.tstemplates/input-validation/contract/validation.ts.tpl
transport/index.tstemplates/node-collection-route/transport/index.ts.tpl
transport/[id].tstemplates/node-item-route/transport/item.ts.tpl
entrypointindex.tstemplates/node-crud-resource/entrypoint/index.ts.tpl

Usage recipe

bash
ucr add node-crud-resource --target . --instance posts --input entity=Post --input plural=posts --input-file fields=./post.fields.json

Supply the same entity naming values across the related resource code so the generated contract, service, validation, Node routes, and node:http entrypoint stay aligned.

This starter block is an alternative entry point. Do not mix it with the equivalent granular installs for the same --instance.

Checked-in examples

No checked-in example install yet. The checked-in apps stay focused on the granular composition chain, but this starter block is still part of the published official registry.

node-health-route

Static health route for Node HTTP services.

When to use it: Start here for Node project foundations when you want a lightweight health endpoint without any entity-specific inputs.

  • Kind: block
  • Category: node-http
  • Targets: node-http
  • Tags: foundation, starter, node
  • Requires: -
  • Provides: node-health-route

Inputs

This item does not declare typed inputs.

Outputs

SurfaceLogical targetTemplate
transporthealth.tstemplates/node-health-route/transport/health.ts.tpl

Usage recipe

bash
ucr add node-health-route --target . --instance health

Checked-in examples

  • node-service (node-http, instance health): server/routes/health.ts

node-item-route

Node HTTP item route for one entity.

When to use it: Use it in the granular Node entity/API flow to expose item-by-id handlers for one resource.

  • Kind: block
  • Category: node-http
  • Targets: node-http
  • Tags: crud, api, node
  • Requires: service-runtime:, validation:
  • Provides: node-item-route:

Inputs

NameTypeRequiredDescription
entitystringyesEntity name, for example Post.
pluralstringyesPlural route segment, for example posts.

Outputs

SurfaceLogical targetTemplate
transport/[id].tstemplates/node-item-route/transport/item.ts.tpl

Usage recipe

bash
ucr add node-item-route --target . --instance posts --input entity=Post --input plural=posts

Checked-in examples

  • node-service (node-http, instance posts): server/routes/posts/[id].ts

node-server

Static route registry plus node:http bootstrap.

When to use it: Start here for Node project foundations when you want to stitch route modules into a built-in node:http entrypoint.

  • Kind: block
  • Category: node-http
  • Targets: node-http
  • Tags: foundation, starter, node
  • Requires: -
  • Provides: node-server
  • Entrypoints: index.ts

Inputs

NameTypeRequiredDescription
routeModulesjsonyesRoute import metadata for the server entrypoint.

Outputs

SurfaceLogical targetTemplate
entrypointindex.tstemplates/node-server/entrypoint/index.ts.tpl

Usage recipe

bash
ucr add node-server --target . --instance server --input-file routeModules=./route-modules.json

Provide routeModules as a JSON array of { importName, importPath } entries that match the route files you want the entrypoint to register.

Checked-in examples

  • node-service (node-http, instance server): server/index.ts

Apache-2.0 source registry documentation for Bun-, npm-, and pnpm-managed projects.