Skip to content

The contract, one line each ​

What the platform enforces, and its code, checked before validate_schema, after the brief; every error code.

The files ​

Contract 3:

  • jtk/schema.json is written from src/content/blocks.ts by npx @jtakeit/astro schema, minting missing ids and _keys; else yours — JTK_E_SCHEMA_UNREADABLE, JTK_E_UNNAMED
  • a page is jtk/pages/<path>.json (/ is index.json), {id, path, name, seo, blocks}; an entry jtk/entries/<collection>/<slug>.json, {id, collection, slug, rank, visible, seo, fields, blocks}; the shared text jtk/shared.json; a module's settings jtk/modules/<module>.json, {v, settings} — JTK_E_DOCUMENT_INVALID
  • a value is its kind's: minutes for time_of_day, duration, {"minor": 4500} for money, {"src", "alt"} for a picture, src a library key (media_link), an entry's id for a ref; empty is absent; past min/max is advice — JTK_W_CONTENT_BOUNDS; an undeclared one is kept, shown nowhere — JTK_W_CONTENT_ORPHAN
  • a translation is <name>.<locale>.json beside its original: of its id, locale, only the words, by _key — a shared value JTK_E_TRANSLATION_SHARED; translated records {from, by, at}, best left out, never invented — JTK_E_TRANSLATION_RECORD; words for a key the original lacks — JTK_W_TRANSLATION_ORPHAN
  • jtk/site.json is the platform's; the currency is create_site's, or its currency while it has none, then a person's — JTK_E_CURRENCY_SET
  • contract 2, until jtk upgrade contract-3: jtk/catalogue.json — JTK_E_CATALOGUE_UNREADABLE, JTK_E_CATALOGUE_EMPTY; jtk/content/, an entry under its prefix — JTK_E_ENTRY_NO_COLLECTION, JTK_E_CONTENT_FILE_INVALID
  • shapes: files under jtk/

