Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Template packages

Platform spec feature

Template packages

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

What this feature specifies

Template packagespackageKind: template on beskid.package.v1, .bpk validation without api.json, and pckg registry UI that hides API documentation.

Implementation anchors

  • pckg/src/Server/Services/PackageArtifactValidator.cs
  • pckg package detail components (template page mode)
  • beskid pckg pack — emit packageKind and .beskid/template.json

Contract statement

A template package is a published .bpk artifact whose root package.json declares packageKind: template. Template packages distribute .beskid/template.json and scaffold sources. They use the same versioning, yank, checksum, and registry-assigned publish semver as library packages, but different validation and pckg UI.

Inputs and outputs

FieldRule
schemabeskid.package.v1 (unchanged)
idPackage id; first-party beskid.templates.*
packageKindtemplate (required for this profile)
versionPresent in artifact; registry may assign publish version independently
OutputDownloaded .bpk → extracted template root for beskid new install

State model

Template packages must not be required to expose structured API documentation on the registry. The package detail route must use template page mode: readme, template metadata (shortName, tags.type, classifications), install command, and version history—no api.json viewer, no docs tree tabs for API reference.

Algorithms and flow

Pack: beskid pckg pack on a type: Template project must set packageKind: template in generated package.json and include .beskid/template.json plus template sources roots.

Publish: Same POST /api/packages/<id>/publish and workspace publish flows; server selects validator profile by packageKind.

Consume: beskid new install <id> downloads version, verifies kind, registers cache entry.

Edge cases and errors

  • Library package accidentally packed without api.json — existing rule; template profile must not require api.json.
  • Template package missing .beskid/template.json — reject at publish with HTTP 400.
  • packageKind: library with template manifest present — reject or require repack as template.

Compatibility and versioning

Identical to library packages: immutable versions, yank semantics, registry-assigned bumps on upload.

Decisions

No open decisions. ADRs D-TOOL-SCAFF-00010003 (explicit packageKind, template registry UI, no api.json) under adr/; use the ADRs tab.

Verification and traceability

  • pckg/src/Server/Services/PackageArtifactValidator.cs — template profile branch
  • pckg Blazor package detail routing by packageKind
  • Server tests: template .bpk publish without api.json

Articles