The schema ​

  • contract: 3, generator, locale (the original's), locales, BCP 47; no blocks is empty; an unknown key refused — JTK_E_CONTRACT_UNKNOWN, JTK_E_GENERATOR_INVALID, JTK_E_LOCALE_INVALID, JTK_E_SCHEMA_EMPTY, JTK_E_SCHEMA_KEY_UNKNOWN
  • a block declares type, v (raised: upcast), a label and a field; a field key, label, kind — JTK_E_BLOCK_VERSION, JTK_E_UPCAST_INVALID, JTK_E_BLOCK_EMPTY, JTK_E_LABEL_MISSING, JTK_E_KIND_UNKNOWN, JTK_E_TEXT_INVALID
  • names are snake_case, unique among siblings; a select has options: [{value, label}]; sane min/max; a list has of; a media says what it holds — JTK_E_NAME_INVALID, JTK_E_NAME_DUPLICATE, JTK_E_SELECT_NO_OPTIONS, JTK_E_BOUNDS_INVALID, JTK_E_LIST_INVALID, JTK_E_MEDIA_INVALID
  • localized on text, a picture, a link, a list; integer on a number; qualifiers on money; untranslated is base/hide — JTK_E_ATTRIBUTE_INVALID
  • shared lists the shared text's block types; a field there may say a role, each once — JTK_E_SHARED_INVALID
  • render: "live", kept — JTK_W_NOT_LIVE
  • a collecting block says what; views name real fields — JTK_E_COLLECTS_UNKNOWN, JTK_E_VIEW_INVALID
  • what the owner edits is client_editable: true, data-jtk-path where drawn, any kind — JTK_E_UNANNOTATED_FIELD (phone, date, choice: JTK_W_UNANNOTATED_FIELD for now); drawn, untappable — JTK_W_DRAWN_UNTAPPABLE; derived: data-jtk-from; unshown: no_tap_target, beside its field (JTK_W_HIDDEN_UNEXPLAINED), a link its button's (JTK_W_LINK_NOT_BESIDE); titled_by a label — JTK_E_BESIDE_INVALID, JTK_E_TITLED_BY_INVALID; owner-locked date, hour, price — JTK_W_OWNER_LOCKED
  • a collection's type is a declared block; route {detail, listing, per_page}/"none" + shown_on; order "manual"/{by, desc}; ends_by → ended (JTK_W_DATE_HIDES); a ref {to: [collection], many} — JTK_E_COLLECTION_INVALID, JTK_E_ENTRY_TYPE_INVALID, JTK_E_ORDER_INVALID, JTK_E_ROUTE_INVALID, JTK_E_REF_INVALID
  • an entry type's form: sections, aside, widgets — JTK_E_PANEL_FORM_INVALID, JTK_W_PANEL_FORM_GUESSED
  • modules turns one on, at the schema's collections — JTK_E_MODULE_UNKNOWN, JTK_E_MODULE_ROLE_INVALID
  • a product: one SKU a site, any case; picks name each option; 1–2,000 variants — JTK_E_SKU_TAKEN, JTK_E_PICKS_INVALID, JTK_E_PRODUCT_INVALID
  • a service has takes and, to be paid, costs — or rates: day · from · until · costs rows, not with costs, none overlapping (JTK_E_DIARY_NOT_READY); an unpriced open hour — JTK_W_UNPRICED_HOURS; rows may name units, a service its per; priced without takes is an add-on — JTK_W_ADDON_ALONE; a resource may carry hours within the business's (JTK_W_SESSION_OUTSIDE_HOURS), does, seats or spots
  • what a module books is in every language: no untranslated: "hide", no visible: false in a translation
  • a fact lives once: hours in the settings, prices in services — JTK_W_MODULE_TWIN, JTK_W_MODULE_POST
  • bookings settings: kind, locale pick the words (JTK_W_KIND_UNKNOWN, JTK_W_KIND_MISSING, JTK_W_LOCALE_FALLBACK); words override keys, placeholders kept (JTK_E_MODULE_FILE_INVALID, JTK_W_WORD_UNKNOWN); hand_out, no day rates — JTK_W_KIND_NO_DAYS; old kit_version — JTK_W_KIT_BEHIND; no zone/hours — JTK_W_DIARY_UNSET
  • format: schema, field kinds, modules

The build ​

  • one kind of build, for the site's address: no noindex, no Disallow: /, a sitemap of every page on SITE_URL, a canonical on that host — JTK_E_NOINDEX, JTK_E_ROBOTS_DISALLOW, JTK_E_SITEMAP_EMPTY, JTK_E_CANONICAL_ELSEWHERE
  • every content page is built, in every language; every shared field is drawn — JTK_E_PAGE_NOT_BUILT, JTK_E_SHARED_NOT_RENDERED
  • an enquiry form declares collects, renders the contract's fields only — JTK_E_FORM_INCOMPLETE, JTK_E_FORM_UNDECLARED, JTK_E_FORM_FIELD_UNDECLARED
  • a data-jtk-path names a declared place by key (blocks[hero].title, entry:<id>:title); the schema is committed — JTK_E_ANNOTATION_UNKNOWN, JTK_E_CATALOGUE_MISSING; optionals empty, full — JTK_E_CONTENT_VARIANT
  • code is judged once: a content-only save keeps its verdict; failed code never goes live — JTK_E_CODE_UNCHECKED
  • a build reaches GitHub, npm, yarn, the media host, Google Fonts only — JTK_E_BUILD_REACH
  • dist/_meta.json: redirects, immutable hashed dirs, cache lifetimes, no drafts — JTK_E_META_INVALID; a kept file keeps its bytes — JTK_E_CACHED_FILE_CHANGED

The order ​

  1. create_site (currency when priced, design); open_dev_session shows pages
  2. npx @jtakeit/astro schema, then validate_schema — the whole tree: as text with site_id before a push, by site and ref after
  3. push_code; no shell: read_files, write_files; GitHub: attach_repo, our App, by a person; all import
  4. commit_and_build — nothing public; trigger_build only rebuilds — JTK_E_OUT_OF_SYNC
  5. get_build, get_build_log, get_built_page; get_preview_link for a person
  6. preflight — currency, shared text; custom: JTK_W_TEMPLATE_DESIGN, JTK_W_DESIGN_AXES, JTK_W_DIRECTIONS_ALIKE; JTK_W_FIRST_SCREEN, JTK_W_ANCHOR_LANDING, JTK_W_SCREEN_FIT, JTK_W_RAGGED_GALLERY, JTK_W_BOOKING_LINK; try_booking, try_order, self_check — JTK_W_PAYMENT_UNCHECKED
  7. later: pull (git pull, pull_code + jtk pull); commit, push_code or import_branch, commit_and_build — unsaved work: JTK_E_DRAFT_AHEAD, the save lays it over

The boundaries ​

  • no tool writes content or structure but by a commit, imported, published
  • no agent reads enquiries, bookings, orders, members
  • a launch, a domain, an invitation, another agent — a person's, in the panel — JTK_E_NO_BUSINESS, JTK_E_NO_DESTINATION, JTK_E_PLAN_SHORT
  • on a launched site an agent's build is a candidate a person publishes, or rolls back, holds — JTK_E_PUBLISH_HELD
  • ten demo sites, 30 builds a day an account by default